From 768b4e4d21caa67cd55637d6d110f85b61392a44 Mon Sep 17 00:00:00 2001 From: Milad <123564736+MiladRTX@users.noreply.github.com> Date: Thu, 29 Oct 2026 02:39:36 +0100 Subject: [PATCH] Glint 1.5: picture enhancement, presets, compare, one viewer, web fixes Desktop app - Settings -> Picture: GPU passes between the stream and the screen. Upscaling (Bilinear, Lanczos, AMD FSR 1, FSRCNNX AI), CAS sharpening, denoise, debanding, dithering and colour; profiles plus a frame-time guard. My presets: save, apply, update, revert, delete, remembered. - Side-by-side compare (C) with zoom and pan, tweak panel (X). - One viewer: connecting takes the stream; "Watching elsewhere" when another viewer takes it. - Lower sound delay (about 190 -> 100 ms). - Gallery follows the folder, PNG sizes, Fit/100% switch, drag to pan. - Fixed crashes on fast zooming and on opening the gallery. Payload - 20 Mbit/s encoder bitrate; set once at start (live changes lock the encoder, documented in docs/API.md). - One viewer at a time (409 for a pushed-out viewer), viewers and bitrate in status.json. - Process name Glint.elf, previous log kept, quits at once when refused. Browser dashboard - Fixed the freeze after ~8 s, lower latency, sound on by default, one viewer with Watch here. Version 1.5. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 54 + README.md | 27 +- app/build.sh | 11 +- app/include/glint/payload_client.h | 4 + app/include/glint/version.h | 2 +- app/res/glint.rc | 8 +- app/src/core/app.cpp | 19 +- app/src/core/payload_client.cpp | 21 +- app/src/core/settings.cpp | 76 +- app/src/core/settings.h | 35 + app/src/main.cpp | 1266 ++++- app/src/media/audio.cpp | 10 +- app/src/media/audio.h | 2 +- app/src/media/media.cpp | 39 + app/src/media/media.h | 18 + app/src/shaders/enhance_easu.comp | 35 + app/src/shaders/enhance_easu.spv.inc | 1015 ++++ app/src/shaders/enhance_final.comp | 73 + app/src/shaders/enhance_final.spv.inc | 381 ++ app/src/shaders/enhance_pre.comp | 86 + app/src/shaders/enhance_pre.spv.inc | 399 ++ app/src/shaders/enhance_scale.comp | 60 + app/src/shaders/enhance_scale.spv.inc | 311 ++ app/src/shaders/fsrcnnx/pass_01.comp | 51 + app/src/shaders/fsrcnnx/pass_01.spv.inc | 532 ++ app/src/shaders/fsrcnnx/pass_02.comp | 51 + app/src/shaders/fsrcnnx/pass_02.spv.inc | 532 ++ app/src/shaders/fsrcnnx/pass_03.comp | 46 + app/src/shaders/fsrcnnx/pass_03.spv.inc | 703 +++ app/src/shaders/fsrcnnx/pass_04.comp | 46 + app/src/shaders/fsrcnnx/pass_04.spv.inc | 703 +++ app/src/shaders/fsrcnnx/pass_05.comp | 46 + app/src/shaders/fsrcnnx/pass_05.spv.inc | 703 +++ app/src/shaders/fsrcnnx/pass_06.comp | 46 + app/src/shaders/fsrcnnx/pass_06.spv.inc | 703 +++ app/src/shaders/fsrcnnx/pass_07.comp | 46 + app/src/shaders/fsrcnnx/pass_07.spv.inc | 703 +++ app/src/shaders/fsrcnnx/pass_08.comp | 46 + app/src/shaders/fsrcnnx/pass_08.spv.inc | 703 +++ app/src/shaders/fsrcnnx/pass_09.comp | 46 + app/src/shaders/fsrcnnx/pass_09.spv.inc | 703 +++ app/src/shaders/fsrcnnx/pass_10.comp | 46 + app/src/shaders/fsrcnnx/pass_10.spv.inc | 703 +++ app/src/shaders/fsrcnnx/pass_11.comp | 32 + app/src/shaders/fsrcnnx/pass_11.spv.inc | 180 + app/src/shaders/fsrcnnx/pass_12.comp | 32 + app/src/shaders/fsrcnnx/pass_12.spv.inc | 180 + app/src/shaders/fsrcnnx/pass_13.comp | 45 + app/src/shaders/fsrcnnx/pass_13.spv.inc | 689 +++ app/src/shaders/fsrcnnx/passes.inc | 55 + app/src/shaders/fsrcnnx_luma.comp | 17 + app/src/shaders/fsrcnnx_luma.spv.inc | 92 + app/src/shaders/fsrcnnx_out.comp | 26 + app/src/shaders/fsrcnnx_out.spv.inc | 137 + .../third_party/FSRCNNX_x2_8-0-4-1.glsl | 426 ++ .../third_party/LICENSE-FidelityFX-FSR.txt | 19 + app/src/shaders/third_party/README.md | 12 + app/src/shaders/third_party/ffx_a.h | 2656 ++++++++++ app/src/shaders/third_party/ffx_fsr1.h | 1199 +++++ docs/API.md | 38 +- docs/CONSOLE.md | 10 +- docs/STATUS.md | 3 +- payload/assets/dashboard.html | 236 +- payload/include/glint.h | 12 +- payload/src/capture_host.c | 5 + payload/src/capture_ps5.c | 15 +- payload/src/dashboard_blob.c | 4484 +++++++++-------- payload/src/http_handlers.h | 6 +- payload/src/main.c | 15 +- payload/src/media_http.c | 30 +- payload/src/server.c | 119 +- tests/viewer_takeover.js | 46 + tools/gen_fsrcnnx.js | 91 + 73 files changed, 19819 insertions(+), 2198 deletions(-) create mode 100644 app/src/shaders/enhance_easu.comp create mode 100644 app/src/shaders/enhance_easu.spv.inc create mode 100644 app/src/shaders/enhance_final.comp create mode 100644 app/src/shaders/enhance_final.spv.inc create mode 100644 app/src/shaders/enhance_pre.comp create mode 100644 app/src/shaders/enhance_pre.spv.inc create mode 100644 app/src/shaders/enhance_scale.comp create mode 100644 app/src/shaders/enhance_scale.spv.inc create mode 100644 app/src/shaders/fsrcnnx/pass_01.comp create mode 100644 app/src/shaders/fsrcnnx/pass_01.spv.inc create mode 100644 app/src/shaders/fsrcnnx/pass_02.comp create mode 100644 app/src/shaders/fsrcnnx/pass_02.spv.inc create mode 100644 app/src/shaders/fsrcnnx/pass_03.comp create mode 100644 app/src/shaders/fsrcnnx/pass_03.spv.inc create mode 100644 app/src/shaders/fsrcnnx/pass_04.comp create mode 100644 app/src/shaders/fsrcnnx/pass_04.spv.inc create mode 100644 app/src/shaders/fsrcnnx/pass_05.comp create mode 100644 app/src/shaders/fsrcnnx/pass_05.spv.inc create mode 100644 app/src/shaders/fsrcnnx/pass_06.comp create mode 100644 app/src/shaders/fsrcnnx/pass_06.spv.inc create mode 100644 app/src/shaders/fsrcnnx/pass_07.comp create mode 100644 app/src/shaders/fsrcnnx/pass_07.spv.inc create mode 100644 app/src/shaders/fsrcnnx/pass_08.comp create mode 100644 app/src/shaders/fsrcnnx/pass_08.spv.inc create mode 100644 app/src/shaders/fsrcnnx/pass_09.comp create mode 100644 app/src/shaders/fsrcnnx/pass_09.spv.inc create mode 100644 app/src/shaders/fsrcnnx/pass_10.comp create mode 100644 app/src/shaders/fsrcnnx/pass_10.spv.inc create mode 100644 app/src/shaders/fsrcnnx/pass_11.comp create mode 100644 app/src/shaders/fsrcnnx/pass_11.spv.inc create mode 100644 app/src/shaders/fsrcnnx/pass_12.comp create mode 100644 app/src/shaders/fsrcnnx/pass_12.spv.inc create mode 100644 app/src/shaders/fsrcnnx/pass_13.comp create mode 100644 app/src/shaders/fsrcnnx/pass_13.spv.inc create mode 100644 app/src/shaders/fsrcnnx/passes.inc create mode 100644 app/src/shaders/fsrcnnx_luma.comp create mode 100644 app/src/shaders/fsrcnnx_luma.spv.inc create mode 100644 app/src/shaders/fsrcnnx_out.comp create mode 100644 app/src/shaders/fsrcnnx_out.spv.inc create mode 100644 app/src/shaders/third_party/FSRCNNX_x2_8-0-4-1.glsl create mode 100644 app/src/shaders/third_party/LICENSE-FidelityFX-FSR.txt create mode 100644 app/src/shaders/third_party/README.md create mode 100644 app/src/shaders/third_party/ffx_a.h create mode 100644 app/src/shaders/third_party/ffx_fsr1.h create mode 100644 tests/viewer_takeover.js create mode 100644 tools/gen_fsrcnnx.js diff --git a/CHANGELOG.md b/CHANGELOG.md index b96ccbf..15d2936 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,60 @@ # Changelog +## [1.5] - 2026-10-29 + +Upload the payload as `/data/pldmgr/payloads/local/glint/Glint-1.5-ps5.elf`. + +### Desktop app (Windows) + +- **Picture enhancement**, a new Settings tab: GPU passes between the stream + and the screen. Profiles Off, Light, Balanced (FSR 1), Enhanced (AI) and + Custom; upscaling with Bilinear, Lanczos, AMD FidelityFX FSR 1 or FSRCNNX + (a small neural network, from 1.3x); contrast-adaptive sharpening; + edge-preserving denoise, debanding and dithering; exposure, saturation and + shadow detail. Measured on an RX 9070 at 4K output: 0.14 ms (Bilinear) to + 1.23 ms (AI) per frame. "Protect frame time" steps the profile down when + the passes go over a GPU budget. Off costs nothing. +- **My presets:** save the current values under a name, apply, update, + revert and delete. The applied preset is marked (Applied, or Changed after + an edit) and stays applied across restarts. All in `picture.conf`. +- **Side-by-side compare** (C, or Settings → Picture): the original and the + enhanced picture next to each other; scroll zooms (up to 8x) around the + pointer, drag pans both, double-click resets. X opens a tweak panel over the + picture without dimming it. +- **One viewer at a time:** connecting takes the stream from a browser or + another PC; when one takes it from the app, the app says "Watching + elsewhere" instead of an error. +- **Sound delay** about 190 → 100 ms: the automatic buffer still grows on a + choppy network, but starts lower (Lowest 40, Balanced 60, Smooth 120 ms). +- Gallery: follows the folder (files deleted or added in Explorer show up), + screenshots show their size instead of 0x0, Fit/100% is a proper switch, + and a zoomed screenshot pans with press-and-drag. +- Fixed: a crash when zooming fast (a recreated image could reuse a freed + handle), and a crash opening the gallery (the UI's texture pool held 8). + +### Payload (PS5) + +- **20 Mbit/s** encoder bitrate (was 60): in a busy game over Wi-Fi it + hitched about half as often as 30. The bitrate can only be set when + capture starts (docs/API.md, Bitrate). +- **One viewer at a time:** the newest viewer gets the stream; one that was + pushed out is refused (409) while the new one watches, so two can't fight. + `status.json` gains `viewers` and `bitrate`. +- Process name **Glint.elf** (listed with the other payloads in Payload + Manager). The previous run's log is kept as `capture.prev.log`; a refused + start quits at once and says "Load Glint again". + +### Browser dashboard + +- Fixed: the picture froze after ~8 s (the buffer was trimmed past the only + keyframe). +- Lower latency: about 94 → 35 ms from arrival to screen, a jitter buffer for + sound, and no video download while the tab is hidden. +- Sound is on by default (after the browser's required first click). +- One viewer at a time, with "Watch here" to take the stream back. + + ## [1.0] - 2026-10-28 Screenlink is now **Glint**: `Glint.exe`, `glint-payload.elf` (upload it as diff --git a/README.md b/README.md index 733c812..9188cf3 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ **Watch, hear and record a jailbroken PS5 on your Windows PC, with low latency.** -![Version](https://img.shields.io/badge/version-1.0-informational) +![Version](https://img.shields.io/badge/version-1.5-informational) ![Platform](https://img.shields.io/badge/platform-Windows%2010%20%7C%2011-0078D6) ![Console](https://img.shields.io/badge/console-PS5%20(jailbroken)-003791) ![Language](https://img.shields.io/badge/C%2B%2B17%20%2B%20C11-00599C) @@ -50,6 +50,12 @@ No capture card needed. A browser can also open the payload directly. - **Recording** to MKV (H.264 copy + AAC, nothing re-encoded) and PNG **screenshots**. - **Gallery** with thumbnails, export to MP4/MKV and delete. +- **Picture enhancement** (Settings → Picture): upscaling with Bilinear, + Lanczos, AMD FSR 1 or an AI network (FSRCNNX), contrast-adaptive + sharpening, denoise, debanding and colour. Profiles, your own saved + presets, and a frame-time guard that steps down on a weak GPU. +- **Side-by-side compare** (C): the original and the enhanced picture next to + each other, zoomed and panned together, with a tweak panel (X). - **Built-in viewer.** Recordings play with sound, seek and volume. Screenshots zoom and pan. - **Dark and light theme** (dark by default), animated UI, auto-hiding @@ -64,6 +70,8 @@ No capture card needed. A browser can also open the payload directly. console, keyframe and stop. See [API.md](docs/API.md). - **Browser dashboard** at `http://:7231/`: live view, sound, screenshots, console recordings, dark and light theme. Nothing to install. +- **One viewer at a time:** the newest browser or app takes the stream; the + others see "watching somewhere else" and can take it back. - On-screen notifications on the console when it loads, is ready, or hits a problem. @@ -83,7 +91,7 @@ Download both from the [latest release](https://github.com/MiladRTX/Glint/releas or build them yourself ([Building](#building)): - `Glint.exe`, the Windows app (one file, nothing to install) -- `Glint-1.0-ps5.elf`, the PS5 payload +- `Glint-1.5-ps5.elf`, the PS5 payload ### 2. Run the payload @@ -91,20 +99,20 @@ Upload the ELF to Payload Manager's folder on the console (FTP on port 2121 here; use your console's IP): ```bash -curl --ftp-create-dirs -T Glint-1.0-ps5.elf ftp://:2121/data/pldmgr/payloads/local/glint/Glint-1.0-ps5.elf +curl --ftp-create-dirs -T Glint-1.5-ps5.elf ftp://:2121/data/pldmgr/payloads/local/glint/Glint-1.5-ps5.elf ``` A self-built ELF is `payload/build/glint-payload.elf`; upload it under the same name. Then start **Glint** from Payload Manager on the console. You will see -*"Glint 1.0 loaded. Starting capture..."*, then *"Glint ready on +*"Glint 1.5 loaded. Starting capture..."*, then *"Glint ready on port 7231"*. > [!TIP] > Payload Manager expects names shaped like `Name-version-ps5.elf`. If the -> console says *"the PS5 refused to start video capture"*, wait a minute and -> run it again. +> console says *"the PS5 refused to start video capture"*, just run it again. +> This often happens on the first try after the PS5 starts. ### 3. Connect @@ -190,6 +198,7 @@ dependency: [docs/BUILD.md](docs/BUILD.md). | `R` | Start/stop recording | | `T` | Dark / light theme | | `G` | Gallery | | `F11` | Full screen | | `P` | Picture size (fit / fill / no upscaling) | | `Ctrl+,` | Settings | +| `C` | Side-by-side compare | | `X` | Tweak panel (in compare) | In the viewer: `Space` play/pause, `←` `→` seek 5 s (or previous/next picture), `↑` `↓` volume, `Page Up` / `Page Down` previous/next item, `Esc` @@ -293,8 +302,10 @@ Built with [Dear ImGui](https://github.com/ocornut/imgui), [FFmpeg](https://ffmpeg.org/), [curl](https://curl.se/), [SDL2](https://www.libsdl.org/), [GLFW](https://www.glfw.org/), [x264](https://www.videolan.org/developers/x264.html), the -[Geist](https://vercel.com/font) typeface (SIL OFL), and the -[PS5 payload SDK](https://github.com/ps5-payload-dev/sdk). +[Geist](https://vercel.com/font) typeface (SIL OFL), the +[PS5 payload SDK](https://github.com/ps5-payload-dev/sdk), +[AMD FidelityFX FSR 1](https://github.com/GPUOpen-Effects/FidelityFX-FSR) (MIT) and +[FSRCNNX](https://github.com/igv/FSRCNN-TensorFlow) (LGPL-3.0) for the upscalers. ## License diff --git a/app/build.sh b/app/build.sh index de9e6e4..00b947a 100644 --- a/app/build.sh +++ b/app/build.sh @@ -14,8 +14,15 @@ export PKG_CONFIG_PATH="$PWD/deps/prefix/lib/pkgconfig" # Compute shaders -> SPIR-V C arrays (the generated .inc is kept in the repo so # a machine without glslc still builds). if command -v glslc >/dev/null 2>&1; then - glslc -fshader-stage=compute --target-env=vulkan1.0 -O src/shaders/yuv_to_rgba.comp \ - -mfmt=c -o src/shaders/yuv_to_rgba.spv.inc + # The picture enhancement shaders too; fsrcnnx/ is generated by + # tools/gen_fsrcnnx.js, enhance_easu includes AMD's FSR headers (third_party/). + for shader in yuv_to_rgba enhance_pre enhance_scale enhance_final enhance_easu fsrcnnx_luma fsrcnnx_out \ + fsrcnnx/pass_01 fsrcnnx/pass_02 fsrcnnx/pass_03 fsrcnnx/pass_04 fsrcnnx/pass_05 fsrcnnx/pass_06 \ + fsrcnnx/pass_07 fsrcnnx/pass_08 fsrcnnx/pass_09 fsrcnnx/pass_10 fsrcnnx/pass_11 fsrcnnx/pass_12 \ + fsrcnnx/pass_13; do + glslc -fshader-stage=compute --target-env=vulkan1.0 -O -I src/shaders src/shaders/$shader.comp \ + -mfmt=c -o src/shaders/$shader.spv.inc + done fi # The deps paths are given relative: pkg-config's absolute ones break on a diff --git a/app/include/glint/payload_client.h b/app/include/glint/payload_client.h index 6f8a121..cdeb304 100644 --- a/app/include/glint/payload_client.h +++ b/app/include/glint/payload_client.h @@ -36,6 +36,7 @@ struct StreamStatus { double fps = 0.0; double kbps = 0.0; int clients = 0; + int viewers = 0; // people watching (the console allows one) bool recording = false; std::string recording_name; unsigned long long recording_frames = 0; @@ -48,6 +49,9 @@ struct StreamStatus { std::string audio_codec; }; +// stream_frames/stream_audio error when another viewer has the stream (HTTP 409). +constexpr const char* kTakenOver = "someone else is watching"; + // Port the Glint payload listens on. constexpr int kPayloadPort = 7231; diff --git a/app/include/glint/version.h b/app/include/glint/version.h index 98f17e3..d7e4502 100644 --- a/app/include/glint/version.h +++ b/app/include/glint/version.h @@ -2,4 +2,4 @@ // The one place the app's version lives (title, Settings footer, --version, // the log and diagnostics). The payload's is SL_VERSION in payload/include/glint.h. -#define GLINT_VERSION "1.0" +#define GLINT_VERSION "1.5" diff --git a/app/res/glint.rc b/app/res/glint.rc index 2f1eb64..6bb987a 100644 --- a/app/res/glint.rc +++ b/app/res/glint.rc @@ -6,8 +6,8 @@ GLFW_ICON ICON "glint.ico" VS_VERSION_INFO VERSIONINFO -FILEVERSION 1,0,0,0 -PRODUCTVERSION 1,0,0,0 +FILEVERSION 1,5,0,0 +PRODUCTVERSION 1,5,0,0 FILEOS VOS_NT_WINDOWS32 FILETYPE VFT_APP BEGIN @@ -16,9 +16,9 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "Glint" - VALUE "FileVersion", "1.0" + VALUE "FileVersion", "1.5" VALUE "ProductName", "Glint" - VALUE "ProductVersion", "1.0" + VALUE "ProductVersion", "1.5" VALUE "OriginalFilename", "Glint.exe" END END diff --git a/app/src/core/app.cpp b/app/src/core/app.cpp index 6213204..08946ef 100644 --- a/app/src/core/app.cpp +++ b/app/src/core/app.cpp @@ -425,9 +425,21 @@ void App::worker() { broadcaster_.stop("Live broadcast stopped because the console stream ended."); audio_.stop(); if (!stop_.load()) { + // The console streams to one viewer: if the stream just closed and + // someone is still watching, a browser or another PC took it. + bool taken = error == kTakenOver; + if (error.empty()) { + StreamStatus status; + std::string ignored_error; + taken = client.fetch_status(status, ignored_error) && status.viewers > 0; + } std::lock_guard lock(mutex_); - error_ = error.empty() ? "Video stream stopped" : "Video: " + error; - logf("video stream ended: %s", error.empty() ? "closed by the console" : error.c_str()); + if (taken) + error_ = "Video: Glint is open in a browser or on another PC. Connect to watch here."; + else + error_ = error.empty() ? "Video stream stopped" : "Video: " + error; + logf("video stream ended: %s", taken ? "another viewer took it" + : error.empty() ? "closed by the console" : error.c_str()); } } @@ -573,7 +585,8 @@ double App::video_hold_target_ms() const { void App::set_latency(Latency latency) { latency_.store((int)latency); - audio_.set_auto_floor_ms(latency == Latency::Smooth ? 150 : 100); + // Smooth also holds the picture to the sound, so it keeps a larger floor. + audio_.set_auto_floor_ms(latency == Latency::Smooth ? 120 : latency == Latency::Balanced ? 60 : 40); } bool App::post(const std::string& path, std::string& error) { diff --git a/app/src/core/payload_client.cpp b/app/src/core/payload_client.cpp index 121d965..9059fd2 100644 --- a/app/src/core/payload_client.cpp +++ b/app/src/core/payload_client.cpp @@ -270,6 +270,7 @@ bool PayloadClient::fetch_status(StreamStatus& status, std::string& error) { status.fps = json_double(document, "fps"); status.kbps = json_double(document, "kbps"); status.clients = static_cast(json_int(document, "clients")); + status.viewers = static_cast(json_int(document, "viewers")); status.recording = json_bool(document, "recording"); status.recording_name = json_string(document, "recording_name"); status.recording_frames = static_cast(json_int(document, "recording_frames")); @@ -371,7 +372,10 @@ bool PayloadClient::stream_frames(const FrameCallback& callback, std::atomic_boo error = "curl_easy_init failed"; return false; } - curl_easy_setopt(curl, CURLOPT_URL, (base_ + "/frames").c_str()); + // One viewer at a time: the app only connects when asked to, so it takes + // the stream from whoever has it (docs/API.md). + curl_easy_setopt(curl, CURLOPT_URL, (base_ + "/frames?take=1").c_str()); + curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1L); curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L); curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, +progress); curl_easy_setopt(curl, CURLOPT_XFERINFODATA, &context); @@ -384,8 +388,14 @@ bool PayloadClient::stream_frames(const FrameCallback& callback, std::atomic_boo curl_easy_setopt(curl, CURLOPT_USERAGENT, "Glint/1.0"); CURLcode result = curl_easy_perform(curl); + long http_status = 0; + curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &http_status); curl_easy_cleanup(curl); + if (result == CURLE_HTTP_RETURNED_ERROR && http_status == 409) { + error = kTakenOver; + return false; + } if (state.failed) { error = state.error; return false; @@ -441,7 +451,8 @@ bool PayloadClient::stream_audio(const AudioCallback& callback, std::atomic_bool error = "curl_easy_init failed"; return false; } - curl_easy_setopt(curl, CURLOPT_URL, (base_ + "/audio").c_str()); + curl_easy_setopt(curl, CURLOPT_URL, (base_ + "/audio").c_str()); // never takes: it reconnects on its own + curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1L); curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L); curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, +progress); curl_easy_setopt(curl, CURLOPT_XFERINFODATA, &context); @@ -454,8 +465,14 @@ bool PayloadClient::stream_audio(const AudioCallback& callback, std::atomic_bool curl_easy_setopt(curl, CURLOPT_USERAGENT, "Glint/1.0"); CURLcode result = curl_easy_perform(curl); + long http_status = 0; + curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &http_status); curl_easy_cleanup(curl); + if (result == CURLE_HTTP_RETURNED_ERROR && http_status == 409) { + error = kTakenOver; + return false; + } if (state.failed) { error = state.error; return false; diff --git a/app/src/core/settings.cpp b/app/src/core/settings.cpp index 90057b8..4e316de 100644 --- a/app/src/core/settings.cpp +++ b/app/src/core/settings.cpp @@ -148,7 +148,8 @@ bool AppSettings::operator==(const AppSettings& o) const { return console_url == o.console_url && recent == o.recent && theme == o.theme && sound == o.sound && volume == o.volume && delay_auto == o.delay_auto && delay_ms == o.delay_ms && video_sync == o.video_sync && av_offset_ms == o.av_offset_ms && media_dir == o.media_dir && picture == o.picture && gpu_decode == o.gpu_decode && - gpu_convert == o.gpu_convert && latency == o.latency && window_x == o.window_x && + gpu_convert == o.gpu_convert && latency == o.latency && enhance == o.enhance && + picture_presets == o.picture_presets && picture_active == o.picture_active && window_x == o.window_x && window_y == o.window_y && window_w == o.window_w && window_h == o.window_h && maximized == o.maximized && fullscreen == o.fullscreen; } @@ -199,6 +200,56 @@ void load_settings(AppSettings& s, std::vector& warnings) { if (v == "smooth") s.latency = 2; } } + { + std::map kv; + if (read_kv(file_in("picture.conf"), "GLINT-PICTURE-1", kv, warnings)) { + Reader r{kv, warnings, "picture.conf"}; + PictureSettings& e = s.enhance; + r.integer("profile", e.profile, 0, 4); + r.boolean("protect", e.protect); + r.real("budget_ms", e.budget_ms, 0.5f, 10.0f); + r.integer("upscaler", e.upscaler, 0, 3); + r.real("sharpness", e.sharpness, 0.0f, 1.0f); + r.real("denoise", e.denoise, 0.0f, 1.0f); + r.real("deband", e.deband, 0.0f, 1.0f); + r.real("dither", e.dither, 0.0f, 1.0f); + r.real("exposure", e.exposure, -2.0f, 2.0f); + r.real("saturation", e.saturation, 0.0f, 2.0f); + r.real("shadows", e.shadows, 0.0f, 1.0f); + r.text("active", s.picture_active); + // presetN=name|upscaler|sharpness|denoise|deband|dither|exposure|saturation|shadows + for (int i = 1; i <= kMaxPicturePresets; i++) { + std::string line; + r.text(("preset" + std::to_string(i)).c_str(), line); + if (line.empty()) continue; + std::vector f; + std::stringstream ss(line); + for (std::string part; std::getline(ss, part, '|');) f.push_back(part); + PicturePreset p; + if (f.size() != 9 || f[0].empty()) { + warnings.push_back("picture.conf: preset" + std::to_string(i) + " is not readable"); + continue; + } + p.name = f[0]; + PictureSettings& v = p.values; + auto num = [&](const std::string& t, float lo, float hi, float fallback) { + char* end = nullptr; + double n = std::strtod(t.c_str(), &end); + return (end && *end == 0 && std::isfinite(n) && n >= lo && n <= hi) ? (float)n : fallback; + }; + v.upscaler = (int)num(f[1], 0, 3, (float)v.upscaler); + v.sharpness = num(f[2], 0, 1, v.sharpness); + v.denoise = num(f[3], 0, 1, v.denoise); + v.deband = num(f[4], 0, 1, v.deband); + v.dither = num(f[5], 0, 1, v.dither); + v.exposure = num(f[6], -2, 2, v.exposure); + v.saturation = num(f[7], 0, 2, v.saturation); + v.shadows = num(f[8], 0, 1, v.shadows); + v.profile = 4; // Custom + s.picture_presets.push_back(p); + } + } + } { std::map kv; if (read_kv(file_in("capture.conf"), "GLINT-CAPTURE-1", kv, warnings)) { @@ -263,6 +314,26 @@ bool save_settings(const AppSettings& s, std::string& error) { << (s.gpu_convert ? "gpu" : "cpu") << "\nlatency=" << (s.latency == 2 ? "smooth" : s.latency == 1 ? "balanced" : "lowest") << "\n"; if (!write_file_atomic(path("video.conf"), v.str(), error)) return false; + const PictureSettings& pe = s.enhance; + std::ostringstream q; + q << "GLINT-PICTURE-1\nprofile=" << pe.profile << "\nprotect=" << (pe.protect ? 1 : 0) + << "\nbudget_ms=" << f(pe.budget_ms) << "\nupscaler=" << pe.upscaler << "\nsharpness=" << f(pe.sharpness) + << "\ndenoise=" << f(pe.denoise) << "\ndeband=" << f(pe.deband) << "\ndither=" << f(pe.dither) + << "\nexposure=" << f(pe.exposure) << "\nsaturation=" << f(pe.saturation) << "\nshadows=" << f(pe.shadows) + << "\n"; + if (!s.picture_active.empty()) q << "active=" << s.picture_active << "\n"; + int n = 0; + for (const PicturePreset& p : s.picture_presets) { + if (++n > kMaxPicturePresets) break; + std::string name; + for (char ch : p.name) // the separator and line breaks can't be in a name + if (ch != '|' && ch != '\n' && ch != '\r') name += ch; + const PictureSettings& v = p.values; + q << "preset" << n << "=" << name << "|" << v.upscaler << "|" << f(v.sharpness) << "|" << f(v.denoise) << "|" + << f(v.deband) << "|" << f(v.dither) << "|" << f(v.exposure) << "|" << f(v.saturation) << "|" + << f(v.shadows) << "\n"; + } + if (!write_file_atomic(path("picture.conf"), q.str(), error)) return false; std::ostringstream c; c << "GLINT-CAPTURE-1\nmedia_dir=" << s.media_dir << "\n"; if (!write_file_atomic(path("capture.conf"), c.str(), error)) return false; @@ -277,7 +348,8 @@ bool save_settings(const AppSettings& s, std::string& error) { std::vector shareable_settings_files() { // Never oauth-apps.conf or anything from the vault. - return {"console.conf", "audio.conf", "video.conf", "capture.conf", "window.conf", "destinations.conf"}; + return {"console.conf", "audio.conf", "video.conf", "picture.conf", "capture.conf", "window.conf", + "destinations.conf"}; } } // namespace glint diff --git a/app/src/core/settings.h b/app/src/core/settings.h index af10dc9..6e4ffae 100644 --- a/app/src/core/settings.h +++ b/app/src/core/settings.h @@ -18,6 +18,37 @@ bool is_header(const std::string& line, const char* header); // half-written file. bool write_file_atomic(const std::string& path, const std::string& text, std::string& error); +// Picture enhancement (Settings -> Picture, picture.conf). The profile picks a +// set of values; Custom uses the ones below as the user left them. +struct PictureSettings { + int profile = 2; // 0 Off, 1 Light, 2 Balanced, 3 Enhanced, 4 Custom + bool protect = true; // step the profile down when the GPU goes over budget + float budget_ms = 3.0f; // GPU time allowed for the passes, per frame + int upscaler = 2; // 0 Bilinear, 1 Lanczos, 2 FSR 1, 3 AI + float sharpness = 0.35f; // 0..1 + float denoise = 0.0f; // 0..1 + float deband = 0.25f; // 0..1 + float dither = 0.5f; // 0..1 + float exposure = 0.0f; // EV, -2..2 + float saturation = 1.0f; // 0..2 + float shadows = 0.0f; // 0..1 + + bool operator==(const PictureSettings& o) const { + return profile == o.profile && protect == o.protect && budget_ms == o.budget_ms && upscaler == o.upscaler && + sharpness == o.sharpness && denoise == o.denoise && deband == o.deband && dither == o.dither && + exposure == o.exposure && saturation == o.saturation && shadows == o.shadows; + } +}; + +// A named set of picture values the user saved (Settings -> Picture, My +// presets). Loading one makes it the Custom profile. +struct PicturePreset { + std::string name; + PictureSettings values; + bool operator==(const PicturePreset& o) const { return name == o.name && values == o.values; } +}; +constexpr int kMaxPicturePresets = 20; + // Everything the user changes that should survive a restart. Secrets are not // here: stream keys and tokens live in the vault (destinations.h). struct AppSettings { @@ -37,6 +68,10 @@ struct AppSettings { bool gpu_decode = true; bool gpu_convert = true; int latency = 0; // 0 Lowest, 1 Balanced, 2 Smooth (App::Latency) + // picture.conf + PictureSettings enhance; + std::vector picture_presets; + std::string picture_active; // the user preset last applied, "" for a built-in profile // window.conf int picture = 0; // 0 fit, 1 fill, 2 no upscaling int window_x = INT_MIN; diff --git a/app/src/main.cpp b/app/src/main.cpp index ed835ae..c0a00d0 100644 --- a/app/src/main.cpp +++ b/app/src/main.cpp @@ -200,7 +200,10 @@ static void SetupVulkan(ImVector instance_extensions) { VkDescriptorPoolSize pool_sizes[] = { - { VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 8 }, + // One per texture ImGui draws: the font, the live picture, the + // enhanced picture, the viewer and one per gallery thumbnail. + // 8 ran out once the gallery held a few files (abort on open). + { VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1024 }, }; VkDescriptorPoolCreateInfo pool_info = {}; pool_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO; @@ -408,8 +411,17 @@ struct VideoTexture { int width = 0; int height = 0; bool uploaded = false; + bool live = false; // the console picture: gets the enhancement passes }; +// Picture enhancement passes, recorded after each upload (defined below). +static void enhance_record(VkCommandBuffer cmd, VideoTexture& tex); + +// Bumped whenever a picture image is recreated. Descriptor caches compare +// view handles, and a new view can reuse a freed one's value, so they also +// rebind when this changes. +static uint32_t g_view_generation = 0; + static uint32_t find_memory_type(uint32_t bits, VkMemoryPropertyFlags properties) { VkPhysicalDeviceMemoryProperties mem; @@ -513,7 +525,9 @@ static void destroy_texture(VideoTexture& tex) if (tex.sampler) vkDestroySampler(g_Device, tex.sampler, g_Allocator); if (tex.staging) vkDestroyBuffer(g_Device, tex.staging, g_Allocator); if (tex.staging_memory) vkFreeMemory(g_Device, tex.staging_memory, g_Allocator); + bool live = tex.live; tex = VideoTexture{}; + tex.live = live; } static void ensure_image(VideoTexture& tex, int width, int height) @@ -580,6 +594,7 @@ static void ensure_image(VideoTexture& tex, int width, int height) tex.width = width; tex.height = height; tex.uploaded = false; + g_view_generation++; // a new view can reuse the old handle value: make the converter rebind } static void upload_frame(VideoTexture& tex, const std::vector& rgba, int width, int height) @@ -631,6 +646,7 @@ static void upload_frame(VideoTexture& tex, const std::vector& rgba, in VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, ®ion); image_barrier(cmd, tex.image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL); + enhance_record(cmd, tex); end_once(); tex.uploaded = true; @@ -857,6 +873,7 @@ static void yuv_ensure_plane(YuvPlane& p, int width, int height, VkFormat format p.height = height; p.format = format; p.initialised = false; + g_view_generation++; // the new view may reuse an old handle value } // Converts `pic` (NV12 / I420) into `tex` on the GPU. Returns false if the @@ -900,7 +917,9 @@ static bool upload_yuv(VideoTexture& tex, const glint::Picture& pic) std::memcpy(g_yuv.mapped, pic.data.data(), pic.data.size()); VkImageView want[4] = {tex.view, g_yuv.planes[0].view, g_yuv.planes[1].view, g_yuv.planes[2].view}; - if (std::memcmp(want, g_yuv.bound, sizeof(want)) != 0) { + static uint32_t bound_generation = 0; + if (std::memcmp(want, g_yuv.bound, sizeof(want)) != 0 || bound_generation != g_view_generation) { + bound_generation = g_view_generation; VkDescriptorImageInfo images[4] = {}; images[0] = {VK_NULL_HANDLE, tex.view, VK_IMAGE_LAYOUT_GENERAL}; images[1] = {g_yuv.nearest, g_yuv.planes[0].view, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL}; @@ -953,6 +972,7 @@ static bool upload_yuv(VideoTexture& tex, const glint::Picture& pic) vkCmdDispatch(cmd, (uint32_t)(w + 15) / 16, (uint32_t)(h + 15) / 16, 1); layout_barrier(cmd, tex.image, VK_IMAGE_LAYOUT_GENERAL, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, VK_ACCESS_SHADER_WRITE_BIT, VK_ACCESS_SHADER_READ_BIT); + enhance_record(cmd, tex); end_once(); tex.uploaded = true; @@ -1002,6 +1022,511 @@ static bool read_texture(VideoTexture& tex, std::vector& rgba) return true; } +// --------------------------------------------------------------------------- +// Picture enhancement (Settings -> Picture): compute passes between the +// converted picture and the screen, recorded into the same command buffer as +// the upload, so they add no CPU wait. +// pre cleanup + colour at the stream's size (live tex -> a) +// scale upscale to the window's pixel size (a -> b), only when larger +// final sharpen, compare split, dither (b or a -> out) +// Off draws the converted picture as before: no passes, no cost. +// --------------------------------------------------------------------------- + +static const uint32_t kEnhancePreSpv[] = +#include "shaders/enhance_pre.spv.inc" +; +static const uint32_t kEnhanceScaleSpv[] = +#include "shaders/enhance_scale.spv.inc" +; +static const uint32_t kEnhanceFinalSpv[] = +#include "shaders/enhance_final.spv.inc" +; +static const uint32_t kEnhanceEasuSpv[] = +#include "shaders/enhance_easu.spv.inc" +; +static const uint32_t kFsrcnnxLumaSpv[] = +#include "shaders/fsrcnnx_luma.spv.inc" +; +static const uint32_t kFsrcnnxOutSpv[] = +#include "shaders/fsrcnnx_out.spv.inc" +; + +// One FSRCNNX layer (tools/gen_fsrcnnx.js): reads up to three named images at +// the stream's size, writes one. +struct FsrcnnxLayer { + const char* desc; + const uint32_t* spv; + size_t bytes; + const char* save; + const char* binds[3]; +}; +#include "shaders/fsrcnnx/passes.inc" +constexpr int kFsrcnnxLayerCount = (int)(sizeof(kFsrcnnxLayers) / sizeof(kFsrcnnxLayers[0])); +// The images the layers read and write (mpv's names), all RGBA16F. +static const char* const kFsrcnnxImages[] = {"LUMA", "FEATURE1", "FEATURE2", "MODEL21", "MODEL22", + "MODEL1", "MODEL2", "RES1", "RES2", "SUBCONV1"}; +constexpr int kFsrcnnxImageCount = (int)(sizeof(kFsrcnnxImages) / sizeof(kFsrcnnxImages[0])); + +enum Upscaler { UpscaleBilinear, UpscaleLanczos, UpscaleFsr, UpscaleAi }; +static const char* const kUpscalerNames[] = {"Bilinear", "Lanczos", "FSR 1", "AI"}; + +// What the passes do this frame, resolved from the profile (or Custom). +struct EnhanceParams { + bool active = false; + int upscaler = 0; // Upscaler + float sharpness = 0, denoise = 0, deband = 0, dither = 0; + float exposure = 0, saturation = 1, shadows = 0; +}; + +struct EnhanceImage { + VkImage image = VK_NULL_HANDLE; + VkDeviceMemory memory = VK_NULL_HANDLE; + VkImageView view = VK_NULL_HANDLE; + int width = 0, height = 0; + VkFormat format = VK_FORMAT_UNDEFINED; + bool initialised = false; // has been written once (layout SHADER_READ_ONLY) +}; + +// Pipelines; the FSRCNNX layers follow EnhanceNet. +enum { EnhancePre, EnhanceScale, EnhanceFinal, EnhanceEasu, EnhanceAiLuma, EnhanceAiOut, EnhanceNet }; +constexpr int kEnhancePipelines = EnhanceNet + kFsrcnnxLayerCount; + +struct Enhancer { + bool tried = false, available = false; + std::string error; + VkDescriptorSetLayout set_layout = VK_NULL_HANDLE; + VkPipelineLayout pipeline_layout = VK_NULL_HANDLE; + VkPipeline pipelines[kEnhancePipelines] = {}; + VkDescriptorPool pool = VK_NULL_HANDLE; + VkDescriptorSet sets[kEnhancePipelines] = {}; // one per pipeline: each runs once a frame + VkImageView bound[kEnhancePipelines][4] = {}; + VkSampler nearest = VK_NULL_HANDLE, linear = VK_NULL_HANDLE; + EnhanceImage a, b, out, ai2x; + EnhanceImage net[kFsrcnnxImageCount]; + VkDescriptorSet out_descriptor = VK_NULL_HANDLE; // `out` for ImGui + // GPU time of the passes, from timestamps read one frame later. + VkQueryPool queries = VK_NULL_HANDLE; + float timestamp_ns = 0.0f; + bool query_pending = false; + float gpu_ms = 0.0f; // smoothed + // This frame's settings and the window's pixel size for the picture + // (set by the UI, used by the next upload). + EnhanceParams params; + int want_w = 0, want_h = 0; + uint32_t frame = 0; + bool shown = false; // `out` holds the current frame: draw it instead of the live texture + int used_upscaler = -1; // what last frame's upscale really was (-1: none, window not larger) + float split = 0.0f; // compare split, 0 = off +}; +static Enhancer g_enh; + +// Side-by-side compare (Settings -> Picture, or C): the same spot of the +// original and the enhanced picture next to each other, zoomed and panned +// together. +struct Compare { + bool on = false; + float zoom = 1.0f; // 1 = the whole picture fits a panel + ImVec2 center = {0.5f, 0.5f}; // middle of the view, in picture UV + bool dragging = false; +}; +static Compare g_compare; +static bool g_tweaks_open = false; // side by side's control panel (X) + +static bool enhance_init() +{ + if (g_enh.tried) return g_enh.available; + g_enh.tried = true; + if (!yuv_converter_init()) { // same requirements: compute on the graphics queue, RGBA storage images + g_enh.error = g_yuv.error; + return false; + } + VkFormatProperties fp; + vkGetPhysicalDeviceFormatProperties(g_PhysicalDevice, VK_FORMAT_R16G16B16A16_SFLOAT, &fp); + bool half_storage = (fp.optimalTilingFeatures & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT) != 0; + + VkSamplerCreateInfo si = {}; + si.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO; + si.addressModeU = si.addressModeV = si.addressModeW = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; + si.magFilter = si.minFilter = VK_FILTER_NEAREST; + if (vkCreateSampler(g_Device, &si, g_Allocator, &g_enh.nearest) != VK_SUCCESS) return false; + si.magFilter = si.minFilter = VK_FILTER_LINEAR; + if (vkCreateSampler(g_Device, &si, g_Allocator, &g_enh.linear) != VK_SUCCESS) return false; + + // One layout for every pass: the output, then up to three inputs. + VkDescriptorSetLayoutBinding bindings[4] = {}; + for (int i = 0; i < 4; i++) { + bindings[i].binding = (uint32_t)i; + bindings[i].descriptorType = i == 0 ? VK_DESCRIPTOR_TYPE_STORAGE_IMAGE : VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; + bindings[i].descriptorCount = 1; + bindings[i].stageFlags = VK_SHADER_STAGE_COMPUTE_BIT; + } + VkDescriptorSetLayoutCreateInfo dl = {}; + dl.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; + dl.bindingCount = 4; + dl.pBindings = bindings; + if (vkCreateDescriptorSetLayout(g_Device, &dl, g_Allocator, &g_enh.set_layout) != VK_SUCCESS) return false; + VkPushConstantRange pc = {VK_SHADER_STAGE_COMPUTE_BIT, 0, 64}; + VkPipelineLayoutCreateInfo pl = {}; + pl.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; + pl.setLayoutCount = 1; + pl.pSetLayouts = &g_enh.set_layout; + pl.pushConstantRangeCount = 1; + pl.pPushConstantRanges = &pc; + if (vkCreatePipelineLayout(g_Device, &pl, g_Allocator, &g_enh.pipeline_layout) != VK_SUCCESS) return false; + + struct Code { const uint32_t* words; size_t bytes; }; + Code code[kEnhancePipelines] = {{kEnhancePreSpv, sizeof(kEnhancePreSpv)}, {kEnhanceScaleSpv, sizeof(kEnhanceScaleSpv)}, + {kEnhanceFinalSpv, sizeof(kEnhanceFinalSpv)}, {kEnhanceEasuSpv, sizeof(kEnhanceEasuSpv)}, + {kFsrcnnxLumaSpv, sizeof(kFsrcnnxLumaSpv)}, {kFsrcnnxOutSpv, sizeof(kFsrcnnxOutSpv)}}; + for (int i = 0; i < kFsrcnnxLayerCount; i++) code[EnhanceNet + i] = {kFsrcnnxLayers[i].spv, kFsrcnnxLayers[i].bytes}; + for (int i = 0; i < kEnhancePipelines; i++) { + if (!half_storage && (i == EnhanceAiLuma || i >= EnhanceNet)) continue; // AI needs RGBA16F storage + VkShaderModuleCreateInfo sm = {}; + sm.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO; + sm.codeSize = code[i].bytes; + sm.pCode = code[i].words; + VkShaderModule module = VK_NULL_HANDLE; + if (vkCreateShaderModule(g_Device, &sm, g_Allocator, &module) != VK_SUCCESS) { + g_enh.error = "cannot load the picture shaders"; + return false; + } + VkComputePipelineCreateInfo cp = {}; + cp.sType = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO; + cp.stage.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO; + cp.stage.stage = VK_SHADER_STAGE_COMPUTE_BIT; + cp.stage.module = module; + cp.stage.pName = "main"; + cp.layout = g_enh.pipeline_layout; + VkResult r = vkCreateComputePipelines(g_Device, g_PipelineCache, 1, &cp, g_Allocator, &g_enh.pipelines[i]); + vkDestroyShaderModule(g_Device, module, g_Allocator); + if (r != VK_SUCCESS) { + g_enh.error = "cannot create the picture pipelines"; + return false; + } + } + + VkDescriptorPoolSize sizes[2] = {{VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, (uint32_t)kEnhancePipelines}, + {VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 3u * kEnhancePipelines}}; + VkDescriptorPoolCreateInfo dp = {}; + dp.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO; + dp.maxSets = kEnhancePipelines; + dp.poolSizeCount = 2; + dp.pPoolSizes = sizes; + if (vkCreateDescriptorPool(g_Device, &dp, g_Allocator, &g_enh.pool) != VK_SUCCESS) return false; + std::vector layouts(kEnhancePipelines, g_enh.set_layout); + VkDescriptorSetAllocateInfo da = {}; + da.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; + da.descriptorPool = g_enh.pool; + da.descriptorSetCount = kEnhancePipelines; + da.pSetLayouts = layouts.data(); + if (vkAllocateDescriptorSets(g_Device, &da, g_enh.sets) != VK_SUCCESS) return false; + + // GPU timing, where the queue supports timestamps. + VkPhysicalDeviceProperties props; + vkGetPhysicalDeviceProperties(g_PhysicalDevice, &props); + uint32_t count = 0; + vkGetPhysicalDeviceQueueFamilyProperties(g_PhysicalDevice, &count, nullptr); + std::vector families(count); + vkGetPhysicalDeviceQueueFamilyProperties(g_PhysicalDevice, &count, families.data()); + if (g_QueueFamily < count && families[g_QueueFamily].timestampValidBits > 0 && props.limits.timestampPeriod > 0) { + VkQueryPoolCreateInfo qi = {}; + qi.sType = VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO; + qi.queryType = VK_QUERY_TYPE_TIMESTAMP; + qi.queryCount = 2; + if (vkCreateQueryPool(g_Device, &qi, g_Allocator, &g_enh.queries) == VK_SUCCESS) + g_enh.timestamp_ns = props.limits.timestampPeriod; + } + g_enh.available = true; + return true; +} + +// The AI upscaler can run here (RGBA16F storage images are supported). +static bool enhance_ai_available() +{ + return enhance_init() && g_enh.pipelines[EnhanceNet] != VK_NULL_HANDLE; +} + +static void enhance_destroy_image(EnhanceImage& im) +{ + if (im.view) vkDestroyImageView(g_Device, im.view, g_Allocator); + if (im.image) vkDestroyImage(g_Device, im.image, g_Allocator); + if (im.memory) vkFreeMemory(g_Device, im.memory, g_Allocator); + im = EnhanceImage{}; +} + +static void enhance_destroy() +{ + if (g_Device == VK_NULL_HANDLE || !g_enh.tried) return; + vkDeviceWaitIdle(g_Device); + if (g_enh.out_descriptor) ImGui_ImplVulkan_RemoveTexture(g_enh.out_descriptor); + for (EnhanceImage* im : {&g_enh.a, &g_enh.b, &g_enh.out, &g_enh.ai2x}) enhance_destroy_image(*im); + for (EnhanceImage& im : g_enh.net) enhance_destroy_image(im); + if (g_enh.queries) vkDestroyQueryPool(g_Device, g_enh.queries, g_Allocator); + if (g_enh.pool) vkDestroyDescriptorPool(g_Device, g_enh.pool, g_Allocator); + for (VkPipeline p : g_enh.pipelines) + if (p) vkDestroyPipeline(g_Device, p, g_Allocator); + if (g_enh.pipeline_layout) vkDestroyPipelineLayout(g_Device, g_enh.pipeline_layout, g_Allocator); + if (g_enh.set_layout) vkDestroyDescriptorSetLayout(g_Device, g_enh.set_layout, g_Allocator); + if (g_enh.nearest) vkDestroySampler(g_Device, g_enh.nearest, g_Allocator); + if (g_enh.linear) vkDestroySampler(g_Device, g_enh.linear, g_Allocator); + g_enh = Enhancer{}; +} + +// (Re)creates `im` at the size and format. Returns true if it changed. +static bool enhance_ensure_image(EnhanceImage& im, int width, int height, + VkFormat format = VK_FORMAT_R8G8B8A8_UNORM) +{ + if (im.image && im.width == width && im.height == height && im.format == format) return false; + // A new view can get the old one's handle value: forget what every set was + // bound to, or enhance_bind would skip the update and leave the set + // pointing at freed memory (device lost when zooming fast). + std::memset(g_enh.bound, 0, sizeof(g_enh.bound)); + g_view_generation++; + if (im.image) { + vkDeviceWaitIdle(g_Device); // the old image may still be in flight + if (&im == &g_enh.out && g_enh.out_descriptor) { + ImGui_ImplVulkan_RemoveTexture(g_enh.out_descriptor); + g_enh.out_descriptor = VK_NULL_HANDLE; + } + } + enhance_destroy_image(im); + VkImageCreateInfo info = {}; + info.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO; + info.imageType = VK_IMAGE_TYPE_2D; + info.format = format; + info.extent = {(uint32_t)width, (uint32_t)height, 1}; + info.mipLevels = 1; + info.arrayLayers = 1; + info.samples = VK_SAMPLE_COUNT_1_BIT; + info.tiling = VK_IMAGE_TILING_OPTIMAL; + info.usage = VK_IMAGE_USAGE_STORAGE_BIT | VK_IMAGE_USAGE_SAMPLED_BIT | + VK_IMAGE_USAGE_TRANSFER_SRC_BIT; // transfer: GLINT_PICTURE_DUMP reads it back + info.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; + check_vk_result(vkCreateImage(g_Device, &info, g_Allocator, &im.image)); + VkMemoryRequirements req; + vkGetImageMemoryRequirements(g_Device, im.image, &req); + VkMemoryAllocateInfo alloc = {}; + alloc.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; + alloc.allocationSize = req.size; + alloc.memoryTypeIndex = find_memory_type(req.memoryTypeBits, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT); + check_vk_result(vkAllocateMemory(g_Device, &alloc, g_Allocator, &im.memory)); + check_vk_result(vkBindImageMemory(g_Device, im.image, im.memory, 0)); + VkImageViewCreateInfo view = {}; + view.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO; + view.image = im.image; + view.viewType = VK_IMAGE_VIEW_TYPE_2D; + view.format = format; + view.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; + view.subresourceRange.levelCount = 1; + view.subresourceRange.layerCount = 1; + check_vk_result(vkCreateImageView(g_Device, &view, g_Allocator, &im.view)); + im.width = width; + im.height = height; + im.format = format; + return true; +} + +// An input of a pass: an image read through a sampler. +struct EnhanceInput { VkImageView view; VkSampler sampler; }; + +// Points pipeline `pass` at its output and inputs (only when they changed). +// Unused inputs repeat the first, so every binding is valid. +static void enhance_bind(int pass, VkImageView out, EnhanceInput in0, EnhanceInput in1 = {}, EnhanceInput in2 = {}) +{ + if (!in1.view) in1 = in0; + if (!in2.view) in2 = in0; + VkImageView want[4] = {out, in0.view, in1.view, in2.view}; + if (std::memcmp(want, g_enh.bound[pass], sizeof(want)) == 0) return; + vkDeviceWaitIdle(g_Device); // the set may be in use by a frame in flight + VkDescriptorImageInfo images[4] = {{VK_NULL_HANDLE, out, VK_IMAGE_LAYOUT_GENERAL}, + {in0.sampler, in0.view, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL}, + {in1.sampler, in1.view, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL}, + {in2.sampler, in2.view, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL}}; + VkWriteDescriptorSet writes[4] = {}; + for (int i = 0; i < 4; i++) { + writes[i].sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; + writes[i].dstSet = g_enh.sets[pass]; + writes[i].dstBinding = (uint32_t)i; + writes[i].descriptorCount = 1; + writes[i].descriptorType = i == 0 ? VK_DESCRIPTOR_TYPE_STORAGE_IMAGE : VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; + writes[i].pImageInfo = &images[i]; + } + vkUpdateDescriptorSets(g_Device, 4, writes, 0, nullptr); + std::memcpy(g_enh.bound[pass], want, sizeof(want)); +} + +static void enhance_dispatch(VkCommandBuffer cmd, int pass, EnhanceImage& out, const void* params, uint32_t bytes) +{ + layout_barrier(cmd, out.image, out.initialised ? VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL : VK_IMAGE_LAYOUT_UNDEFINED, + VK_IMAGE_LAYOUT_GENERAL, VK_ACCESS_SHADER_READ_BIT, VK_ACCESS_SHADER_WRITE_BIT); + vkCmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_COMPUTE, g_enh.pipelines[pass]); + vkCmdBindDescriptorSets(cmd, VK_PIPELINE_BIND_POINT_COMPUTE, g_enh.pipeline_layout, 0, 1, &g_enh.sets[pass], 0, + nullptr); + vkCmdPushConstants(cmd, g_enh.pipeline_layout, VK_SHADER_STAGE_COMPUTE_BIT, 0, bytes, params); + vkCmdDispatch(cmd, (uint32_t)(out.width + 15) / 16, (uint32_t)(out.height + 15) / 16, 1); + layout_barrier(cmd, out.image, VK_IMAGE_LAYOUT_GENERAL, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, + VK_ACCESS_SHADER_WRITE_BIT, VK_ACCESS_SHADER_READ_BIT); + out.initialised = true; +} + +static EnhanceImage& enhance_net_image(const char* name) +{ + for (int i = 0; i < kFsrcnnxImageCount; i++) + if (std::strcmp(kFsrcnnxImages[i], name) == 0) return g_enh.net[i]; + return g_enh.net[0]; // not reached: gen_fsrcnnx.js only emits these names +} + +// FSRCNNX: luma -> 13 network layers -> 2x picture in `ai2x`. +static void enhance_record_ai(VkCommandBuffer cmd, int sw, int sh) +{ + for (EnhanceImage& im : g_enh.net) enhance_ensure_image(im, sw, sh, VK_FORMAT_R16G16B16A16_SFLOAT); + enhance_ensure_image(g_enh.ai2x, sw * 2, sh * 2); + struct { int32_t w, h; } size = {sw, sh}; + enhance_bind(EnhanceAiLuma, enhance_net_image("LUMA").view, {g_enh.a.view, g_enh.nearest}); + enhance_dispatch(cmd, EnhanceAiLuma, enhance_net_image("LUMA"), &size, sizeof(size)); + for (int i = 0; i < kFsrcnnxLayerCount; i++) { + const FsrcnnxLayer& layer = kFsrcnnxLayers[i]; + EnhanceInput in[3] = {}; + for (int k = 0; k < 3; k++) + if (layer.binds[k]) in[k] = {enhance_net_image(layer.binds[k]).view, g_enh.nearest}; + EnhanceImage& out = enhance_net_image(layer.save); + enhance_bind(EnhanceNet + i, out.view, in[0], in[1], in[2]); + enhance_dispatch(cmd, EnhanceNet + i, out, &size, sizeof(size)); + } + enhance_bind(EnhanceAiOut, g_enh.ai2x.view, {enhance_net_image("SUBCONV1").view, g_enh.nearest}, + {g_enh.a.view, g_enh.linear}); + enhance_dispatch(cmd, EnhanceAiOut, g_enh.ai2x, &size, sizeof(size)); +} + +static void enhance_record(VkCommandBuffer cmd, VideoTexture& tex) +{ + const EnhanceParams& p = g_enh.params; + if (!tex.live || !p.active || tex.width <= 0 || !enhance_init()) { + g_enh.shown = false; + return; + } + // Last frame's GPU time (its command buffer has finished: begin_once waited for it). + if (g_enh.query_pending) { + uint64_t t[2] = {}; + if (vkGetQueryPoolResults(g_Device, g_enh.queries, 0, 2, sizeof(t), t, sizeof(uint64_t), + VK_QUERY_RESULT_64_BIT) == VK_SUCCESS && t[1] >= t[0]) { + float ms = (float)((double)(t[1] - t[0]) * g_enh.timestamp_ns / 1e6); + g_enh.gpu_ms = g_enh.gpu_ms <= 0.0f ? ms : g_enh.gpu_ms * 0.9f + ms * 0.1f; + } + g_enh.query_pending = false; + } + + const int sw = tex.width, sh = tex.height; + // Testing the upscalers on a screen no larger than the stream: + // GLINT_PICTURE_TARGET=3840x2160 forces the output size. + static int force_w = -1, force_h = 0; + if (force_w < 0) { + force_w = 0; + if (const char* e = std::getenv("GLINT_PICTURE_TARGET")) std::sscanf(e, "%dx%d", &force_w, &force_h); + } + // Upscale only when the window shows the picture larger than the stream + // (capped at 4K); otherwise the passes run at the stream's size. + int want_w = force_w > 0 ? force_w : g_enh.want_w, want_h = force_h > 0 ? force_h : g_enh.want_h; + // Resizing recreates the images (and waits for the GPU), so follow a + // changing size (zooming, dragging the window) only in 32-pixel steps and + // once it has held still for 0.15 s; meanwhile the last size is scaled. + { + static int held_w = 0, held_h = 0, pending_w = 0, pending_h = 0; + static double pending_since = 0.0; + int qw = (want_w + 16) / 32 * 32, qh = (want_h + 16) / 32 * 32; + double now = glfwGetTime(); + if (held_w == 0 || !g_enh.out.image) { + held_w = qw; held_h = qh; + } else if (qw != held_w || qh != held_h) { + if (qw != pending_w || qh != pending_h) { pending_w = qw; pending_h = qh; pending_since = now; } + else if (now - pending_since > 0.15) { held_w = qw; held_h = qh; } + } + want_w = held_w; + want_h = held_h; + } + int tw = std::min(std::max(want_w, sw), 3840), th = std::min(std::max(want_h, sh), 2160); + bool scale = tw > sw + 1 || th > sh + 1; + if (!scale) { tw = sw; th = sh; } + // The AI upscaler doubles; like mpv's FSRCNNX it is only worth it from 1.3x + // on, below that Lanczos does as well. + int upscaler = p.upscaler; + if (upscaler == UpscaleAi && (!enhance_ai_available() || tw < sw * 1.3f || th < sh * 1.3f)) + upscaler = UpscaleLanczos; + g_enh.used_upscaler = scale ? upscaler : -1; + + enhance_ensure_image(g_enh.a, sw, sh); + if (enhance_ensure_image(g_enh.out, tw, th) || !g_enh.out_descriptor) + g_enh.out_descriptor = ImGui_ImplVulkan_AddTexture(g_enh.linear, g_enh.out.view, + VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL); + + if (g_enh.queries) { + vkCmdResetQueryPool(cmd, g_enh.queries, 0, 2); + vkCmdWriteTimestamp(cmd, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, g_enh.queries, 0); + } + g_enh.frame++; + + enhance_bind(EnhancePre, g_enh.a.view, {tex.view, g_enh.nearest}); + struct { int32_t w, h; float denoise, deband, exposure, saturation, shadows; uint32_t frame; } pre = { + sw, sh, p.denoise, p.deband, p.exposure, p.saturation, p.shadows, g_enh.frame}; + enhance_dispatch(cmd, EnhancePre, g_enh.a, &pre, sizeof(pre)); + + EnhanceImage* processed = &g_enh.a; + if (scale) { + EnhanceImage* from = &g_enh.a; + int fw = sw, fh = sh; + if (upscaler == UpscaleAi) { + enhance_record_ai(cmd, sw, sh); + from = &g_enh.ai2x; + fw = sw * 2; + fh = sh * 2; + } + if (from->width == tw && from->height == th) { // the AI's 2x is exactly the window + processed = from; + } else { + enhance_ensure_image(g_enh.b, tw, th); + struct { int32_t sw, sh, dw, dh, mode; } sc = {fw, fh, tw, th, upscaler == UpscaleBilinear ? 0 : 1}; + if (upscaler == UpscaleFsr) { + enhance_bind(EnhanceEasu, g_enh.b.view, {from->view, g_enh.linear}); + enhance_dispatch(cmd, EnhanceEasu, g_enh.b, &sc, 16); + } else { + enhance_bind(EnhanceScale, g_enh.b.view, {from->view, g_enh.linear}); + enhance_dispatch(cmd, EnhanceScale, g_enh.b, &sc, sizeof(sc)); + } + processed = &g_enh.b; + } + } + + enhance_bind(EnhanceFinal, g_enh.out.view, {processed->view, g_enh.nearest}, {tex.view, g_enh.linear}); + struct { int32_t w, h; float sharpness, dither, split; uint32_t frame; } fin = { + tw, th, p.sharpness, p.dither, g_compare.on ? 0.0f : g_enh.split, g_enh.frame}; + enhance_dispatch(cmd, EnhanceFinal, g_enh.out, &fin, sizeof(fin)); + + if (g_enh.queries) { + vkCmdWriteTimestamp(cmd, VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, g_enh.queries, 1); + g_enh.query_pending = true; + } + g_enh.shown = true; +} + +// Testing: GLINT_PICTURE_DUMP= saves the enhanced picture as a PNG +// every 300 frames (about 5 s), to inspect the upscalers pixel for pixel. +static void enhance_dump_maybe() +{ + static const char* dir = std::getenv("GLINT_PICTURE_DUMP"); + static uint32_t last = 0; + if (!dir || !g_enh.shown || !g_enh.out.image || g_enh.frame - last < 300) return; + last = g_enh.frame; + VideoTexture view; // read_texture only needs the image and its size + view.image = g_enh.out.image; + view.width = g_enh.out.width; + view.height = g_enh.out.height; + std::vector rgba; + std::string path, error; + if (read_texture(view, rgba) && glint::save_screenshot(dir, rgba, view.width, view.height, path, error)) + glint::logf("picture dump: %s (%s, %.2f ms GPU)", path.c_str(), + g_enh.used_upscaler >= 0 ? kUpscalerNames[g_enh.used_upscaler] : "no upscaling", g_enh.gpu_ms); +} + // Shows a decoded picture: GPU conversion when possible, else the CPU. static void present_picture(VideoTexture& tex, const glint::Picture& pic, glint::App& app) { @@ -1923,6 +2448,28 @@ static void gallery_refresh(glint::App& app) g_gallery.loaded = true; g_thumbs.failed.clear(); // a file that was still being written may decode now g_thumbs.prune = true; + // A selected file that is gone (deleted outside Glint) is no longer selected. + if (!g_gallery.selected.empty() && + std::none_of(g_gallery.items.begin(), g_gallery.items.end(), + [](const glint::GalleryItem& it) { return it.path == g_gallery.selected; })) + g_gallery.selected.clear(); +} + +// The media folder is watched while the gallery is open, so files added, +// deleted or renamed outside Glint (Explorer) show up too. A recording being +// written changes it constantly: re-read at most once a second. +static void gallery_follow_folder(glint::App& app) +{ + static glint::FolderWatch watch; + static double dirty_since = -1.0, last_refresh = -10.0; + watch.watch(app.media_dir()); + double now = ImGui::GetTime(); + if (watch.changed() && dirty_since < 0) dirty_since = now; + if (dirty_since >= 0 && now - last_refresh >= 1.0) { + g_gallery.loaded = false; + dirty_since = -1.0; + last_refresh = now; + } } static std::string base_name(const std::string& path) @@ -2371,29 +2918,27 @@ static void draw_viewer(glint::App& app) ImGui::SetCursorScreenPos(ImVec2(vx + px(44), cy - px(13))); if (slider("##vvol", &vol, 0.0f, 2.0f, "%.0f%%", 100.0f, vol_w, player.has_audio())) player.set_volume(vol); } else if (have) { - // Bottom: zoom for screenshots. - float bh = px(44); - const char* labels[2] = {"Fit", "100%"}; - float w1 = button_width(nullptr, labels[0]), w2 = button_width(nullptr, labels[1]); - float bw = w1 + w2 + px(6) * 3; - ImVec2 bp(vp->Pos.x + (vp->Size.x - bw) * 0.5f, vp->Pos.y + vp->Size.y - m - bh - px(6)); - dl->AddRectFilled(bp, bp + ImVec2(bw, bh + px(12)), ink(C.glass), (bh + px(12)) * 0.5f); - dl->AddRect(bp, bp + ImVec2(bw, bh + px(12)), ink(C.glass_border), (bh + px(12)) * 0.5f); - on_controls |= ImGui::IsMouseHoveringRect(bp, bp + ImVec2(bw, bh + px(12))); + // Bottom: zoom for screenshots. A switch with one choice lit: + // Fit, 100 % (actual pixels), or neither while zoomed elsewhere. + // When the picture fits at 100 % (a 1080p screenshot on a 1080p + // screen) both are the same zoom, and Fit is the one lit. + static const char* labels[2] = {"Fit", "100%"}; float one = 1.0f / fit; // zoom at which one picture pixel is one screen pixel - bool at_fit = std::fabs(g_viewer.zoom - 1.0f) < 0.01f, at_one = std::fabs(g_viewer.zoom - one) < 0.01f; - ImGui::SetCursorScreenPos(bp + ImVec2(px(6), px(6))); - if (button("##vfit", nullptr, labels[0], at_fit ? Kind::GlassOn : Kind::Ghost, ImVec2(w1, bh))) { - g_viewer.zoom = 1.0f; + bool at_fit = std::fabs(g_viewer.zoom - 1.0f) < 0.01f; + bool at_one = !at_fit && std::fabs(g_viewer.zoom - one) < 0.01f; + int pick = at_fit ? 0 : at_one ? 1 : -1; + float sw = segmented_width(labels, 2, px(64)); + float pad = px(6), h = px(34) + pad * 2; + ImVec2 bp(vp->Pos.x + (vp->Size.x - sw - pad * 2) * 0.5f, vp->Pos.y + vp->Size.y - m - h); + dl->AddRectFilled(bp, bp + ImVec2(sw + pad * 2, h), ink(C.glass), px(12)); + dl->AddRect(bp, bp + ImVec2(sw + pad * 2, h), ink(C.glass_border), px(12)); + on_controls |= ImGui::IsMouseHoveringRect(bp, bp + ImVec2(sw + pad * 2, h)); + ImGui::SetCursorScreenPos(bp + ImVec2(pad, pad)); + if (segmented("##vzoom", &pick, labels, 2, px(64))) { + g_viewer.zoom = pick == 0 ? 1.0f : std::max(1.0f, one); g_viewer.pan = ImVec2(0, 0); } - tip("Fit the window (double-click)"); - ImGui::SetCursorScreenPos(bp + ImVec2(px(12) + w1, px(6))); - if (button("##vone", nullptr, labels[1], at_one ? Kind::GlassOn : Kind::Ghost, ImVec2(w2, bh))) { - g_viewer.zoom = std::max(1.0f, one); - g_viewer.pan = ImVec2(0, 0); - } - tip("Actual pixels (scroll to zoom, drag to move)"); + tip("Fit the window or show actual pixels. Scroll to zoom, drag to move, double-click to switch."); } ImGui::PopStyleVar(); } @@ -2401,6 +2946,17 @@ static void draw_viewer(glint::App& app) // Pointer on the picture: click plays/pauses a recording; on a screenshot, // scroll zooms around the pointer, drag pans, double-click toggles 100 %. bool on_picture = !on_controls && ImGui::IsWindowHovered() && !ImGui::IsAnyItemHovered() && !ImGui::IsAnyItemActive(); + // Panning a zoomed screenshot, like any image viewer: press anywhere on + // the picture (not on the controls) and drag; it pans until the button is + // let go, even when the pointer crosses the controls. + static bool dragging = false; + if (have && !g_viewer.video && !on_controls && ImGui::IsWindowHovered() && ImGui::IsMouseClicked(ImGuiMouseButton_Left)) + dragging = true; + if (!ImGui::IsMouseDown(ImGuiMouseButton_Left)) dragging = false; + if (dragging && g_viewer.zoom > 1.0f) { + g_viewer.pan = g_viewer.pan + io.MouseDelta; + ImGui::SetMouseCursor(ImGuiMouseCursor_ResizeAll); + } if (on_picture && have) { if (g_viewer.video) { if (ImGui::IsMouseClicked(ImGuiMouseButton_Left)) { @@ -2414,10 +2970,6 @@ static void draw_viewer(glint::App& app) ImVec2 rel = io.MousePos - center - g_viewer.pan; g_viewer.pan = g_viewer.pan - rel * (g_viewer.zoom / old - 1.0f); } - if (ImGui::IsMouseDragging(ImGuiMouseButton_Left) && g_viewer.zoom > 1.0f) { - g_viewer.pan = g_viewer.pan + io.MouseDelta; - ImGui::SetMouseCursor(ImGuiMouseCursor_ResizeAll); - } if (ImGui::IsMouseDoubleClicked(ImGuiMouseButton_Left)) { float one = 1.0f / fit; g_viewer.zoom = g_viewer.zoom > 1.01f ? 1.0f : std::max(1.0f, one); @@ -2447,11 +2999,18 @@ static Link link_state(glint::App& app) return Link::Connecting; } +// A failed link because another viewer took the stream (the console streams to +// one viewer at a time), not because the console can't be reached. +static bool watched_elsewhere(glint::App& app) +{ + return app.error().find("open in a browser or on another PC") != std::string::npos; +} + // Settings tabs. The gallery is its own overlay (draw_gallery). #if SL_LIVE_STREAMING -enum Page { PageConsole, PageVideo, PageAudio, PageCapture, PageStreaming, PageHelp, PageCount }; +enum Page { PageConsole, PageVideo, PagePicture, PageAudio, PageCapture, PageStreaming, PageHelp, PageCount }; #else -enum Page { PageConsole, PageVideo, PageAudio, PageCapture, PageHelp, PageCount }; +enum Page { PageConsole, PageVideo, PagePicture, PageAudio, PageCapture, PageHelp, PageCount }; #endif struct Shell { @@ -2587,6 +3146,11 @@ static void handle_shortcuts(glint::App& app) } if (ImGui::IsKeyPressed(ImGuiKey_S, false)) do_screenshot(app); if (ImGui::IsKeyPressed(ImGuiKey_R, false)) toggle_local_recording(app); + if (ImGui::IsKeyPressed(ImGuiKey_C, false)) { + g_compare.on = !g_compare.on; + ui::toast(g_compare.on ? "Side by side: scroll to zoom, drag to move. X to tweak, C to leave." : "Side by side off", 0); + } + if (ImGui::IsKeyPressed(ImGuiKey_X, false) && g_compare.on) g_tweaks_open = !g_tweaks_open; } // --------------------------------------------------------------------------- @@ -2615,7 +3179,7 @@ static void page_console(glint::App& app) Link link = link_state(app); const char* state = link == Link::Live ? "Live" : link == Link::Connecting ? "Connecting" - : link == Link::Failed ? "Unreachable" : "Offline"; + : link == Link::Failed ? (watched_elsewhere(app) ? "Elsewhere" : "Unreachable") : "Offline"; ImU32 fg = link == Link::Live ? C.success : link == Link::Connecting ? C.warn : link == Link::Failed ? C.danger : C.faint; ImU32 bg = link == Link::Live ? C.success_soft : link == Link::Connecting ? C.warn_soft @@ -2650,8 +3214,7 @@ static void page_console(glint::App& app) row_end(); float rx_fps = 0.0f, rx_kbps = 0.0f; app.received_rate(rx_fps, rx_kbps); - std::snprintf(line, sizeof(line), "%.1f fps, %.2f Mbit/s received (last 2 s), %d viewer(s) on the console", - rx_fps, rx_kbps / 1000.0, status.clients); + std::snprintf(line, sizeof(line), "%.1f fps, %.2f Mbit/s received (last 2 s)", rx_fps, rx_kbps / 1000.0); row_begin("Throughput", line, 0, 20); row_end(); std::snprintf(line, sizeof(line), "%llu frames decoded since connecting", @@ -2724,6 +3287,509 @@ static std::string conversion_in_use(glint::App& app) return app.gpu_convert() && g_yuv.available ? "Vulkan YUV (GPU)" : (g_yuv.tried && !g_yuv.available ? "CPU (GPU unavailable)" : "CPU"); } +// --------------------------------------------------------------------------- +// Settings -> Picture: the enhancement passes (g_enh). A profile picks a set of +// values; touching any control switches to Custom with the values shown. With +// "Protect frame time" the profile steps down while the passes take longer +// than the GPU budget (measured each frame), so a weak GPU never drops frames. +// --------------------------------------------------------------------------- + +enum { PictureOff, PictureLight, PictureBalanced, PictureEnhanced, PictureCustom }; +static const char* const kPictureProfiles[] = {"Off", "Light", "Balanced", "Enhanced", "Custom"}; +static const char* const* const kUpscalers = kUpscalerNames; +constexpr int kUpscalerCount = 4; + +static glint::PictureSettings g_picture; +static std::vector g_picture_presets; // the user's own, saved in picture.conf +static std::string g_picture_active; // the user preset applied (Custom started from it), "" for a built-in profile +static int g_picture_step = 0; // profiles stepped down by "Protect frame time" +static int g_picture_step_profile = -1; // the profile the step belongs to +static double g_picture_over_since = -1.0; + +// The values a profile stands for (colour stays neutral; Custom keeps its own). +static glint::PictureSettings picture_preset(int profile) +{ + glint::PictureSettings s; + s.exposure = 0.0f; + s.saturation = 1.0f; + s.shadows = 0.0f; + switch (profile) { + case PictureLight: + s.upscaler = 0; s.sharpness = 0.25f; s.denoise = 0.0f; s.deband = 0.0f; s.dither = 0.0f; + break; + case PictureEnhanced: + s.upscaler = UpscaleAi; s.sharpness = 0.45f; s.denoise = 0.15f; s.deband = 0.35f; s.dither = 0.5f; + break; + default: // Balanced + s.upscaler = UpscaleFsr; s.sharpness = 0.35f; s.denoise = 0.0f; s.deband = 0.25f; s.dither = 0.5f; + break; + } + return s; +} + +// The values in effect: the profile's, or Custom's, after any step-down. +static glint::PictureSettings picture_effective() +{ + glint::PictureSettings v = g_picture.profile == PictureCustom ? g_picture : picture_preset(g_picture.profile); + if (g_picture_step > 0) { + if (g_picture.profile == PictureCustom) { + v.upscaler = std::max(0, v.upscaler - g_picture_step); + if (g_picture_step >= 1) v.denoise = 0.0f; + if (g_picture_step >= 2) v.deband = 0.0f; + } else { + v = picture_preset(std::max((int)PictureLight, g_picture.profile - g_picture_step)); + } + } + v.upscaler = std::clamp(v.upscaler, 0, kUpscalerCount - 1); + return v; +} + +// Once per frame, before the upload: resolves the passes and runs the +// frame-time protection. +static void picture_update() +{ + if (g_picture_step_profile != g_picture.profile) { // a new profile starts at full strength + g_picture_step = 0; + g_picture_step_profile = g_picture.profile; + g_picture_over_since = -1.0; + } + if (g_picture.profile != PictureOff && g_picture.protect && g_enh.shown && g_enh.gpu_ms > g_picture.budget_ms) { + double now = ImGui::GetTime(); + if (g_picture_over_since < 0) g_picture_over_since = now; + int floor_step = g_picture.profile == PictureCustom ? 2 : g_picture.profile - PictureLight; + if (now - g_picture_over_since > 1.5 && g_picture_step < floor_step) { + g_picture_step++; + g_picture_over_since = -1.0; + g_enh.gpu_ms = 0.0f; // measure the lighter set afresh + glint::logf("picture: GPU over its %.1f ms budget; stepped down %d", g_picture.budget_ms, g_picture_step); + } + } else { + g_picture_over_since = -1.0; + } + + EnhanceParams e; + e.active = g_picture.profile != PictureOff; + if (e.active) { + glint::PictureSettings v = picture_effective(); + e.upscaler = v.upscaler; + e.sharpness = v.sharpness; + e.denoise = v.denoise; + e.deband = v.deband; + e.dither = v.dither; + e.exposure = v.exposure; + e.saturation = v.saturation; + e.shadows = v.shadows; + } + g_enh.params = e; +} + +// Picture values only (not the profile, protection or budget). +static bool picture_same(const glint::PictureSettings& a, const glint::PictureSettings& b) +{ + return a.upscaler == b.upscaler && a.sharpness == b.sharpness && a.denoise == b.denoise && a.deband == b.deband && + a.dither == b.dither && a.exposure == b.exposure && a.saturation == b.saturation && a.shadows == b.shadows; +} + +static glint::PicturePreset* picture_find(const std::string& name) +{ + for (glint::PicturePreset& p : g_picture_presets) + if (p.name == name) return &p; + return nullptr; +} + +// How a user preset relates to what is on now. +enum class PresetState { Other, Applied, Changed }; +static PresetState preset_state(const glint::PicturePreset& p) +{ + if (g_picture_active != p.name || g_picture.profile != PictureCustom) return PresetState::Other; + return picture_same(g_picture, p.values) ? PresetState::Applied : PresetState::Changed; +} + +// Makes `values` the Custom profile (keeping protection and budget). +static void picture_set_custom(const glint::PictureSettings& values) +{ + glint::PictureSettings v = values; + v.profile = PictureCustom; + v.protect = g_picture.protect; + v.budget_ms = g_picture.budget_ms; + g_picture = v; + g_picture_step = 0; + g_picture_step_profile = PictureCustom; +} + +static void picture_apply_preset(const glint::PicturePreset& p) +{ + picture_set_custom(p.values); + g_picture_active = p.name; + ui::toast("Applied preset \"" + p.name + "\"", 0); +} + +// What the Profile row says about the profile in use. +static std::string picture_profile_desc() +{ + static const char* const hints[] = { + "The picture as it comes from the console.", + "Bilinear upscaling and light sharpening. For older or integrated GPUs.", + "FSR 1 upscaling, sharpening and debanding.", + "AI upscaling, denoising and everything else. For a strong GPU.", + "Your own values.", + }; + if (g_picture.profile == PictureCustom && !g_picture_active.empty()) { + if (glint::PicturePreset* p = picture_find(g_picture_active)) + return "Your preset \"" + p->name + "\"" + + (preset_state(*p) == PresetState::Changed ? ", changed (not saved)." : "."); + } + return hints[g_picture.profile]; +} + +// The profile switch. A built-in profile ends any applied user preset. +static void picture_profile_control(float min_item) +{ + using namespace ui; + int prof = g_picture.profile; + if (segmented("##pprofile", &prof, kPictureProfiles, 5, min_item) && prof != g_picture.profile) { + g_picture.profile = prof; + if (prof != PictureCustom) g_picture_active.clear(); + } +} + +// The tweaking controls, shared by Settings -> Picture (rows) and the side by +// side panel (columns). Every control shows the values in effect; changing +// one makes them the Custom profile. An applied preset stays the one in use, +// now marked changed until it is updated or reverted. +enum { TweakUpscaler, TweakSharpness, TweakDenoise, TweakDeband, TweakDither, TweakExposure, TweakSaturation, + TweakShadows, TweakCount }; +static void picture_tweak(int which, glint::PictureSettings& v, float width) +{ + using namespace ui; + switch (which) { + case TweakUpscaler: segmented("##pup", &v.upscaler, kUpscalers, kUpscalerCount, width / kUpscalerCount); break; + case TweakSharpness: slider("##psharp", &v.sharpness, 0.0f, 1.0f, "%.0f%%", 100.0f, width); break; + case TweakDenoise: slider("##pdenoise", &v.denoise, 0.0f, 1.0f, "%.0f%%", 100.0f, width); break; + case TweakDeband: slider("##pdeband", &v.deband, 0.0f, 1.0f, "%.0f%%", 100.0f, width); break; + case TweakDither: slider("##pdither", &v.dither, 0.0f, 1.0f, "%.0f%%", 100.0f, width); break; + case TweakExposure: slider("##pexp", &v.exposure, -2.0f, 2.0f, "%+.1f", 1.0f, width); break; + case TweakSaturation: slider("##psat", &v.saturation, 0.0f, 2.0f, "%.0f%%", 100.0f, width); break; + default: slider("##pshadow", &v.shadows, 0.0f, 1.0f, "%.0f%%", 100.0f, width); break; + } +} +static const char* const kTweakNames[TweakCount] = {"Upscaler", "Sharpness", "Denoise", "Debanding", + "Dithering", "Exposure", "Saturation", "Shadow detail"}; + +// Commits edited values (if any) as Custom. +static void picture_commit(const glint::PictureSettings& v, const glint::PictureSettings& before) +{ + if (!picture_same(v, before)) picture_set_custom(v); +} + +static void page_picture(glint::App& app) +{ + using namespace ui; + (void)app; + section("Profile"); + card_begin(); + { + std::string desc = picture_profile_desc(); + row_begin("Profile", desc.c_str(), segmented_width(kPictureProfiles, 5, px(70))); + picture_profile_control(px(70)); + row_end(); + + char status[160]; + if (g_picture.profile == PictureOff) + std::snprintf(status, sizeof(status), "Off"); + else if (!g_enh.shown) + std::snprintf(status, sizeof(status), g_enh.tried && !g_enh.available ? "Not available on this GPU" + : "Waiting for video"); + else { + const char* up = g_enh.used_upscaler >= 0 ? kUpscalers[g_enh.used_upscaler] : "no upscaling"; + if (g_enh.timestamp_ns > 0) + std::snprintf(status, sizeof(status), "%.2f ms GPU - %d x %d - %s", g_enh.gpu_ms, g_enh.out.width, + g_enh.out.height, up); + else + std::snprintf(status, sizeof(status), "%d x %d - %s", g_enh.out.width, g_enh.out.height, up); + } + const char* sdesc = g_picture_step > 0 ? "Stepped down: the GPU went over its budget." : nullptr; + ImGui::PushFont(F.mono); + float sw = ImGui::CalcTextSize(status).x; + ImGui::PopFont(); + row_begin("Status", sdesc, sw, 20); + ImGui::PushFont(F.mono); + text_colored(C.muted, "%s", status); + ImGui::PopFont(); + row_end(); + } + card_end(); + + // My presets: the values below saved under a name. The one in use is + // marked Applied, or Changed once a control moved away from it. + section("My presets"); + card_begin(); + { + const glint::PictureSettings current = + g_picture.profile == PictureCustom ? g_picture : picture_preset(g_picture.profile); + int remove = -1; + for (size_t i = 0; i < g_picture_presets.size(); i++) { + glint::PicturePreset& pr = g_picture_presets[i]; + const glint::PictureSettings& v = pr.values; + PresetState st = preset_state(pr); + char desc[200]; + std::snprintf(desc, sizeof(desc), "%s, sharpness %.0f%%, denoise %.0f%%, deband %.0f%%%s", + kUpscalers[std::clamp(v.upscaler, 0, kUpscalerCount - 1)], v.sharpness * 100, + v.denoise * 100, v.deband * 100, + v.exposure != 0 || v.saturation != 1 || v.shadows != 0 ? ", own colour" : ""); + const float dw = button_width(icon::trash, "Delete"); + const float lw = button_width(nullptr, "Apply"), uw = button_width(nullptr, "Update"), + rw = button_width(nullptr, "Revert"); + const char* badge_text = st == PresetState::Applied ? "Applied" : st == PresetState::Changed ? "Changed" : nullptr; + float bw = badge_text ? badge_width(badge_text) + px(10) : 0.0f; + float controls = bw + (st == PresetState::Changed ? uw + px(8) + rw + px(8) + : st == PresetState::Other ? lw + px(8) : 0.0f) + dw; + ImGui::PushID((int)i); + row_begin(pr.name.c_str(), desc, controls, 36); + if (badge_text) { + ImVec2 bp = ImGui::GetCursorScreenPos(); + ImGui::PushFont(F.label); + float badge_h = ImGui::GetFontSize() + px(8); + ImGui::PopFont(); + ImGui::SetCursorScreenPos(bp + ImVec2(0, (px(36) - badge_h) * 0.5f)); + if (st == PresetState::Applied) badge(badge_text, C.success, C.success_soft, false); + else badge(badge_text, C.warn, C.warn_soft, false); + ImGui::SetCursorScreenPos(bp + ImVec2(bw, 0)); + } + if (st == PresetState::Other) { + if (button("##papply", nullptr, "Apply", Kind::Secondary, ImVec2(lw, 0))) picture_apply_preset(pr); + tip("Use this preset"); + ImGui::SameLine(0, px(8)); + } else if (st == PresetState::Changed) { + if (button("##pupdate", nullptr, "Update", Kind::Primary, ImVec2(uw, 0))) { + pr.values = current; + pr.values.profile = PictureCustom; + ui::toast("Updated preset \"" + pr.name + "\"", 1); + } + tip("Save the current values into this preset"); + ImGui::SameLine(0, px(8)); + if (button("##prevert", nullptr, "Revert", Kind::Secondary, ImVec2(rw, 0))) picture_apply_preset(pr); + tip("Back to the preset as saved"); + ImGui::SameLine(0, px(8)); + } + if (button("##pdel", icon::trash, "Delete", Kind::Ghost, ImVec2(dw, 0))) remove = (int)i; + row_end(); + ImGui::PopID(); + } + if (remove >= 0) { + ui::toast("Deleted preset \"" + g_picture_presets[remove].name + "\"", 0); + if (g_picture_active == g_picture_presets[remove].name) g_picture_active.clear(); + g_picture_presets.erase(g_picture_presets.begin() + remove); + } + + static char name[48] = ""; + std::string trimmed(name); + trimmed.erase(0, trimmed.find_first_not_of(' ')); + trimmed.erase(trimmed.find_last_not_of(' ') + 1); + glint::PicturePreset* existing = picture_find(trimmed); + bool full = (int)g_picture_presets.size() >= glint::kMaxPicturePresets && !existing; + bool can_save = !trimmed.empty() && !full && g_picture.profile != PictureOff; + const char* save_label = existing ? "Replace" : "Save"; + float sbw = button_width(icon::add, save_label); + const char* save_desc = g_picture.profile == PictureOff ? "Turn the picture on to save its values." + : full ? "You have 20 presets: delete one to save another." + : existing ? "A preset with this name exists: Replace overwrites it." + : "Saves the values below under a name and applies it."; + row_begin("Save current settings", save_desc, px(220) + px(8) + sbw, 36); + bool enter = input("##pname", name, sizeof(name), px(220), g_picture.profile != PictureOff, + ImGuiInputTextFlags_EnterReturnsTrue); + ImGui::SameLine(0, px(8)); + if ((button("##psave", icon::add, save_label, Kind::Primary, ImVec2(sbw, 0), can_save) || (enter && can_save))) { + glint::PicturePreset pr; + pr.name = trimmed; + pr.values = current; + pr.values.profile = PictureCustom; + if (existing) *existing = pr; + else g_picture_presets.push_back(pr); + picture_set_custom(current); // saved = applied + g_picture_active = trimmed; + ui::toast("Saved preset \"" + trimmed + "\"", 1); + name[0] = 0; + } + row_end(); + if (g_picture_presets.empty()) + card_note(C.muted, "No presets yet. Set things up below, give it a name and save it here."); + } + card_end(); + + section("Compare"); + card_begin(); + { + row_begin("Side by side", + "The same spot twice, original and enhanced. Scroll to zoom, drag to move, double-click to reset. " + "X opens the controls over it. (C)", + px(40), 22); + if (toggle("##pside", &g_compare.on) && g_compare.on) { + g_shell.settings_open = false; // the comparison needs the whole window + ui::toast("Side by side: scroll to zoom, drag to move. X to tweak, C to leave.", 0); + } + row_end(); + } + card_end(); + + glint::PictureSettings v = picture_effective(); + const glint::PictureSettings before = v; + const float sw = px(260); + static const char* const tips[TweakCount] = { + nullptr, + "Contrast-adaptive: sharpens soft detail, leaves flat areas and edges alone.", + "Edge-preserving. Smooths speckle in flat areas.", + "Smooths the steps in skies and gradients.", + "A hint of noise so gradients don't show steps.", + "In stops (EV).", + nullptr, + "Lifts dark areas, leaves the rest.", + }; + static const char* const up_hints[] = { + "Smooth and cheapest.", "Sharper edges, no halos.", "AMD FidelityFX FSR 1: edge-adaptive, clean lines.", + "FSRCNNX neural network: rebuilds fine detail. Used from 1.3x, else Lanczos."}; + auto tweak_row = [&](int which) { + float w = which == TweakUpscaler ? segmented_width(kUpscalers, kUpscalerCount, px(72)) : sw; + row_begin(kTweakNames[which], which == TweakUpscaler ? up_hints[v.upscaler] : tips[which], w); + picture_tweak(which, v, which == TweakUpscaler ? px(72) * kUpscalerCount : sw); + row_end(); + }; + + section("Upscaling and sharpening"); + card_begin(); + tweak_row(TweakUpscaler); + tweak_row(TweakSharpness); + card_note(C.muted, "Upscaling applies when the picture is shown larger than the stream (1080p)."); + card_end(); + + section("Compression cleanup"); + card_begin(); + tweak_row(TweakDenoise); + tweak_row(TweakDeband); + tweak_row(TweakDither); + card_end(); + + section("Color"); + card_begin(); + tweak_row(TweakExposure); + tweak_row(TweakSaturation); + tweak_row(TweakShadows); + card_note(C.muted, "None of these bring back detail lost to compression."); + card_end(); + + picture_commit(v, before); + + section("Frame time"); + card_begin(); + { + row_begin("Protect frame time", "Steps the profile down when the passes take longer than the budget.", px(40), + 22); + toggle("##pprotect", &g_picture.protect); + row_end(); + row_begin("GPU budget", "Time the passes may take per frame.", sw); + slider("##pbudget", &g_picture.budget_ms, 0.5f, 10.0f, "%.1f ms", 1.0f, sw, g_picture.protect); + row_end(); + float bw = button_width(icon::refresh, "Reset"); + row_begin("Profile defaults", "Back to Balanced with neutral colour.", bw, 36); + if (button("##preset", icon::refresh, "Reset", Kind::Secondary, ImVec2(bw, 0))) { + glint::PictureSettings d; + d.protect = g_picture.protect; + d.budget_ms = g_picture.budget_ms; + g_picture = d; + g_picture_active.clear(); + } + row_end(); + } + card_end(); +} + +// Side by side's control panel (X): the tweaks laid out in columns along the +// bottom, over the picture without dimming it, so every change shows at once +// (g_tweaks_open, with g_compare). + +static void draw_picture_tweaks(ImVec2 vp_pos, ImVec2 vp_size) +{ + using namespace ui; + if (!g_compare.on) g_tweaks_open = false; + float t = anim(ImGui::GetID("##tweaks_open"), g_tweaks_open ? 1.0f : 0.0f, 14.0f); + if (t < 0.01f) return; + + // A fixed-width panel centred at the bottom: a top row (profile, upscaler, + // close), a line saying what is in use, then the sliders in a 4 x 2 grid. + const float pad = px(20), gap = px(22), row_h = px(34); + const int cols = 4; + const float width = std::min(vp_size.x - px(32), px(1080)); + const float cell_w = (width - pad * 2 - gap * (cols - 1)) / cols; + const float cell_h = px(58); + const float height = pad + row_h + px(30) + cell_h * 2 + px(6) + pad; + ImVec2 size(width, height); + ImVec2 pos(vp_pos.x + (vp_size.x - width) * 0.5f, + vp_pos.y + vp_size.y - px(16) - height + (1.0f - ease_out(t)) * (height + px(32))); + ImGui::SetNextWindowPos(pos); + ImGui::SetNextWindowSize(size); + ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0, 0)); + ImGui::PushStyleVar(ImGuiStyleVar_Alpha, ImGui::GetStyle().Alpha * std::min(1.0f, t * 1.5f)); + ImGui::Begin("##tweaks", nullptr, + ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoSavedSettings | + ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoScrollWithMouse); + ImDrawList* dl = ImGui::GetWindowDrawList(); + dl->AddRectFilled(pos + ImVec2(0, px(6)), pos + size + ImVec2(0, px(8)), ImGui::GetColorU32(C.shadow, 0.5f), px(16)); + dl->AddRectFilled(pos, pos + size, ink(C.glass), px(16)); + dl->AddRect(pos, pos + size, ink(C.glass_border), px(16)); + if (ImGui::IsWindowHovered(ImGuiHoveredFlags_AllowWhenBlockedByActiveItem) || ImGui::IsAnyItemActive()) + g_shell.pointer_on_controls = true; // the comparison ignores the mouse here + + glint::PictureSettings v = picture_effective(); + const glint::PictureSettings before = v; + + // Top row. + ImVec2 o = pos + ImVec2(pad, pad); + ImGui::SetCursorScreenPos(o); + picture_profile_control(px(64)); + float x = o.x + segmented_width(kPictureProfiles, 5, px(64)) + px(14); + ImGui::SetCursorScreenPos(ImVec2(x, o.y)); + picture_tweak(TweakUpscaler, v, px(64) * kUpscalerCount); + float close_w = button_width(icon::close, "Close"); + ImGui::SetCursorScreenPos(ImVec2(pos.x + width - pad - close_w, o.y)); + if (button("##tclose", icon::close, "Close", Kind::Ghost, ImVec2(close_w, row_h))) g_tweaks_open = false; + tip("Close the controls (X)"); + + // What is in use, under the top row. + std::string state = picture_profile_desc(); + if (g_enh.shown && g_enh.used_upscaler >= 0) state += " Upscaling with " + std::string(kUpscalers[g_enh.used_upscaler]) + "."; + else if (g_picture.profile != PictureOff) state += " Zoom in to see the upscaler."; + ImGui::PushFont(F.small); + dl->AddText(ImVec2(o.x, o.y + row_h + px(8)), ink(C.muted), state.c_str()); + ImGui::PopFont(); + + // The grid: name above, slider (with its value) below. + static const int grid[cols * 2] = {TweakSharpness, TweakDenoise, TweakDeband, TweakDither, + TweakExposure, TweakSaturation, TweakShadows, -1}; + float gy = o.y + row_h + px(30); + for (int i = 0; i < cols * 2; i++) { + float cx = o.x + (i % cols) * (cell_w + gap), cy = gy + (i / cols) * cell_h; + if (grid[i] < 0) { // the last cell: back to the profile's own values + float rw = button_width(icon::refresh, "Reset"); + ImGui::SetCursorScreenPos(ImVec2(cx + cell_w - rw, cy + px(18))); + if (button("##treset", icon::refresh, "Reset", Kind::Secondary, ImVec2(rw, row_h))) + v = g_picture.profile == PictureCustom ? picture_preset(PictureBalanced) : picture_preset(g_picture.profile); + tip("Back to the profile's values"); + continue; + } + ImGui::PushFont(F.label); + dl->AddText(ImVec2(cx, cy), ink(C.text), kTweakNames[grid[i]]); + ImGui::PopFont(); + ImGui::SetCursorScreenPos(ImVec2(cx, cy + px(22))); + ImGui::PushID(grid[i]); + picture_tweak(grid[i], v, cell_w); + ImGui::PopID(); + } + + picture_commit(v, before); + ImGui::End(); + ImGui::PopStyleVar(2); +} + static void page_video(glint::App& app) { using namespace ui; @@ -3112,6 +4178,7 @@ static void draw_gallery(glint::App& app) ImGui::EndPopup(); return; } + gallery_follow_folder(app); if (!g_gallery.loaded) gallery_refresh(app); float e = ease_out(g_shell.gallery_t); @@ -4064,9 +5131,9 @@ static void draw_settings(glint::App& app) // Tabs: text on a hairline, no rounding. The active tab is full-strength // with a 2 px underline. #if SL_LIVE_STREAMING - static const char* tabs[PageCount] = {"Console", "Video", "Audio", "Capture", "Streaming", "Help"}; + static const char* tabs[PageCount] = {"Console", "Video", "Picture", "Audio", "Capture", "Streaming", "Help"}; #else - static const char* tabs[PageCount] = {"Console", "Video", "Audio", "Capture", "Help"}; + static const char* tabs[PageCount] = {"Console", "Video", "Picture", "Audio", "Capture", "Help"}; #endif ImVec2 tp = origin + ImVec2(px(24), px(64)); float th = px(44); @@ -4118,6 +5185,7 @@ static void draw_settings(glint::App& app) switch (g_shell.page) { case PageConsole: page_console(app); break; case PageVideo: page_video(app); break; + case PagePicture: page_picture(app); break; case PageAudio: page_audio(app); break; case PageCapture: page_capture(app); break; #if SL_LIVE_STREAMING @@ -4148,6 +5216,90 @@ static void draw_settings(glint::App& app) // Player view // --------------------------------------------------------------------------- +// Side by side: two panels showing the same part of the picture, the original +// on the left and the enhanced one on the right. Scroll zooms around the +// pointer, dragging pans, a double-click goes back to the whole picture. +static void draw_compare(const VideoTexture& texture, ImVec2 pos, ImVec2 size) +{ + using namespace ui; + ImDrawList* dl = ImGui::GetBackgroundDrawList(); + dl->AddRectFilled(pos, pos + size, IM_COL32(0, 0, 0, 255)); + Compare& c = g_compare; + const float gap = px(2); + const float pw = (size.x - gap) * 0.5f, ph = size.y; + const float aspect = (float)texture.width / texture.height; + // The whole picture's size on screen at this zoom. + const float fit_w = std::min(pw, ph * aspect), fit_h = fit_w / aspect; + const float W = fit_w * c.zoom, H = fit_h * c.zoom; + // The part of it a panel shows (UV), and where that sits in the panel. + const float uw = std::min(1.0f, pw / W), uh = std::min(1.0f, ph / H); + c.center.x = std::clamp(c.center.x, uw * 0.5f, 1.0f - uw * 0.5f); + c.center.y = std::clamp(c.center.y, uh * 0.5f, 1.0f - uh * 0.5f); + const ImVec2 uv0(c.center.x - uw * 0.5f, c.center.y - uh * 0.5f), uv1(c.center.x + uw * 0.5f, c.center.y + uh * 0.5f); + const ImVec2 shown(uw * W, uh * H); + const ImVec2 left = pos + ImVec2((pw - shown.x) * 0.5f, (ph - shown.y) * 0.5f); + const ImVec2 right = left + ImVec2(pw + gap, 0); + + // The enhancement upscales to the zoomed size, so a zoomed-in view shows + // what the upscaler really does at that size (capped at 4K by the passes). + ImVec2 fb = ImGui::GetIO().DisplayFramebufferScale; + g_enh.want_w = (int)std::lround(W * fb.x); + g_enh.want_h = (int)std::lround(H * fb.y); + + dl->AddImage(texture.im_id(), left, left + shown, uv0, uv1); + bool enhanced = g_enh.shown && g_enh.out_descriptor; + dl->AddImage(enhanced ? (ImTextureID)(intptr_t)g_enh.out_descriptor : texture.im_id(), right, right + shown, uv0, + uv1); + dl->AddRectFilled(pos + ImVec2(pw, 0), pos + ImVec2(pw + gap, ph), ink(C.glass_border)); + + // Labels. + char label[64]; + if (!enhanced) std::snprintf(label, sizeof(label), "Enhanced: Picture is Off"); + else if (g_enh.used_upscaler >= 0) std::snprintf(label, sizeof(label), "Enhanced - %s", kUpscalerNames[g_enh.used_upscaler]); + else std::snprintf(label, sizeof(label), "Enhanced"); + char zoom[160]; + std::snprintf(zoom, sizeof(zoom), "%.1fx - scroll to zoom, drag to move, double-click to reset - X to tweak, C to leave", c.zoom); + ImGui::PushFont(F.label); + auto pill = [&](ImVec2 p, const char* text) { + ImVec2 ts = ImGui::CalcTextSize(text); + dl->AddRectFilled(p, p + ts + ImVec2(px(20), px(12)), ink(C.glass), px(8)); + dl->AddText(p + ImVec2(px(10), px(6)), ink(C.text), text); + }; + // Below the status pill and the round buttons; the hint at the top centre, + // clear of the command bar. + pill(pos + ImVec2(px(20), px(80)), "Original"); + pill(pos + ImVec2(pw + gap + px(20), px(80)), label); + ImVec2 zs = ImGui::CalcTextSize(zoom); + pill(pos + ImVec2((size.x - zs.x) * 0.5f - px(10), px(22)), zoom); + ImGui::PopFont(); + + // Input, only over the picture (not over controls, Settings or the gallery). + ImGuiIO& io = ImGui::GetIO(); + bool free = !g_shell.pointer_on_controls && !g_shell.settings_open && !g_shell.gallery_open && !g_viewer.open; + ImVec2 m = io.MousePos; + auto inside = [&](ImVec2 a) { return m.x >= a.x && m.y >= a.y && m.x < a.x + shown.x && m.y < a.y + shown.y; }; + bool over = free && (inside(left) || inside(right)); + if (over && io.MouseWheel != 0.0f) { + ImVec2 o = inside(left) ? left : right; + ImVec2 f((m.x - o.x) / shown.x, (m.y - o.y) / shown.y); // where the pointer is, 0..1 of the view + ImVec2 at(uv0.x + f.x * uw, uv0.y + f.y * uh); // ...in picture UV: keep it under the pointer + c.zoom = std::clamp(c.zoom * std::pow(1.25f, io.MouseWheel), 1.0f, 8.0f); + float nw = std::min(1.0f, pw / (fit_w * c.zoom)), nh = std::min(1.0f, ph / (fit_h * c.zoom)); + c.center = ImVec2(at.x - (f.x - 0.5f) * nw, at.y - (f.y - 0.5f) * nh); + } + if (over && ImGui::IsMouseClicked(ImGuiMouseButton_Left)) c.dragging = true; + if (!ImGui::IsMouseDown(ImGuiMouseButton_Left)) c.dragging = false; + if (c.dragging) { + c.center.x -= io.MouseDelta.x / W; + c.center.y -= io.MouseDelta.y / H; + ImGui::SetMouseCursor(ImGuiMouseCursor_ResizeAll); + } + if (over && ImGui::IsMouseDoubleClicked(ImGuiMouseButton_Left)) { + c.zoom = 1.0f; + c.center = ImVec2(0.5f, 0.5f); + } +} + static void draw_video(const VideoTexture& texture, ImVec2 pos, ImVec2 size) { ImDrawList* dl = ImGui::GetBackgroundDrawList(); @@ -4155,6 +5307,10 @@ static void draw_video(const VideoTexture& texture, ImVec2 pos, ImVec2 size) dl->AddRectFilled(pos, pos + size, ui::C.panel); // the connect screen's ground return; } + if (g_compare.on) { + draw_compare(texture, pos, size); + return; + } dl->AddRectFilled(pos, pos + size, IM_COL32(0, 0, 0, 255)); // letterbox stays black in both themes float src = (float)texture.width / texture.height; float dst = size.x / size.y; @@ -4186,7 +5342,13 @@ static void draw_video(const VideoTexture& texture, ImVec2 pos, ImVec2 size) uv1.x = 1.0f - uv0.x; } } - dl->AddImage(texture.im_id(), a, b, uv0, uv1); + // The whole picture's size in screen pixels (Fill crops it): what the + // enhancement passes upscale to for the next frame. + ImVec2 fb = ImGui::GetIO().DisplayFramebufferScale; + g_enh.want_w = (int)std::lround((b.x - a.x) / std::max(1e-4f, uv1.x - uv0.x) * fb.x); + g_enh.want_h = (int)std::lround((b.y - a.y) / std::max(1e-4f, uv1.y - uv0.y) * fb.y); + if (g_enh.shown && g_enh.out_descriptor) dl->AddImage((ImTextureID)(intptr_t)g_enh.out_descriptor, a, b, uv0, uv1); + else dl->AddImage(texture.im_id(), a, b, uv0, uv1); } // Glass pill over the picture with a coloured dot; returns its size. @@ -4216,7 +5378,8 @@ static ImVec2 status_pill(glint::App& app, ImVec2 p, double now) std::string name = config.platform.empty() ? "PS5" : config.platform; char picture[32] = ""; if (link == Link::Live && config.height > 0) std::snprintf(picture, sizeof(picture), "%dp%d", config.height, config.fps); - const char* state = link == Link::Connecting ? "Connecting" : link == Link::Failed ? "Can't reach the console" + const char* state = link == Link::Connecting ? "Connecting" + : link == Link::Failed ? (watched_elsewhere(app) ? "Watching elsewhere" : "Can't reach the console") : link == Link::Offline ? "Not connected" : picture; std::vector late = link == Link::Live ? app.recent_lateness(60) : std::vector(); char hold[24] = "", rate[24] = ""; @@ -4377,13 +5540,18 @@ static void draw_empty_state(glint::App& app, ImVec2 center) if (button("##connect_empty", nullptr, "Connect", Kind::Primary, ImVec2(bw, ImGui::GetItemRectSize().y)) || enter) connect_to(app); if (link == Link::Failed) { + bool elsewhere = watched_elsewhere(app); ImGui::PushFont(F.small); - ImGui::PushStyleColor(ImGuiCol_Text, ImGui::ColorConvertU32ToFloat4(C.danger)); + ImGui::PushStyleColor(ImGuiCol_Text, ImGui::ColorConvertU32ToFloat4(elsewhere ? C.muted : C.danger)); if (F.icons) { - ImGui::TextUnformatted(icon::warning); + ImGui::TextUnformatted(elsewhere ? icon::info : icon::warning); ImGui::SameLine(0, px(8)); } - ImGui::TextWrapped("No answer from %s. Check that the Glint payload is running on the PS5.", g_shell.url); + if (elsewhere) + ImGui::TextWrapped("Glint is open in a browser or on another PC, and the PS5 streams to one at a " + "time. Connect to watch here."); + else + ImGui::TextWrapped("No answer from %s. Check that the Glint payload is running on the PS5.", g_shell.url); ImGui::PopStyleColor(); ImGui::PopFont(); } @@ -4559,8 +5727,9 @@ static void draw_ui(glint::App& app, VideoTexture& texture) if (ImGui::IsItemHovered()) g_shell.pointer_on_controls = true; tip("Gallery (G)"); - // Bottom: the command bar, only while there is a picture to act on. - if (has_video) { + // Bottom: the command bar, only while there is a picture to act on + // (side by side's control panel takes its place). + if (has_video && !(g_compare.on && g_tweaks_open)) { bool sound = app.audio().enabled(); float bh = px(44), gap = px(6), pad = px(6), sep = px(13); float bw_sound = px(44), vol_w = px(150); @@ -4646,6 +5815,7 @@ static void draw_ui(glint::App& app, VideoTexture& texture) draw_settings(app); draw_gallery(app); ImGui::End(); + draw_picture_tweaks(vp->Pos, vp->Size); draw_toasts(vp->Pos.y + vp->Size.y - px(110)); } @@ -4669,7 +5839,7 @@ static void draw_headless(glint::App& app, int frames) static const char* modes[] = {"Lowest", "Balanced", "Smooth"}; std::printf("latency=%s hold=%.0f ms late=%llu frames\n", modes[(int)app.latency()], app.video_hold_ms(), (unsigned long long)app.late_frames()); - if (app.frame_count() == 0) + if (app.frame_count() == 0 || !app.connected()) std::fprintf(stderr, "error=%s\n", app.error().c_str()); } @@ -5216,6 +6386,9 @@ static glint::AppSettings capture_settings(glint::App& app) // The user's choice; a CPU fallback forced by a missing GPU path is not saved as one. s.gpu_convert = app.gpu_convert() || (g_yuv.tried && !g_yuv.available); s.latency = (int)app.latency(); + s.enhance = g_picture; + s.picture_presets = g_picture_presets; + s.picture_active = g_picture_active; s.window_x = g_shell.normal[0]; s.window_y = g_shell.normal[1]; s.window_w = g_shell.normal[2]; @@ -5239,6 +6412,9 @@ static void apply_settings(glint::App& app, const glint::AppSettings& s, bool ke app.set_gpu_decode(s.gpu_decode); app.set_gpu_convert(s.gpu_convert); app.set_latency((glint::App::Latency)std::clamp(s.latency, 0, 2)); + g_picture = s.enhance; + g_picture_presets = s.picture_presets; + g_picture_active = s.picture_active; g_shell.recent = s.recent; ui::set_theme(s.theme, true); } @@ -5584,6 +6760,7 @@ int main(int argc, char** argv) glint::App app; VideoTexture texture; + texture.live = true; // gets the picture enhancement passes if (!record_dir.empty()) app.set_media_dir(record_dir); apply_settings(app, settings, !record_dir.empty()); std::snprintf(g_shell.url, sizeof(g_shell.url), "%s", url.c_str()); @@ -5636,8 +6813,12 @@ int main(int argc, char** argv) start_view.clear(); } + picture_update(); auto frame = app.take_frame(frame_seen); - if (frame && frame->width > 0 && frame->height > 0) present_picture(texture, *frame, app); + if (frame && frame->width > 0 && frame->height > 0) { + present_picture(texture, *frame, app); + enhance_dump_maybe(); + } ImGui_ImplVulkan_NewFrame(); ImGui_ImplGlfw_NewFrame(); @@ -5691,6 +6872,7 @@ int main(int argc, char** argv) g_viewer.player.close(); destroy_texture(g_viewer_tex); destroy_thumbs(); + enhance_destroy(); yuv_converter_destroy(); if (g_UploadFence) vkDestroyFence(g_Device, g_UploadFence, g_Allocator); diff --git a/app/src/media/audio.cpp b/app/src/media/audio.cpp index f9872e3..9bf1697 100644 --- a/app/src/media/audio.cpp +++ b/app/src/media/audio.cpp @@ -37,9 +37,11 @@ constexpr double kWarmupSeconds = 5.0; // Auto delay: cover the worst recent arrival lateness (how far packets ran // behind the media clock, which is what drains the ring; a run of slightly // late packets counts, not just one long gap) plus one callback and one packet -// of granularity. The memory halves every 60 s. -constexpr double kAutoMarginMs = 50.0; -constexpr double kAutoMinMsDefault = 150.0; +// of granularity. The memory halves every 60 s. Margin and floors were 50 and +// 100-150 ms; on Wi-Fi with gaps up to ~60 ms that sat ~190 ms behind the +// picture for no measured gain (no underruns at the lower values). +constexpr double kAutoMarginMs = 25.0; +constexpr double kAutoMinMsDefault = 60.0; constexpr double kAutoHalfLifeS = 60.0; constexpr double kAutoInitialGapMs = 70.0; @@ -436,7 +438,7 @@ float AudioPlayer::volume() const { return impl_->volume.load(); } void AudioPlayer::set_delay_ms(int ms) { impl_->delay_ms.store(std::clamp(ms, 0, kMaxDelayMs)); } int AudioPlayer::delay_ms() const { return impl_->delay_ms.load(); } void AudioPlayer::set_delay_auto(bool on) { impl_->delay_auto.store(on); } -void AudioPlayer::set_auto_floor_ms(int ms) { impl_->auto_floor_ms.store(std::clamp(ms, 50, kMaxDelayMs)); } +void AudioPlayer::set_auto_floor_ms(int ms) { impl_->auto_floor_ms.store(std::clamp(ms, 30, kMaxDelayMs)); } bool AudioPlayer::delay_auto() const { return impl_->delay_auto.load(); } int AudioPlayer::effective_delay_ms() const { diff --git a/app/src/media/audio.h b/app/src/media/audio.h index 35bcaf3..59cc6e5 100644 --- a/app/src/media/audio.h +++ b/app/src/media/audio.h @@ -93,7 +93,7 @@ public: void set_delay_auto(bool on); bool delay_auto() const; int effective_delay_ms() const; // the target in use right now - // Smallest automatic buffer (Latency: Lowest 100 ms, Smooth 150 ms). + // Smallest automatic buffer (Latency: Lowest 40 ms, Balanced 60 ms, Smooth 120 ms). void set_auto_floor_ms(int ms); // Time from a packet arriving to it reaching the speaker. -1 while not // playing (stopped, buffering, sound off). Used to hold video in sync. diff --git a/app/src/media/media.cpp b/app/src/media/media.cpp index 335f8d0..8e57adf 100644 --- a/app/src/media/media.cpp +++ b/app/src/media/media.cpp @@ -24,6 +24,7 @@ extern "C" { #include #include #include +#include namespace fs = std::filesystem; @@ -202,6 +203,33 @@ bool save_screenshot(const std::string& dir, const std::vector& frame, return ok; } +FolderWatch::~FolderWatch() { close(); } + +void FolderWatch::close() { + if (handle_ && handle_ != INVALID_HANDLE_VALUE) FindCloseChangeNotification((HANDLE)handle_); + handle_ = nullptr; +} + +void FolderWatch::watch(const std::string& dir) { + if (dir == dir_ && handle_ && handle_ != INVALID_HANDLE_VALUE) return; + close(); + dir_ = dir; + // A folder that doesn't exist yet can't be watched; watch() is called + // again on the next refresh and picks it up once it does. + std::wstring wide = fs::u8path(dir).wstring(); + HANDLE h = FindFirstChangeNotificationW(wide.c_str(), FALSE, + FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_SIZE | + FILE_NOTIFY_CHANGE_LAST_WRITE); + handle_ = h == INVALID_HANDLE_VALUE ? nullptr : (void*)h; +} + +bool FolderWatch::changed() { + if (!handle_) return false; + if (WaitForSingleObject((HANDLE)handle_, 0) != WAIT_OBJECT_0) return false; + if (!FindNextChangeNotification((HANDLE)handle_)) close(); // the folder went away: watch again later + return true; +} + std::vector list_gallery(const std::string& dir) { std::vector items; std::error_code ec; @@ -240,6 +268,17 @@ std::vector list_gallery(const std::string& dir) { } avformat_close_input(&fmt); } + } else { + // A PNG's size is in its header: the IHDR chunk right after the + // 8-byte signature holds width and height (big-endian) at 16..23. + std::ifstream png(entry.path(), std::ios::binary); + unsigned char head[24] = {}; + if (png.read(reinterpret_cast(head), sizeof(head)) && head[1] == 'P' && head[2] == 'N' && + head[3] == 'G' && std::memcmp(head + 12, "IHDR", 4) == 0) { + auto be32 = [&](int at) { return (int)((head[at] << 24) | (head[at + 1] << 16) | (head[at + 2] << 8) | head[at + 3]); }; + item.width = be32(16); + item.height = be32(20); + } } items.push_back(std::move(item)); } diff --git a/app/src/media/media.h b/app/src/media/media.h index ed6e558..bbaedce 100644 --- a/app/src/media/media.h +++ b/app/src/media/media.h @@ -33,6 +33,24 @@ struct GalleryItem { // .mkv / .mp4 / .png files in `dir`, newest first. std::vector list_gallery(const std::string& dir); + +// Watches a folder for files added, removed, renamed or written (Windows +// change notifications, no polling of the files). changed() is true once +// after each burst of changes. Watching a new folder replaces the old one. +class FolderWatch { +public: + FolderWatch() = default; + ~FolderWatch(); + FolderWatch(const FolderWatch&) = delete; + FolderWatch& operator=(const FolderWatch&) = delete; + void watch(const std::string& dir); + bool changed(); + +private: + void close(); + void* handle_ = nullptr; + std::string dir_; +}; bool delete_gallery_file(const std::string& path, std::string& error); // Stream-copies a recording to "mp4" or "mkv" next to the original diff --git a/app/src/shaders/enhance_easu.comp b/app/src/shaders/enhance_easu.comp new file mode 100644 index 0000000..ddd0d97 --- /dev/null +++ b/app/src/shaders/enhance_easu.comp @@ -0,0 +1,35 @@ +#version 450 +#extension GL_GOOGLE_include_directive : require +// Picture enhancement: AMD FidelityFX FSR 1 EASU (edge-adaptive spatial +// upsampling) from the stream's size to the window's. The FSR code is AMD's, +// unchanged (third_party/, MIT); this file only feeds it. +layout(local_size_x = 16, local_size_y = 16) in; + +layout(binding = 0, rgba8) uniform writeonly image2D dst; +layout(binding = 1) uniform sampler2D src; // linear sampler; EASU gathers + +layout(push_constant) uniform Params { + ivec2 src_size; + ivec2 dst_size; +} p; + +#define A_GPU 1 +#define A_GLSL 1 +#include "third_party/ffx_a.h" +#define FSR_EASU_F 1 +AF4 FsrEasuRF(AF2 q) { return textureGather(src, q, 0); } +AF4 FsrEasuGF(AF2 q) { return textureGather(src, q, 1); } +AF4 FsrEasuBF(AF2 q) { return textureGather(src, q, 2); } +#include "third_party/ffx_fsr1.h" + +void main() +{ + ivec2 at = ivec2(gl_GlobalInvocationID.xy); + if (at.x >= p.dst_size.x || at.y >= p.dst_size.y) return; + AU4 con0, con1, con2, con3; + FsrEasuCon(con0, con1, con2, con3, AF1(p.src_size.x), AF1(p.src_size.y), AF1(p.src_size.x), + AF1(p.src_size.y), AF1(p.dst_size.x), AF1(p.dst_size.y)); + AF3 c; + FsrEasuF(c, AU2(at), con0, con1, con2, con3); + imageStore(dst, at, vec4(clamp(c, 0.0, 1.0), 1.0)); +} diff --git a/app/src/shaders/enhance_easu.spv.inc b/app/src/shaders/enhance_easu.spv.inc new file mode 100644 index 0000000..23c9ee3 --- /dev/null +++ b/app/src/shaders/enhance_easu.spv.inc @@ -0,0 +1,1015 @@ +{0x07230203,0x00010000,0x000d000b,0x00001507, +0x00000000,0x00020011,0x00000001,0x0006000b, +0x00000001,0x4c534c47,0x6474732e,0x3035342e, +0x00000000,0x0003000e,0x00000000,0x00000001, +0x0006000f,0x00000005,0x00000004,0x6e69616d, +0x00000000,0x00000549,0x00060010,0x00000004, +0x00000011,0x00000010,0x00000010,0x00000001, +0x00040047,0x000000c3,0x00000021,0x00000001, +0x00040047,0x000000c3,0x00000022,0x00000000, +0x00040047,0x00000549,0x0000000b,0x0000001c, +0x00030047,0x00000550,0x00000002,0x00050048, +0x00000550,0x00000000,0x00000023,0x00000000, +0x00050048,0x00000550,0x00000001,0x00000023, +0x00000008,0x00030047,0x00000599,0x00000019, +0x00040047,0x00000599,0x00000021,0x00000000, +0x00040047,0x00000599,0x00000022,0x00000000, +0x00040047,0x000005a5,0x0000000b,0x00000019, +0x00020013,0x00000002,0x00030021,0x00000003, +0x00000002,0x00030016,0x00000006,0x00000020, +0x00040017,0x0000000c,0x00000006,0x00000002, +0x00040017,0x00000011,0x00000006,0x00000003, +0x00040017,0x00000016,0x00000006,0x00000004, +0x00040015,0x0000001b,0x00000020,0x00000000, +0x00040017,0x00000044,0x0000001b,0x00000004, +0x00020014,0x0000005e,0x00040017,0x0000006f, +0x0000001b,0x00000002,0x0004002b,0x00000006, +0x0000009a,0x3f800000,0x0004002b,0x00000006, +0x000000a2,0x00000000,0x0004002b,0x0000001b, +0x000000aa,0x7ef07ebb,0x0004002b,0x0000001b, +0x000000b3,0x5f347d74,0x0004002b,0x0000001b, +0x000000b8,0x00000001,0x00090019,0x000000c0, +0x00000006,0x00000001,0x00000000,0x00000000, +0x00000000,0x00000001,0x00000000,0x0003001b, +0x000000c1,0x000000c0,0x00040020,0x000000c2, +0x00000000,0x000000c1,0x0004003b,0x000000c2, +0x000000c3,0x00000000,0x00040015,0x000000c6, +0x00000020,0x00000001,0x0004002b,0x000000c6, +0x000000c7,0x00000000,0x0004002b,0x000000c6, +0x000000cd,0x00000001,0x0004002b,0x000000c6, +0x000000d3,0x00000002,0x0004002b,0x0000001b, +0x000000dd,0x00000000,0x0004002b,0x00000006, +0x000000e6,0x3f000000,0x0004002b,0x00000006, +0x00000115,0xbf800000,0x0004002b,0x00000006, +0x00000126,0x40000000,0x0004002b,0x00000006, +0x00000147,0x40800000,0x0004002b,0x00000006, +0x0000017f,0x3ecccccd,0x0004002b,0x00000006, +0x00000194,0x3fc80000,0x0004002b,0x00000006, +0x00000199,0xbf100000,0x0004002b,0x00000006, +0x0000034e,0x38000000,0x0005002c,0x0000000c, +0x000003f5,0x000000a2,0x00000115,0x0005002c, +0x0000000c,0x00000410,0x0000009a,0x00000115, +0x0005002c,0x0000000c,0x0000042b,0x00000115, +0x0000009a,0x0005002c,0x0000000c,0x00000446, +0x000000a2,0x0000009a,0x0005002c,0x0000000c, +0x0000047c,0x00000115,0x000000a2,0x0005002c, +0x0000000c,0x00000497,0x0000009a,0x0000009a, +0x0005002c,0x0000000c,0x000004b2,0x00000126, +0x0000009a,0x0005002c,0x0000000c,0x000004cd, +0x00000126,0x000000a2,0x0005002c,0x0000000c, +0x000004e8,0x0000009a,0x000000a2,0x0005002c, +0x0000000c,0x00000503,0x0000009a,0x00000126, +0x0005002c,0x0000000c,0x0000051e,0x000000a2, +0x00000126,0x00040017,0x00000544,0x000000c6, +0x00000002,0x00040017,0x00000547,0x0000001b, +0x00000003,0x00040020,0x00000548,0x00000001, +0x00000547,0x0004003b,0x00000548,0x00000549, +0x00000001,0x0004001e,0x00000550,0x00000544, +0x00000544,0x00040020,0x00000551,0x00000009, +0x00000550,0x0004003b,0x00000551,0x00000552, +0x00000009,0x00040020,0x00000553,0x00000009, +0x000000c6,0x00090019,0x00000597,0x00000006, +0x00000001,0x00000000,0x00000000,0x00000000, +0x00000002,0x00000004,0x00040020,0x00000598, +0x00000000,0x00000597,0x0004003b,0x00000598, +0x00000599,0x00000000,0x0004002b,0x0000001b, +0x000005a4,0x00000010,0x0006002c,0x00000547, +0x000005a5,0x000005a4,0x000005a4,0x000000b8, +0x0007002c,0x00000016,0x000014e7,0x000000e6, +0x000000e6,0x000000e6,0x000000e6,0x0006002c, +0x00000011,0x000014e8,0x000000a2,0x000000a2, +0x000000a2,0x0006002c,0x00000011,0x000014e9, +0x0000009a,0x0000009a,0x0000009a,0x0004002b, +0x00000006,0x000014f4,0x3e800000,0x0004002b, +0x00000006,0x000014f6,0xbe000000,0x0004002b, +0x00000006,0x000014f7,0xbd947ae1,0x00050036, +0x00000002,0x00000004,0x00000000,0x00000003, +0x000200f8,0x00000005,0x000300f7,0x000005a6, +0x00000000,0x000300fb,0x000000dd,0x000005a7, +0x000200f8,0x000005a7,0x0004003d,0x00000547, +0x0000054a,0x00000549,0x0007004f,0x0000006f, +0x0000054b,0x0000054a,0x0000054a,0x00000000, +0x00000001,0x0004007c,0x00000544,0x0000054c, +0x0000054b,0x00050051,0x000000c6,0x0000054f, +0x0000054c,0x00000000,0x00060041,0x00000553, +0x00000554,0x00000552,0x000000cd,0x000000dd, +0x0004003d,0x000000c6,0x00000555,0x00000554, +0x000500af,0x0000005e,0x00000556,0x0000054f, +0x00000555,0x000400a8,0x0000005e,0x00000557, +0x00000556,0x000300f7,0x00000559,0x00000000, +0x000400fa,0x00000557,0x00000558,0x00000559, +0x000200f8,0x00000558,0x00050051,0x000000c6, +0x0000055b,0x0000054c,0x00000001,0x00060041, +0x00000553,0x0000055c,0x00000552,0x000000cd, +0x000000b8,0x0004003d,0x000000c6,0x0000055d, +0x0000055c,0x000500af,0x0000005e,0x0000055e, +0x0000055b,0x0000055d,0x000200f9,0x00000559, +0x000200f8,0x00000559,0x000700f5,0x0000005e, +0x0000055f,0x00000556,0x000005a7,0x0000055e, +0x00000558,0x000300f7,0x00000561,0x00000000, +0x000400fa,0x0000055f,0x00000560,0x00000561, +0x000200f8,0x00000560,0x000200f9,0x000005a6, +0x000200f8,0x00000561,0x00060041,0x00000553, +0x00000567,0x00000552,0x000000c7,0x000000dd, +0x0004003d,0x000000c6,0x00000568,0x00000567, +0x0004006f,0x00000006,0x00000569,0x00000568, +0x00060041,0x00000553,0x0000056a,0x00000552, +0x000000c7,0x000000b8,0x0004003d,0x000000c6, +0x0000056b,0x0000056a,0x0004006f,0x00000006, +0x0000056c,0x0000056b,0x0004006f,0x00000006, +0x00000575,0x00000555,0x00060041,0x00000553, +0x00000576,0x00000552,0x000000cd,0x000000b8, +0x0004003d,0x000000c6,0x00000577,0x00000576, +0x0004006f,0x00000006,0x00000578,0x00000577, +0x00050088,0x00000006,0x00000623,0x0000009a, +0x00000575,0x00050085,0x00000006,0x000005c7, +0x00000569,0x00000623,0x0004007c,0x0000001b, +0x000005c8,0x000005c7,0x00050088,0x00000006, +0x0000062c,0x0000009a,0x00000578,0x00050085, +0x00000006,0x000005cd,0x0000056c,0x0000062c, +0x0004007c,0x0000001b,0x000005ce,0x000005cd, +0x00050088,0x00000006,0x000014ea,0x00000569, +0x00000575,0x00050085,0x00000006,0x000005d5, +0x000000e6,0x000014ea,0x00050083,0x00000006, +0x000005d7,0x000005d5,0x000000e6,0x0004007c, +0x0000001b,0x000005d8,0x000005d7,0x00050088, +0x00000006,0x000014eb,0x0000056c,0x00000578, +0x00050085,0x00000006,0x000005df,0x000000e6, +0x000014eb,0x00050083,0x00000006,0x000005e1, +0x000005df,0x000000e6,0x0004007c,0x0000001b, +0x000005e2,0x000005e1,0x00070050,0x00000044, +0x000014ec,0x000005c8,0x000005ce,0x000005d8, +0x000005e2,0x00050088,0x00000006,0x00000653, +0x0000009a,0x00000569,0x0004007c,0x0000001b, +0x000005e6,0x00000653,0x00050088,0x00000006, +0x0000065c,0x0000009a,0x0000056c,0x0004007c, +0x0000001b,0x000005ea,0x0000065c,0x00050088, +0x00000006,0x000005f5,0x00000115,0x0000056c, +0x0004007c,0x0000001b,0x000005f6,0x000005f5, +0x00070050,0x00000044,0x000014ed,0x000005e6, +0x000005ea,0x000005e6,0x000005f6,0x00050088, +0x00000006,0x000005fb,0x00000115,0x00000569, +0x0004007c,0x0000001b,0x000005fc,0x000005fb, +0x00050088,0x00000006,0x00000601,0x00000126, +0x0000056c,0x0004007c,0x0000001b,0x00000602, +0x00000601,0x00070050,0x00000044,0x000014ee, +0x000005fc,0x00000602,0x000005e6,0x00000602, +0x00050088,0x00000006,0x00000619,0x00000147, +0x0000056c,0x0004007c,0x0000001b,0x0000061a, +0x00000619,0x00070050,0x00000044,0x000014ef, +0x000000dd,0x0000061a,0x000000dd,0x000000dd, +0x00040070,0x0000000c,0x000007b1,0x0000054b, +0x0007004f,0x0000006f,0x000007b3,0x000014ec, +0x000014ec,0x00000000,0x00000001,0x0004007c, +0x0000000c,0x000007b4,0x000007b3,0x00050085, +0x0000000c,0x000007b5,0x000007b1,0x000007b4, +0x0007004f,0x0000006f,0x000007b7,0x000014ec, +0x000014ec,0x00000002,0x00000003,0x0004007c, +0x0000000c,0x000007b8,0x000007b7,0x00050081, +0x0000000c,0x000007b9,0x000007b5,0x000007b8, +0x0006000c,0x0000000c,0x000007bb,0x00000001, +0x00000008,0x000007b9,0x00050083,0x0000000c, +0x000007be,0x000007b9,0x000007bb,0x0007004f, +0x0000006f,0x000007c1,0x000014ed,0x000014ed, +0x00000000,0x00000001,0x0004007c,0x0000000c, +0x000007c2,0x000007c1,0x00050085,0x0000000c, +0x000007c3,0x000007bb,0x000007c2,0x0007004f, +0x0000006f,0x000007c5,0x000014ed,0x000014ed, +0x00000002,0x00000003,0x0004007c,0x0000000c, +0x000007c6,0x000007c5,0x00050081,0x0000000c, +0x000007c7,0x000007c3,0x000007c6,0x0007004f, +0x0000006f,0x000007ca,0x000014ee,0x000014ee, +0x00000000,0x00000001,0x0004007c,0x0000000c, +0x000007cb,0x000007ca,0x00050081,0x0000000c, +0x000007cc,0x000007c7,0x000007cb,0x0007004f, +0x0000006f,0x000007cf,0x000014ee,0x000014ee, +0x00000002,0x00000003,0x0004007c,0x0000000c, +0x000007d0,0x000007cf,0x00050081,0x0000000c, +0x000007d1,0x000007c7,0x000007d0,0x0007004f, +0x0000006f,0x000007d4,0x000014ef,0x000014ef, +0x00000000,0x00000001,0x0004007c,0x0000000c, +0x000007d5,0x000007d4,0x00050081,0x0000000c, +0x000007d6,0x000007c7,0x000007d5,0x0004003d, +0x000000c1,0x000009c9,0x000000c3,0x00060060, +0x00000016,0x000009cb,0x000009c9,0x000007c7, +0x000000c7,0x0004003d,0x000000c1,0x000009ce, +0x000000c3,0x00060060,0x00000016,0x000009d0, +0x000009ce,0x000007c7,0x000000cd,0x0004003d, +0x000000c1,0x000009d3,0x000000c3,0x00060060, +0x00000016,0x000009d5,0x000009d3,0x000007c7, +0x000000d3,0x0004003d,0x000000c1,0x000009d8, +0x000000c3,0x00060060,0x00000016,0x000009da, +0x000009d8,0x000007cc,0x000000c7,0x0004003d, +0x000000c1,0x000009dd,0x000000c3,0x00060060, +0x00000016,0x000009df,0x000009dd,0x000007cc, +0x000000cd,0x0004003d,0x000000c1,0x000009e2, +0x000000c3,0x00060060,0x00000016,0x000009e4, +0x000009e2,0x000007cc,0x000000d3,0x0004003d, +0x000000c1,0x000009e7,0x000000c3,0x00060060, +0x00000016,0x000009e9,0x000009e7,0x000007d1, +0x000000c7,0x0004003d,0x000000c1,0x000009ec, +0x000000c3,0x00060060,0x00000016,0x000009ee, +0x000009ec,0x000007d1,0x000000cd,0x0004003d, +0x000000c1,0x000009f1,0x000000c3,0x00060060, +0x00000016,0x000009f3,0x000009f1,0x000007d1, +0x000000d3,0x0004003d,0x000000c1,0x000009f6, +0x000000c3,0x00060060,0x00000016,0x000009f8, +0x000009f6,0x000007d6,0x000000c7,0x0004003d, +0x000000c1,0x000009fb,0x000000c3,0x00060060, +0x00000016,0x000009fd,0x000009fb,0x000007d6, +0x000000cd,0x0004003d,0x000000c1,0x00000a00, +0x000000c3,0x00060060,0x00000016,0x00000a02, +0x00000a00,0x000007d6,0x000000d3,0x00050085, +0x00000016,0x000007f1,0x000009d5,0x000014e7, +0x00050085,0x00000016,0x000007f4,0x000009cb, +0x000014e7,0x00050081,0x00000016,0x000007f6, +0x000007f4,0x000009d0,0x00050081,0x00000016, +0x000007f7,0x000007f1,0x000007f6,0x00050085, +0x00000016,0x000007fa,0x000009e4,0x000014e7, +0x00050085,0x00000016,0x000007fd,0x000009da, +0x000014e7,0x00050081,0x00000016,0x000007ff, +0x000007fd,0x000009df,0x00050081,0x00000016, +0x00000800,0x000007fa,0x000007ff,0x00050085, +0x00000016,0x00000803,0x000009f3,0x000014e7, +0x00050085,0x00000016,0x00000806,0x000009e9, +0x000014e7,0x00050081,0x00000016,0x00000808, +0x00000806,0x000009ee,0x00050081,0x00000016, +0x00000809,0x00000803,0x00000808,0x00050085, +0x00000016,0x0000080c,0x00000a02,0x000014e7, +0x00050085,0x00000016,0x0000080f,0x000009f8, +0x000014e7,0x00050081,0x00000016,0x00000811, +0x0000080f,0x000009fd,0x00050081,0x00000016, +0x00000812,0x0000080c,0x00000811,0x00050051, +0x00000006,0x00000814,0x000007f7,0x00000000, +0x00050051,0x00000006,0x00000816,0x000007f7, +0x00000001,0x00050051,0x00000006,0x00000818, +0x00000800,0x00000000,0x00050051,0x00000006, +0x0000081a,0x00000800,0x00000001,0x00050051, +0x00000006,0x0000081c,0x00000800,0x00000002, +0x00050051,0x00000006,0x0000081e,0x00000800, +0x00000003,0x00050051,0x00000006,0x00000820, +0x00000809,0x00000000,0x00050051,0x00000006, +0x00000822,0x00000809,0x00000001,0x00050051, +0x00000006,0x00000824,0x00000809,0x00000002, +0x00050051,0x00000006,0x00000826,0x00000809, +0x00000003,0x00050051,0x00000006,0x00000828, +0x00000812,0x00000002,0x00050051,0x00000006, +0x0000082a,0x00000812,0x00000003,0x00050051, +0x00000006,0x00000a42,0x000007be,0x00000000, +0x00050083,0x00000006,0x00000a43,0x0000009a, +0x00000a42,0x00050051,0x00000006,0x00000a46, +0x000007be,0x00000001,0x00050083,0x00000006, +0x00000a47,0x0000009a,0x00000a46,0x00050085, +0x00000006,0x00000a48,0x00000a43,0x00000a47, +0x00050083,0x00000006,0x00000a68,0x00000826, +0x0000081c,0x00050083,0x00000006,0x00000a6b, +0x0000081c,0x0000081e,0x0006000c,0x00000006, +0x00000a6d,0x00000001,0x00000004,0x00000a68, +0x0006000c,0x00000006,0x00000a6f,0x00000001, +0x00000004,0x00000a6b,0x0007000c,0x00000006, +0x00000a70,0x00000001,0x00000028,0x00000a6d, +0x00000a6f,0x0004007c,0x0000001b,0x00000ac2, +0x00000a70,0x00050082,0x0000001b,0x00000ac3, +0x000000aa,0x00000ac2,0x0004007c,0x00000006, +0x00000ac4,0x00000ac3,0x00050083,0x00000006, +0x00000a75,0x00000826,0x0000081e,0x00050085, +0x00000006,0x00000a78,0x00000a75,0x00000a48, +0x0006000c,0x00000006,0x00000a7e,0x00000001, +0x00000004,0x00000a75,0x00050085,0x00000006, +0x00000a80,0x00000a7e,0x00000ac4,0x0008000c, +0x00000006,0x00000acf,0x00000001,0x0000002b, +0x00000a80,0x000000a2,0x0000009a,0x00050085, +0x00000006,0x00000a84,0x00000acf,0x00000acf, +0x00050083,0x00000006,0x00000a8c,0x0000081a, +0x0000081c,0x00050083,0x00000006,0x00000a8f, +0x0000081c,0x00000814,0x0006000c,0x00000006, +0x00000a91,0x00000001,0x00000004,0x00000a8c, +0x0006000c,0x00000006,0x00000a93,0x00000001, +0x00000004,0x00000a8f,0x0007000c,0x00000006, +0x00000a94,0x00000001,0x00000028,0x00000a91, +0x00000a93,0x0004007c,0x0000001b,0x00000adb, +0x00000a94,0x00050082,0x0000001b,0x00000adc, +0x000000aa,0x00000adb,0x0004007c,0x00000006, +0x00000add,0x00000adc,0x00050083,0x00000006, +0x00000a99,0x0000081a,0x00000814,0x00050085, +0x00000006,0x00000a9c,0x00000a99,0x00000a48, +0x0006000c,0x00000006,0x00000aa2,0x00000001, +0x00000004,0x00000a99,0x00050085,0x00000006, +0x00000aa4,0x00000aa2,0x00000add,0x0008000c, +0x00000006,0x00000ae8,0x00000001,0x0000002b, +0x00000aa4,0x000000a2,0x0000009a,0x00050085, +0x00000006,0x00000aa8,0x00000ae8,0x00000ae8, +0x00050081,0x00000006,0x00001504,0x00000a84, +0x00000aa8,0x00050085,0x00000006,0x00000aad, +0x00000a48,0x00001504,0x00050085,0x00000006, +0x00000b17,0x00000a42,0x00000a47,0x00050083, +0x00000006,0x00000b2d,0x00000824,0x00000826, +0x0006000c,0x00000006,0x00000b32,0x00000001, +0x00000004,0x00000b2d,0x0007000c,0x00000006, +0x00000b35,0x00000001,0x00000028,0x00000b32, +0x00000a6d,0x0004007c,0x0000001b,0x00000b87, +0x00000b35,0x00050082,0x0000001b,0x00000b88, +0x000000aa,0x00000b87,0x0004007c,0x00000006, +0x00000b89,0x00000b88,0x00050083,0x00000006, +0x00000b3a,0x00000824,0x0000081c,0x00050085, +0x00000006,0x00000b3d,0x00000b3a,0x00000b17, +0x00050081,0x00000006,0x00000b40,0x00000a78, +0x00000b3d,0x0006000c,0x00000006,0x00000b43, +0x00000001,0x00000004,0x00000b3a,0x00050085, +0x00000006,0x00000b45,0x00000b43,0x00000b89, +0x0008000c,0x00000006,0x00000b94,0x00000001, +0x0000002b,0x00000b45,0x000000a2,0x0000009a, +0x00050085,0x00000006,0x00000b49,0x00000b94, +0x00000b94,0x00050085,0x00000006,0x00000b4c, +0x00000b49,0x00000b17,0x00050081,0x00000006, +0x00000b4e,0x00000aad,0x00000b4c,0x00050083, +0x00000006,0x00000b51,0x00000820,0x00000826, +0x00050083,0x00000006,0x00000b54,0x00000826, +0x00000816,0x0006000c,0x00000006,0x00000b56, +0x00000001,0x00000004,0x00000b51,0x0006000c, +0x00000006,0x00000b58,0x00000001,0x00000004, +0x00000b54,0x0007000c,0x00000006,0x00000b59, +0x00000001,0x00000028,0x00000b56,0x00000b58, +0x0004007c,0x0000001b,0x00000ba0,0x00000b59, +0x00050082,0x0000001b,0x00000ba1,0x000000aa, +0x00000ba0,0x0004007c,0x00000006,0x00000ba2, +0x00000ba1,0x00050083,0x00000006,0x00000b5e, +0x00000820,0x00000816,0x00050085,0x00000006, +0x00000b61,0x00000b5e,0x00000b17,0x00050081, +0x00000006,0x00000b64,0x00000a9c,0x00000b61, +0x0006000c,0x00000006,0x00000b67,0x00000001, +0x00000004,0x00000b5e,0x00050085,0x00000006, +0x00000b69,0x00000b67,0x00000ba2,0x0008000c, +0x00000006,0x00000bad,0x00000001,0x0000002b, +0x00000b69,0x000000a2,0x0000009a,0x00050085, +0x00000006,0x00000b6d,0x00000bad,0x00000bad, +0x00050085,0x00000006,0x00000b70,0x00000b6d, +0x00000b17,0x00050081,0x00000006,0x00000b72, +0x00000b4e,0x00000b70,0x00050085,0x00000006, +0x00000be6,0x00000a43,0x00000a46,0x00050083, +0x00000006,0x00000bf2,0x00000820,0x0000081a, +0x00050083,0x00000006,0x00000bf5,0x0000081a, +0x00000818,0x0006000c,0x00000006,0x00000bf7, +0x00000001,0x00000004,0x00000bf2,0x0006000c, +0x00000006,0x00000bf9,0x00000001,0x00000004, +0x00000bf5,0x0007000c,0x00000006,0x00000bfa, +0x00000001,0x00000028,0x00000bf7,0x00000bf9, +0x0004007c,0x0000001b,0x00000c4c,0x00000bfa, +0x00050082,0x0000001b,0x00000c4d,0x000000aa, +0x00000c4c,0x0004007c,0x00000006,0x00000c4e, +0x00000c4d,0x00050083,0x00000006,0x00000bff, +0x00000820,0x00000818,0x00050085,0x00000006, +0x00000c02,0x00000bff,0x00000be6,0x00050081, +0x00000006,0x00000c05,0x00000b40,0x00000c02, +0x0006000c,0x00000006,0x00000c08,0x00000001, +0x00000004,0x00000bff,0x00050085,0x00000006, +0x00000c0a,0x00000c08,0x00000c4e,0x0008000c, +0x00000006,0x00000c59,0x00000001,0x0000002b, +0x00000c0a,0x000000a2,0x0000009a,0x00050085, +0x00000006,0x00000c0e,0x00000c59,0x00000c59, +0x00050085,0x00000006,0x00000c11,0x00000c0e, +0x00000be6,0x00050081,0x00000006,0x00000c13, +0x00000b72,0x00000c11,0x00050083,0x00000006, +0x00000c16,0x0000082a,0x0000081a,0x0006000c, +0x00000006,0x00000c1b,0x00000001,0x00000004, +0x00000c16,0x0007000c,0x00000006,0x00000c1e, +0x00000001,0x00000028,0x00000c1b,0x00000a91, +0x0004007c,0x0000001b,0x00000c65,0x00000c1e, +0x00050082,0x0000001b,0x00000c66,0x000000aa, +0x00000c65,0x0004007c,0x00000006,0x00000c67, +0x00000c66,0x00050083,0x00000006,0x00000c23, +0x0000082a,0x0000081c,0x00050085,0x00000006, +0x00000c26,0x00000c23,0x00000be6,0x00050081, +0x00000006,0x00000c29,0x00000b64,0x00000c26, +0x0006000c,0x00000006,0x00000c2c,0x00000001, +0x00000004,0x00000c23,0x00050085,0x00000006, +0x00000c2e,0x00000c2c,0x00000c67,0x0008000c, +0x00000006,0x00000c72,0x00000001,0x0000002b, +0x00000c2e,0x000000a2,0x0000009a,0x00050085, +0x00000006,0x00000c32,0x00000c72,0x00000c72, +0x00050085,0x00000006,0x00000c35,0x00000c32, +0x00000be6,0x00050081,0x00000006,0x00000c37, +0x00000c13,0x00000c35,0x00050085,0x00000006, +0x00000cb3,0x00000a42,0x00000a46,0x00050083, +0x00000006,0x00000cb7,0x00000822,0x00000820, +0x0006000c,0x00000006,0x00000cbc,0x00000001, +0x00000004,0x00000cb7,0x0007000c,0x00000006, +0x00000cbf,0x00000001,0x00000028,0x00000cbc, +0x00000bf7,0x0004007c,0x0000001b,0x00000d11, +0x00000cbf,0x00050082,0x0000001b,0x00000d12, +0x000000aa,0x00000d11,0x0004007c,0x00000006, +0x00000d13,0x00000d12,0x00050083,0x00000006, +0x00000cc4,0x00000822,0x0000081a,0x00050085, +0x00000006,0x00000cc7,0x00000cc4,0x00000cb3, +0x00050081,0x00000006,0x00000cca,0x00000c05, +0x00000cc7,0x0006000c,0x00000006,0x00000ccd, +0x00000001,0x00000004,0x00000cc4,0x00050085, +0x00000006,0x00000ccf,0x00000ccd,0x00000d13, +0x0008000c,0x00000006,0x00000d1e,0x00000001, +0x0000002b,0x00000ccf,0x000000a2,0x0000009a, +0x00050085,0x00000006,0x00000cd3,0x00000d1e, +0x00000d1e,0x00050085,0x00000006,0x00000cd6, +0x00000cd3,0x00000cb3,0x00050081,0x00000006, +0x00000cd8,0x00000c37,0x00000cd6,0x00050083, +0x00000006,0x00000cdb,0x00000828,0x00000820, +0x0006000c,0x00000006,0x00000ce0,0x00000001, +0x00000004,0x00000cdb,0x0007000c,0x00000006, +0x00000ce3,0x00000001,0x00000028,0x00000ce0, +0x00000b56,0x0004007c,0x0000001b,0x00000d2a, +0x00000ce3,0x00050082,0x0000001b,0x00000d2b, +0x000000aa,0x00000d2a,0x0004007c,0x00000006, +0x00000d2c,0x00000d2b,0x00050083,0x00000006, +0x00000ce8,0x00000828,0x00000826,0x00050085, +0x00000006,0x00000ceb,0x00000ce8,0x00000cb3, +0x00050081,0x00000006,0x00000cee,0x00000c29, +0x00000ceb,0x00050050,0x0000000c,0x000014f3, +0x00000cca,0x00000cee,0x0006000c,0x00000006, +0x00000cf1,0x00000001,0x00000004,0x00000ce8, +0x00050085,0x00000006,0x00000cf3,0x00000cf1, +0x00000d2c,0x0008000c,0x00000006,0x00000d37, +0x00000001,0x0000002b,0x00000cf3,0x000000a2, +0x0000009a,0x00050085,0x00000006,0x00000cf7, +0x00000d37,0x00000d37,0x00050085,0x00000006, +0x00000cfa,0x00000cf7,0x00000cb3,0x00050081, +0x00000006,0x00000cfc,0x00000cd8,0x00000cfa, +0x00050085,0x0000000c,0x0000085b,0x000014f3, +0x000014f3,0x00050051,0x00000006,0x0000085d, +0x0000085b,0x00000000,0x00050051,0x00000006, +0x0000085f,0x0000085b,0x00000001,0x00050081, +0x00000006,0x00000860,0x0000085d,0x0000085f, +0x000500b8,0x0000005e,0x00000863,0x00000860, +0x0000034e,0x0004007c,0x0000001b,0x00000d47, +0x00000860,0x000500c2,0x0000001b,0x00000d49, +0x00000d47,0x000000b8,0x00050082,0x0000001b, +0x00000d4a,0x000000b3,0x00000d49,0x0004007c, +0x00000006,0x00000d4b,0x00000d4a,0x000600a9, +0x00000006,0x00001505,0x00000863,0x0000009a, +0x00000d4b,0x000600a9,0x00000006,0x00001506, +0x00000863,0x0000009a,0x00000cca,0x00060052, +0x0000000c,0x000012c3,0x00001506,0x000014f3, +0x00000000,0x00050050,0x0000000c,0x00000d5b, +0x00001505,0x00001505,0x00050085,0x0000000c, +0x00000879,0x000012c3,0x00000d5b,0x00050085, +0x00000006,0x000014f5,0x00000cfc,0x00000cfc, +0x00050085,0x00000006,0x0000087f,0x000014f4, +0x000014f5,0x00050051,0x00000006,0x00000881, +0x00000879,0x00000000,0x00050085,0x00000006, +0x00000884,0x00000881,0x00000881,0x00050051, +0x00000006,0x00000886,0x00000879,0x00000001, +0x00050085,0x00000006,0x00000889,0x00000886, +0x00000886,0x00050081,0x00000006,0x0000088a, +0x00000884,0x00000889,0x0006000c,0x00000006, +0x0000088d,0x00000001,0x00000004,0x00000881, +0x0006000c,0x00000006,0x00000890,0x00000001, +0x00000004,0x00000886,0x0007000c,0x00000006, +0x00000891,0x00000001,0x00000028,0x0000088d, +0x00000890,0x0004007c,0x0000001b,0x00000d64, +0x00000891,0x00050082,0x0000001b,0x00000d65, +0x000000aa,0x00000d64,0x0004007c,0x00000006, +0x00000d66,0x00000d65,0x00050085,0x00000006, +0x00000893,0x0000088a,0x00000d66,0x00050083, +0x00000006,0x00000897,0x00000893,0x0000009a, +0x00050085,0x00000006,0x00000899,0x00000897, +0x0000087f,0x00050081,0x00000006,0x0000089a, +0x0000009a,0x00000899,0x00050085,0x00000006, +0x0000089e,0x000014f5,0x000014f6,0x00050081, +0x00000006,0x0000089f,0x0000009a,0x0000089e, +0x00050050,0x0000000c,0x000008a0,0x0000089a, +0x0000089f,0x00050085,0x00000006,0x000008a4, +0x000014f5,0x000014f7,0x00050081,0x00000006, +0x000008a5,0x000000e6,0x000008a4,0x0004007c, +0x0000001b,0x00000d81,0x000008a5,0x00050082, +0x0000001b,0x00000d82,0x000000aa,0x00000d81, +0x0004007c,0x00000006,0x00000d83,0x00000d82, +0x00050051,0x00000006,0x000008a9,0x000009da, +0x00000002,0x00050051,0x00000006,0x000008ab, +0x000009df,0x00000002,0x00050051,0x00000006, +0x000008ad,0x000009e4,0x00000002,0x00060050, +0x00000011,0x000008ae,0x000008a9,0x000008ab, +0x000008ad,0x00050051,0x00000006,0x000008b0, +0x000009e9,0x00000003,0x00050051,0x00000006, +0x000008b2,0x000009ee,0x00000003,0x00050051, +0x00000006,0x000008b4,0x000009f3,0x00000003, +0x00060050,0x00000011,0x000008b5,0x000008b0, +0x000008b2,0x000008b4,0x00050051,0x00000006, +0x000008b7,0x000009da,0x00000001,0x00050051, +0x00000006,0x000008b9,0x000009df,0x00000001, +0x00050051,0x00000006,0x000008bb,0x000009e4, +0x00000001,0x00060050,0x00000011,0x000008bc, +0x000008b7,0x000008b9,0x000008bb,0x0007000c, +0x00000011,0x00000d8c,0x00000001,0x00000025, +0x000008b5,0x000008bc,0x0007000c,0x00000011, +0x00000d8d,0x00000001,0x00000025,0x000008ae, +0x00000d8c,0x00050051,0x00000006,0x000008bf, +0x000009e9,0x00000000,0x00050051,0x00000006, +0x000008c1,0x000009ee,0x00000000,0x00050051, +0x00000006,0x000008c3,0x000009f3,0x00000000, +0x00060050,0x00000011,0x000008c4,0x000008bf, +0x000008c1,0x000008c3,0x0007000c,0x00000011, +0x000008c5,0x00000001,0x00000025,0x00000d8d, +0x000008c4,0x0007000c,0x00000011,0x00000d93, +0x00000001,0x00000028,0x000008b5,0x000008bc, +0x0007000c,0x00000011,0x00000d94,0x00000001, +0x00000028,0x000008ae,0x00000d93,0x0007000c, +0x00000011,0x000008e3,0x00000001,0x00000028, +0x00000d94,0x000008c4,0x00050083,0x0000000c, +0x000008e7,0x000003f5,0x000007be,0x00050051, +0x00000006,0x000008e9,0x000009cb,0x00000000, +0x00050051,0x00000006,0x000008eb,0x000009d0, +0x00000000,0x00050051,0x00000006,0x000008ed, +0x000009d5,0x00000000,0x00060050,0x00000011, +0x000008ee,0x000008e9,0x000008eb,0x000008ed, +0x00050051,0x00000006,0x00000da8,0x000008e7, +0x00000000,0x00050085,0x00000006,0x00000dab, +0x00000da8,0x00000881,0x00050051,0x00000006, +0x00000dad,0x000008e7,0x00000001,0x00050085, +0x00000006,0x00000db0,0x00000dad,0x00000886, +0x00050081,0x00000006,0x00000db1,0x00000dab, +0x00000db0,0x0004007f,0x00000006,0x00000db7, +0x00000886,0x00050085,0x00000006,0x00000db8, +0x00000da8,0x00000db7,0x00050085,0x00000006, +0x00000dbd,0x00000dad,0x00000881,0x00050081, +0x00000006,0x00000dbe,0x00000db8,0x00000dbd, +0x00050050,0x0000000c,0x000014f8,0x00000db1, +0x00000dbe,0x00050085,0x0000000c,0x00000dc2, +0x000014f8,0x000008a0,0x00050051,0x00000006, +0x00000dc4,0x00000dc2,0x00000000,0x00050085, +0x00000006,0x00000dc7,0x00000dc4,0x00000dc4, +0x00050051,0x00000006,0x00000dc9,0x00000dc2, +0x00000001,0x00050085,0x00000006,0x00000dcc, +0x00000dc9,0x00000dc9,0x00050081,0x00000006, +0x00000dcd,0x00000dc7,0x00000dcc,0x0007000c, +0x00000006,0x00000dd0,0x00000001,0x00000025, +0x00000dcd,0x00000d83,0x00050085,0x00000006, +0x00000dd3,0x0000017f,0x00000dd0,0x00050081, +0x00000006,0x00000dd5,0x00000dd3,0x00000115, +0x00050085,0x00000006,0x00000dd8,0x000008a5, +0x00000dd0,0x00050081,0x00000006,0x00000dda, +0x00000dd8,0x00000115,0x00050085,0x00000006, +0x00000ddd,0x00000dd5,0x00000dd5,0x00050085, +0x00000006,0x00000de0,0x00000dda,0x00000dda, +0x00050085,0x00000006,0x00000de3,0x00000194, +0x00000ddd,0x00050081,0x00000006,0x00000de5, +0x00000de3,0x00000199,0x00050085,0x00000006, +0x00000de8,0x00000de5,0x00000de0,0x0005008e, +0x00000011,0x00000deb,0x000008ee,0x00000de8, +0x00050083,0x0000000c,0x000008f9,0x00000410, +0x000007be,0x00050051,0x00000006,0x000008fb, +0x000009cb,0x00000001,0x00050051,0x00000006, +0x000008fd,0x000009d0,0x00000001,0x00050051, +0x00000006,0x000008ff,0x000009d5,0x00000001, +0x00060050,0x00000011,0x00000900,0x000008fb, +0x000008fd,0x000008ff,0x00050051,0x00000006, +0x00000e0c,0x000008f9,0x00000000,0x00050085, +0x00000006,0x00000e0f,0x00000e0c,0x00000881, +0x00050051,0x00000006,0x00000e11,0x000008f9, +0x00000001,0x00050085,0x00000006,0x00000e14, +0x00000e11,0x00000886,0x00050081,0x00000006, +0x00000e15,0x00000e0f,0x00000e14,0x00050085, +0x00000006,0x00000e1c,0x00000e0c,0x00000db7, +0x00050085,0x00000006,0x00000e21,0x00000e11, +0x00000881,0x00050081,0x00000006,0x00000e22, +0x00000e1c,0x00000e21,0x00050050,0x0000000c, +0x000014f9,0x00000e15,0x00000e22,0x00050085, +0x0000000c,0x00000e26,0x000014f9,0x000008a0, +0x00050051,0x00000006,0x00000e28,0x00000e26, +0x00000000,0x00050085,0x00000006,0x00000e2b, +0x00000e28,0x00000e28,0x00050051,0x00000006, +0x00000e2d,0x00000e26,0x00000001,0x00050085, +0x00000006,0x00000e30,0x00000e2d,0x00000e2d, +0x00050081,0x00000006,0x00000e31,0x00000e2b, +0x00000e30,0x0007000c,0x00000006,0x00000e34, +0x00000001,0x00000025,0x00000e31,0x00000d83, +0x00050085,0x00000006,0x00000e37,0x0000017f, +0x00000e34,0x00050081,0x00000006,0x00000e39, +0x00000e37,0x00000115,0x00050085,0x00000006, +0x00000e3c,0x000008a5,0x00000e34,0x00050081, +0x00000006,0x00000e3e,0x00000e3c,0x00000115, +0x00050085,0x00000006,0x00000e41,0x00000e39, +0x00000e39,0x00050085,0x00000006,0x00000e44, +0x00000e3e,0x00000e3e,0x00050085,0x00000006, +0x00000e47,0x00000194,0x00000e41,0x00050081, +0x00000006,0x00000e49,0x00000e47,0x00000199, +0x00050085,0x00000006,0x00000e4c,0x00000e49, +0x00000e44,0x0005008e,0x00000011,0x00000e4f, +0x00000900,0x00000e4c,0x00050081,0x00000011, +0x00000e51,0x00000deb,0x00000e4f,0x00050081, +0x00000006,0x00000e54,0x00000de8,0x00000e4c, +0x00050083,0x0000000c,0x0000090b,0x0000042b, +0x000007be,0x00050051,0x00000006,0x0000090d, +0x000009da,0x00000000,0x00050051,0x00000006, +0x0000090f,0x000009df,0x00000000,0x00050051, +0x00000006,0x00000911,0x000009e4,0x00000000, +0x00060050,0x00000011,0x00000912,0x0000090d, +0x0000090f,0x00000911,0x00050051,0x00000006, +0x00000e70,0x0000090b,0x00000000,0x00050085, +0x00000006,0x00000e73,0x00000e70,0x00000881, +0x00050051,0x00000006,0x00000e75,0x0000090b, +0x00000001,0x00050085,0x00000006,0x00000e78, +0x00000e75,0x00000886,0x00050081,0x00000006, +0x00000e79,0x00000e73,0x00000e78,0x00050085, +0x00000006,0x00000e80,0x00000e70,0x00000db7, +0x00050085,0x00000006,0x00000e85,0x00000e75, +0x00000881,0x00050081,0x00000006,0x00000e86, +0x00000e80,0x00000e85,0x00050050,0x0000000c, +0x000014fa,0x00000e79,0x00000e86,0x00050085, +0x0000000c,0x00000e8a,0x000014fa,0x000008a0, +0x00050051,0x00000006,0x00000e8c,0x00000e8a, +0x00000000,0x00050085,0x00000006,0x00000e8f, +0x00000e8c,0x00000e8c,0x00050051,0x00000006, +0x00000e91,0x00000e8a,0x00000001,0x00050085, +0x00000006,0x00000e94,0x00000e91,0x00000e91, +0x00050081,0x00000006,0x00000e95,0x00000e8f, +0x00000e94,0x0007000c,0x00000006,0x00000e98, +0x00000001,0x00000025,0x00000e95,0x00000d83, +0x00050085,0x00000006,0x00000e9b,0x0000017f, +0x00000e98,0x00050081,0x00000006,0x00000e9d, +0x00000e9b,0x00000115,0x00050085,0x00000006, +0x00000ea0,0x000008a5,0x00000e98,0x00050081, +0x00000006,0x00000ea2,0x00000ea0,0x00000115, +0x00050085,0x00000006,0x00000ea5,0x00000e9d, +0x00000e9d,0x00050085,0x00000006,0x00000ea8, +0x00000ea2,0x00000ea2,0x00050085,0x00000006, +0x00000eab,0x00000194,0x00000ea5,0x00050081, +0x00000006,0x00000ead,0x00000eab,0x00000199, +0x00050085,0x00000006,0x00000eb0,0x00000ead, +0x00000ea8,0x0005008e,0x00000011,0x00000eb3, +0x00000912,0x00000eb0,0x00050081,0x00000011, +0x00000eb5,0x00000e51,0x00000eb3,0x00050081, +0x00000006,0x00000eb8,0x00000e54,0x00000eb0, +0x00050083,0x0000000c,0x0000091d,0x00000446, +0x000007be,0x00050051,0x00000006,0x00000ed4, +0x0000091d,0x00000000,0x00050085,0x00000006, +0x00000ed7,0x00000ed4,0x00000881,0x00050051, +0x00000006,0x00000ed9,0x0000091d,0x00000001, +0x00050085,0x00000006,0x00000edc,0x00000ed9, +0x00000886,0x00050081,0x00000006,0x00000edd, +0x00000ed7,0x00000edc,0x00050085,0x00000006, +0x00000ee4,0x00000ed4,0x00000db7,0x00050085, +0x00000006,0x00000ee9,0x00000ed9,0x00000881, +0x00050081,0x00000006,0x00000eea,0x00000ee4, +0x00000ee9,0x00050050,0x0000000c,0x000014fb, +0x00000edd,0x00000eea,0x00050085,0x0000000c, +0x00000eee,0x000014fb,0x000008a0,0x00050051, +0x00000006,0x00000ef0,0x00000eee,0x00000000, +0x00050085,0x00000006,0x00000ef3,0x00000ef0, +0x00000ef0,0x00050051,0x00000006,0x00000ef5, +0x00000eee,0x00000001,0x00050085,0x00000006, +0x00000ef8,0x00000ef5,0x00000ef5,0x00050081, +0x00000006,0x00000ef9,0x00000ef3,0x00000ef8, +0x0007000c,0x00000006,0x00000efc,0x00000001, +0x00000025,0x00000ef9,0x00000d83,0x00050085, +0x00000006,0x00000eff,0x0000017f,0x00000efc, +0x00050081,0x00000006,0x00000f01,0x00000eff, +0x00000115,0x00050085,0x00000006,0x00000f04, +0x000008a5,0x00000efc,0x00050081,0x00000006, +0x00000f06,0x00000f04,0x00000115,0x00050085, +0x00000006,0x00000f09,0x00000f01,0x00000f01, +0x00050085,0x00000006,0x00000f0c,0x00000f06, +0x00000f06,0x00050085,0x00000006,0x00000f0f, +0x00000194,0x00000f09,0x00050081,0x00000006, +0x00000f11,0x00000f0f,0x00000199,0x00050085, +0x00000006,0x00000f14,0x00000f11,0x00000f0c, +0x0005008e,0x00000011,0x00000f17,0x000008bc, +0x00000f14,0x00050081,0x00000011,0x00000f19, +0x00000eb5,0x00000f17,0x00050081,0x00000006, +0x00000f1c,0x00000eb8,0x00000f14,0x0004007f, +0x0000000c,0x0000092f,0x000007be,0x00050051, +0x00000006,0x00000f38,0x0000092f,0x00000000, +0x00050085,0x00000006,0x00000f3b,0x00000f38, +0x00000881,0x00050051,0x00000006,0x00000f3d, +0x0000092f,0x00000001,0x00050085,0x00000006, +0x00000f40,0x00000f3d,0x00000886,0x00050081, +0x00000006,0x00000f41,0x00000f3b,0x00000f40, +0x00050085,0x00000006,0x00000f48,0x00000f38, +0x00000db7,0x00050085,0x00000006,0x00000f4d, +0x00000f3d,0x00000881,0x00050081,0x00000006, +0x00000f4e,0x00000f48,0x00000f4d,0x00050050, +0x0000000c,0x000014fc,0x00000f41,0x00000f4e, +0x00050085,0x0000000c,0x00000f52,0x000014fc, +0x000008a0,0x00050051,0x00000006,0x00000f54, +0x00000f52,0x00000000,0x00050085,0x00000006, +0x00000f57,0x00000f54,0x00000f54,0x00050051, +0x00000006,0x00000f59,0x00000f52,0x00000001, +0x00050085,0x00000006,0x00000f5c,0x00000f59, +0x00000f59,0x00050081,0x00000006,0x00000f5d, +0x00000f57,0x00000f5c,0x0007000c,0x00000006, +0x00000f60,0x00000001,0x00000025,0x00000f5d, +0x00000d83,0x00050085,0x00000006,0x00000f63, +0x0000017f,0x00000f60,0x00050081,0x00000006, +0x00000f65,0x00000f63,0x00000115,0x00050085, +0x00000006,0x00000f68,0x000008a5,0x00000f60, +0x00050081,0x00000006,0x00000f6a,0x00000f68, +0x00000115,0x00050085,0x00000006,0x00000f6d, +0x00000f65,0x00000f65,0x00050085,0x00000006, +0x00000f70,0x00000f6a,0x00000f6a,0x00050085, +0x00000006,0x00000f73,0x00000194,0x00000f6d, +0x00050081,0x00000006,0x00000f75,0x00000f73, +0x00000199,0x00050085,0x00000006,0x00000f78, +0x00000f75,0x00000f70,0x0005008e,0x00000011, +0x00000f7b,0x000008ae,0x00000f78,0x00050081, +0x00000011,0x00000f7d,0x00000f19,0x00000f7b, +0x00050081,0x00000006,0x00000f80,0x00000f1c, +0x00000f78,0x00050083,0x0000000c,0x00000941, +0x0000047c,0x000007be,0x00050051,0x00000006, +0x00000943,0x000009da,0x00000003,0x00050051, +0x00000006,0x00000945,0x000009df,0x00000003, +0x00050051,0x00000006,0x00000947,0x000009e4, +0x00000003,0x00060050,0x00000011,0x00000948, +0x00000943,0x00000945,0x00000947,0x00050051, +0x00000006,0x00000f9c,0x00000941,0x00000000, +0x00050085,0x00000006,0x00000f9f,0x00000f9c, +0x00000881,0x00050051,0x00000006,0x00000fa1, +0x00000941,0x00000001,0x00050085,0x00000006, +0x00000fa4,0x00000fa1,0x00000886,0x00050081, +0x00000006,0x00000fa5,0x00000f9f,0x00000fa4, +0x00050085,0x00000006,0x00000fac,0x00000f9c, +0x00000db7,0x00050085,0x00000006,0x00000fb1, +0x00000fa1,0x00000881,0x00050081,0x00000006, +0x00000fb2,0x00000fac,0x00000fb1,0x00050050, +0x0000000c,0x000014fd,0x00000fa5,0x00000fb2, +0x00050085,0x0000000c,0x00000fb6,0x000014fd, +0x000008a0,0x00050051,0x00000006,0x00000fb8, +0x00000fb6,0x00000000,0x00050085,0x00000006, +0x00000fbb,0x00000fb8,0x00000fb8,0x00050051, +0x00000006,0x00000fbd,0x00000fb6,0x00000001, +0x00050085,0x00000006,0x00000fc0,0x00000fbd, +0x00000fbd,0x00050081,0x00000006,0x00000fc1, +0x00000fbb,0x00000fc0,0x0007000c,0x00000006, +0x00000fc4,0x00000001,0x00000025,0x00000fc1, +0x00000d83,0x00050085,0x00000006,0x00000fc7, +0x0000017f,0x00000fc4,0x00050081,0x00000006, +0x00000fc9,0x00000fc7,0x00000115,0x00050085, +0x00000006,0x00000fcc,0x000008a5,0x00000fc4, +0x00050081,0x00000006,0x00000fce,0x00000fcc, +0x00000115,0x00050085,0x00000006,0x00000fd1, +0x00000fc9,0x00000fc9,0x00050085,0x00000006, +0x00000fd4,0x00000fce,0x00000fce,0x00050085, +0x00000006,0x00000fd7,0x00000194,0x00000fd1, +0x00050081,0x00000006,0x00000fd9,0x00000fd7, +0x00000199,0x00050085,0x00000006,0x00000fdc, +0x00000fd9,0x00000fd4,0x0005008e,0x00000011, +0x00000fdf,0x00000948,0x00000fdc,0x00050081, +0x00000011,0x00000fe1,0x00000f7d,0x00000fdf, +0x00050081,0x00000006,0x00000fe4,0x00000f80, +0x00000fdc,0x00050083,0x0000000c,0x00000953, +0x00000497,0x000007be,0x00050051,0x00000006, +0x00001000,0x00000953,0x00000000,0x00050085, +0x00000006,0x00001003,0x00001000,0x00000881, +0x00050051,0x00000006,0x00001005,0x00000953, +0x00000001,0x00050085,0x00000006,0x00001008, +0x00001005,0x00000886,0x00050081,0x00000006, +0x00001009,0x00001003,0x00001008,0x00050085, +0x00000006,0x00001010,0x00001000,0x00000db7, +0x00050085,0x00000006,0x00001015,0x00001005, +0x00000881,0x00050081,0x00000006,0x00001016, +0x00001010,0x00001015,0x00050050,0x0000000c, +0x000014fe,0x00001009,0x00001016,0x00050085, +0x0000000c,0x0000101a,0x000014fe,0x000008a0, +0x00050051,0x00000006,0x0000101c,0x0000101a, +0x00000000,0x00050085,0x00000006,0x0000101f, +0x0000101c,0x0000101c,0x00050051,0x00000006, +0x00001021,0x0000101a,0x00000001,0x00050085, +0x00000006,0x00001024,0x00001021,0x00001021, +0x00050081,0x00000006,0x00001025,0x0000101f, +0x00001024,0x0007000c,0x00000006,0x00001028, +0x00000001,0x00000025,0x00001025,0x00000d83, +0x00050085,0x00000006,0x0000102b,0x0000017f, +0x00001028,0x00050081,0x00000006,0x0000102d, +0x0000102b,0x00000115,0x00050085,0x00000006, +0x00001030,0x000008a5,0x00001028,0x00050081, +0x00000006,0x00001032,0x00001030,0x00000115, +0x00050085,0x00000006,0x00001035,0x0000102d, +0x0000102d,0x00050085,0x00000006,0x00001038, +0x00001032,0x00001032,0x00050085,0x00000006, +0x0000103b,0x00000194,0x00001035,0x00050081, +0x00000006,0x0000103d,0x0000103b,0x00000199, +0x00050085,0x00000006,0x00001040,0x0000103d, +0x00001038,0x0005008e,0x00000011,0x00001043, +0x000008c4,0x00001040,0x00050081,0x00000011, +0x00001045,0x00000fe1,0x00001043,0x00050081, +0x00000006,0x00001048,0x00000fe4,0x00001040, +0x00050083,0x0000000c,0x00000965,0x000004b2, +0x000007be,0x00050051,0x00000006,0x00000967, +0x000009e9,0x00000001,0x00050051,0x00000006, +0x00000969,0x000009ee,0x00000001,0x00050051, +0x00000006,0x0000096b,0x000009f3,0x00000001, +0x00060050,0x00000011,0x0000096c,0x00000967, +0x00000969,0x0000096b,0x00050051,0x00000006, +0x00001064,0x00000965,0x00000000,0x00050085, +0x00000006,0x00001067,0x00001064,0x00000881, +0x00050051,0x00000006,0x00001069,0x00000965, +0x00000001,0x00050085,0x00000006,0x0000106c, +0x00001069,0x00000886,0x00050081,0x00000006, +0x0000106d,0x00001067,0x0000106c,0x00050085, +0x00000006,0x00001074,0x00001064,0x00000db7, +0x00050085,0x00000006,0x00001079,0x00001069, +0x00000881,0x00050081,0x00000006,0x0000107a, +0x00001074,0x00001079,0x00050050,0x0000000c, +0x000014ff,0x0000106d,0x0000107a,0x00050085, +0x0000000c,0x0000107e,0x000014ff,0x000008a0, +0x00050051,0x00000006,0x00001080,0x0000107e, +0x00000000,0x00050085,0x00000006,0x00001083, +0x00001080,0x00001080,0x00050051,0x00000006, +0x00001085,0x0000107e,0x00000001,0x00050085, +0x00000006,0x00001088,0x00001085,0x00001085, +0x00050081,0x00000006,0x00001089,0x00001083, +0x00001088,0x0007000c,0x00000006,0x0000108c, +0x00000001,0x00000025,0x00001089,0x00000d83, +0x00050085,0x00000006,0x0000108f,0x0000017f, +0x0000108c,0x00050081,0x00000006,0x00001091, +0x0000108f,0x00000115,0x00050085,0x00000006, +0x00001094,0x000008a5,0x0000108c,0x00050081, +0x00000006,0x00001096,0x00001094,0x00000115, +0x00050085,0x00000006,0x00001099,0x00001091, +0x00001091,0x00050085,0x00000006,0x0000109c, +0x00001096,0x00001096,0x00050085,0x00000006, +0x0000109f,0x00000194,0x00001099,0x00050081, +0x00000006,0x000010a1,0x0000109f,0x00000199, +0x00050085,0x00000006,0x000010a4,0x000010a1, +0x0000109c,0x0005008e,0x00000011,0x000010a7, +0x0000096c,0x000010a4,0x00050081,0x00000011, +0x000010a9,0x00001045,0x000010a7,0x00050081, +0x00000006,0x000010ac,0x00001048,0x000010a4, +0x00050083,0x0000000c,0x00000977,0x000004cd, +0x000007be,0x00050051,0x00000006,0x00000979, +0x000009e9,0x00000002,0x00050051,0x00000006, +0x0000097b,0x000009ee,0x00000002,0x00050051, +0x00000006,0x0000097d,0x000009f3,0x00000002, +0x00060050,0x00000011,0x0000097e,0x00000979, +0x0000097b,0x0000097d,0x00050051,0x00000006, +0x000010c8,0x00000977,0x00000000,0x00050085, +0x00000006,0x000010cb,0x000010c8,0x00000881, +0x00050051,0x00000006,0x000010cd,0x00000977, +0x00000001,0x00050085,0x00000006,0x000010d0, +0x000010cd,0x00000886,0x00050081,0x00000006, +0x000010d1,0x000010cb,0x000010d0,0x00050085, +0x00000006,0x000010d8,0x000010c8,0x00000db7, +0x00050085,0x00000006,0x000010dd,0x000010cd, +0x00000881,0x00050081,0x00000006,0x000010de, +0x000010d8,0x000010dd,0x00050050,0x0000000c, +0x00001500,0x000010d1,0x000010de,0x00050085, +0x0000000c,0x000010e2,0x00001500,0x000008a0, +0x00050051,0x00000006,0x000010e4,0x000010e2, +0x00000000,0x00050085,0x00000006,0x000010e7, +0x000010e4,0x000010e4,0x00050051,0x00000006, +0x000010e9,0x000010e2,0x00000001,0x00050085, +0x00000006,0x000010ec,0x000010e9,0x000010e9, +0x00050081,0x00000006,0x000010ed,0x000010e7, +0x000010ec,0x0007000c,0x00000006,0x000010f0, +0x00000001,0x00000025,0x000010ed,0x00000d83, +0x00050085,0x00000006,0x000010f3,0x0000017f, +0x000010f0,0x00050081,0x00000006,0x000010f5, +0x000010f3,0x00000115,0x00050085,0x00000006, +0x000010f8,0x000008a5,0x000010f0,0x00050081, +0x00000006,0x000010fa,0x000010f8,0x00000115, +0x00050085,0x00000006,0x000010fd,0x000010f5, +0x000010f5,0x00050085,0x00000006,0x00001100, +0x000010fa,0x000010fa,0x00050085,0x00000006, +0x00001103,0x00000194,0x000010fd,0x00050081, +0x00000006,0x00001105,0x00001103,0x00000199, +0x00050085,0x00000006,0x00001108,0x00001105, +0x00001100,0x0005008e,0x00000011,0x0000110b, +0x0000097e,0x00001108,0x00050081,0x00000011, +0x0000110d,0x000010a9,0x0000110b,0x00050081, +0x00000006,0x00001110,0x000010ac,0x00001108, +0x00050083,0x0000000c,0x00000989,0x000004e8, +0x000007be,0x00050051,0x00000006,0x0000112c, +0x00000989,0x00000000,0x00050085,0x00000006, +0x0000112f,0x0000112c,0x00000881,0x00050051, +0x00000006,0x00001131,0x00000989,0x00000001, +0x00050085,0x00000006,0x00001134,0x00001131, +0x00000886,0x00050081,0x00000006,0x00001135, +0x0000112f,0x00001134,0x00050085,0x00000006, +0x0000113c,0x0000112c,0x00000db7,0x00050085, +0x00000006,0x00001141,0x00001131,0x00000881, +0x00050081,0x00000006,0x00001142,0x0000113c, +0x00001141,0x00050050,0x0000000c,0x00001501, +0x00001135,0x00001142,0x00050085,0x0000000c, +0x00001146,0x00001501,0x000008a0,0x00050051, +0x00000006,0x00001148,0x00001146,0x00000000, +0x00050085,0x00000006,0x0000114b,0x00001148, +0x00001148,0x00050051,0x00000006,0x0000114d, +0x00001146,0x00000001,0x00050085,0x00000006, +0x00001150,0x0000114d,0x0000114d,0x00050081, +0x00000006,0x00001151,0x0000114b,0x00001150, +0x0007000c,0x00000006,0x00001154,0x00000001, +0x00000025,0x00001151,0x00000d83,0x00050085, +0x00000006,0x00001157,0x0000017f,0x00001154, +0x00050081,0x00000006,0x00001159,0x00001157, +0x00000115,0x00050085,0x00000006,0x0000115c, +0x000008a5,0x00001154,0x00050081,0x00000006, +0x0000115e,0x0000115c,0x00000115,0x00050085, +0x00000006,0x00001161,0x00001159,0x00001159, +0x00050085,0x00000006,0x00001164,0x0000115e, +0x0000115e,0x00050085,0x00000006,0x00001167, +0x00000194,0x00001161,0x00050081,0x00000006, +0x00001169,0x00001167,0x00000199,0x00050085, +0x00000006,0x0000116c,0x00001169,0x00001164, +0x0005008e,0x00000011,0x0000116f,0x000008b5, +0x0000116c,0x00050081,0x00000011,0x00001171, +0x0000110d,0x0000116f,0x00050081,0x00000006, +0x00001174,0x00001110,0x0000116c,0x00050083, +0x0000000c,0x0000099b,0x00000503,0x000007be, +0x00050051,0x00000006,0x0000099d,0x000009f8, +0x00000002,0x00050051,0x00000006,0x0000099f, +0x000009fd,0x00000002,0x00050051,0x00000006, +0x000009a1,0x00000a02,0x00000002,0x00060050, +0x00000011,0x000009a2,0x0000099d,0x0000099f, +0x000009a1,0x00050051,0x00000006,0x00001190, +0x0000099b,0x00000000,0x00050085,0x00000006, +0x00001193,0x00001190,0x00000881,0x00050051, +0x00000006,0x00001195,0x0000099b,0x00000001, +0x00050085,0x00000006,0x00001198,0x00001195, +0x00000886,0x00050081,0x00000006,0x00001199, +0x00001193,0x00001198,0x00050085,0x00000006, +0x000011a0,0x00001190,0x00000db7,0x00050085, +0x00000006,0x000011a5,0x00001195,0x00000881, +0x00050081,0x00000006,0x000011a6,0x000011a0, +0x000011a5,0x00050050,0x0000000c,0x00001502, +0x00001199,0x000011a6,0x00050085,0x0000000c, +0x000011aa,0x00001502,0x000008a0,0x00050051, +0x00000006,0x000011ac,0x000011aa,0x00000000, +0x00050085,0x00000006,0x000011af,0x000011ac, +0x000011ac,0x00050051,0x00000006,0x000011b1, +0x000011aa,0x00000001,0x00050085,0x00000006, +0x000011b4,0x000011b1,0x000011b1,0x00050081, +0x00000006,0x000011b5,0x000011af,0x000011b4, +0x0007000c,0x00000006,0x000011b8,0x00000001, +0x00000025,0x000011b5,0x00000d83,0x00050085, +0x00000006,0x000011bb,0x0000017f,0x000011b8, +0x00050081,0x00000006,0x000011bd,0x000011bb, +0x00000115,0x00050085,0x00000006,0x000011c0, +0x000008a5,0x000011b8,0x00050081,0x00000006, +0x000011c2,0x000011c0,0x00000115,0x00050085, +0x00000006,0x000011c5,0x000011bd,0x000011bd, +0x00050085,0x00000006,0x000011c8,0x000011c2, +0x000011c2,0x00050085,0x00000006,0x000011cb, +0x00000194,0x000011c5,0x00050081,0x00000006, +0x000011cd,0x000011cb,0x00000199,0x00050085, +0x00000006,0x000011d0,0x000011cd,0x000011c8, +0x0005008e,0x00000011,0x000011d3,0x000009a2, +0x000011d0,0x00050081,0x00000011,0x000011d5, +0x00001171,0x000011d3,0x00050081,0x00000006, +0x000011d8,0x00001174,0x000011d0,0x00050083, +0x0000000c,0x000009ad,0x0000051e,0x000007be, +0x00050051,0x00000006,0x000009af,0x000009f8, +0x00000003,0x00050051,0x00000006,0x000009b1, +0x000009fd,0x00000003,0x00050051,0x00000006, +0x000009b3,0x00000a02,0x00000003,0x00060050, +0x00000011,0x000009b4,0x000009af,0x000009b1, +0x000009b3,0x00050051,0x00000006,0x000011f4, +0x000009ad,0x00000000,0x00050085,0x00000006, +0x000011f7,0x000011f4,0x00000881,0x00050051, +0x00000006,0x000011f9,0x000009ad,0x00000001, +0x00050085,0x00000006,0x000011fc,0x000011f9, +0x00000886,0x00050081,0x00000006,0x000011fd, +0x000011f7,0x000011fc,0x00050085,0x00000006, +0x00001204,0x000011f4,0x00000db7,0x00050085, +0x00000006,0x00001209,0x000011f9,0x00000881, +0x00050081,0x00000006,0x0000120a,0x00001204, +0x00001209,0x00050050,0x0000000c,0x00001503, +0x000011fd,0x0000120a,0x00050085,0x0000000c, +0x0000120e,0x00001503,0x000008a0,0x00050051, +0x00000006,0x00001210,0x0000120e,0x00000000, +0x00050085,0x00000006,0x00001213,0x00001210, +0x00001210,0x00050051,0x00000006,0x00001215, +0x0000120e,0x00000001,0x00050085,0x00000006, +0x00001218,0x00001215,0x00001215,0x00050081, +0x00000006,0x00001219,0x00001213,0x00001218, +0x0007000c,0x00000006,0x0000121c,0x00000001, +0x00000025,0x00001219,0x00000d83,0x00050085, +0x00000006,0x0000121f,0x0000017f,0x0000121c, +0x00050081,0x00000006,0x00001221,0x0000121f, +0x00000115,0x00050085,0x00000006,0x00001224, +0x000008a5,0x0000121c,0x00050081,0x00000006, +0x00001226,0x00001224,0x00000115,0x00050085, +0x00000006,0x00001229,0x00001221,0x00001221, +0x00050085,0x00000006,0x0000122c,0x00001226, +0x00001226,0x00050085,0x00000006,0x0000122f, +0x00000194,0x00001229,0x00050081,0x00000006, +0x00001231,0x0000122f,0x00000199,0x00050085, +0x00000006,0x00001234,0x00001231,0x0000122c, +0x0005008e,0x00000011,0x00001237,0x000009b4, +0x00001234,0x00050081,0x00000011,0x00001239, +0x000011d5,0x00001237,0x00050081,0x00000006, +0x0000123c,0x000011d8,0x00001234,0x00050088, +0x00000006,0x00001251,0x0000009a,0x0000123c, +0x00060050,0x00000011,0x00001258,0x00001251, +0x00001251,0x00001251,0x00050085,0x00000011, +0x000009c4,0x00001239,0x00001258,0x0007000c, +0x00000011,0x000009c5,0x00000001,0x00000028, +0x000008c5,0x000009c4,0x0007000c,0x00000011, +0x000009c6,0x00000001,0x00000025,0x000008e3, +0x000009c5,0x0004003d,0x00000597,0x0000059a, +0x00000599,0x0008000c,0x00000011,0x0000059f, +0x00000001,0x0000002b,0x000009c6,0x000014e8, +0x000014e9,0x00050051,0x00000006,0x000005a0, +0x0000059f,0x00000000,0x00050051,0x00000006, +0x000005a1,0x0000059f,0x00000001,0x00050051, +0x00000006,0x000005a2,0x0000059f,0x00000002, +0x00070050,0x00000016,0x000005a3,0x000005a0, +0x000005a1,0x000005a2,0x0000009a,0x00040063, +0x0000059a,0x0000054c,0x000005a3,0x000200f9, +0x000005a6,0x000200f8,0x000005a6,0x000100fd, +0x00010038} diff --git a/app/src/shaders/enhance_final.comp b/app/src/shaders/enhance_final.comp new file mode 100644 index 0000000..67ed533 --- /dev/null +++ b/app/src/shaders/enhance_final.comp @@ -0,0 +1,73 @@ +#version 450 +// Picture enhancement, last pass, at the window's size: contrast-adaptive +// sharpening, the compare split (original on the left) and dithering. +// +// Sharpening follows the idea of AMD's CAS: sharpen each pixel by how much +// room its neighbourhood leaves before clipping, so flat areas and strong edges +// get little and soft detail gets the most. No halos, no noise boost. +layout(local_size_x = 16, local_size_y = 16) in; + +layout(binding = 0, rgba8) uniform writeonly image2D dst; +layout(binding = 1) uniform sampler2D processed; // window-sized, nearest reads +layout(binding = 2) uniform sampler2D original; // the stream's own picture, linear + +layout(push_constant) uniform Params { + ivec2 size; + float sharpness; // 0..1, 0 = off + float dither; // 0..1 + float split; // 0 = off, else the split's x as a fraction of the width + uint frame; +} p; + +uint hash(uvec3 v) +{ + uint h = v.x * 0x8da6b343u ^ v.y * 0xd8163841u ^ v.z * 0xcb1ab31fu; + h ^= h >> 15; h *= 0x2c1b3c6du; h ^= h >> 12; h *= 0x297a2d39u; h ^= h >> 15; + return h; +} + +vec3 fetch(ivec2 at) { return texelFetch(processed, clamp(at, ivec2(0), p.size - 1), 0).rgb; } + +void main() +{ + ivec2 at = ivec2(gl_GlobalInvocationID.xy); + if (at.x >= p.size.x || at.y >= p.size.y) return; + vec2 uv = (vec2(at) + 0.5) / vec2(p.size); + + vec3 c; + float split_x = p.split * float(p.size.x); + if (p.split > 0.0 && float(at.x) < split_x) { + c = textureLod(original, uv, 0.0).rgb; + } else { + c = fetch(at); + if (p.sharpness > 0.0) { + vec3 n = fetch(at + ivec2(0, -1)), w = fetch(at + ivec2(-1, 0)); + vec3 e = fetch(at + ivec2(1, 0)), s = fetch(at + ivec2(0, 1)); + vec3 mn = min(c, min(min(n, w), min(e, s))); + vec3 mx = max(c, max(max(n, w), max(e, s))); + // Diagonals widen the min/max for a steadier amount (cheap: 4 reads). + vec3 nw = fetch(at + ivec2(-1, -1)), ne = fetch(at + ivec2(1, -1)); + vec3 sw = fetch(at + ivec2(-1, 1)), se = fetch(at + ivec2(1, 1)); + vec3 mn2 = min(mn, min(min(nw, ne), min(sw, se))); + vec3 mx2 = max(mx, max(max(nw, ne), max(sw, se))); + mn += mn2; mx += mx2; + vec3 amp = sqrt(clamp(min(mn, 2.0 - mx) / max(mx, vec3(1e-4)), 0.0, 1.0)); + float peak = -1.0 / mix(8.0, 4.5, p.sharpness); + vec3 wgt = amp * peak; + c = clamp((c + (n + w + e + s) * wgt) / (1.0 + 4.0 * wgt), 0.0, 1.0); + } + } + + // The split: a thin light line between original and processed. + if (p.split > 0.0 && abs(float(at.x) + 0.5 - split_x) < 1.0) c = mix(c, vec3(1.0), 0.8); + + // Dithering: up to one 8-bit step of triangular noise, so gradients don't + // show steps when written to the 8-bit picture. + if (p.dither > 0.0) { + uint h = hash(uvec3(at, p.frame)); + float r = (float(h & 0xffffu) + float(h >> 16)) / 65535.0 - 1.0; + c += r * p.dither / 255.0; + } + + imageStore(dst, at, vec4(clamp(c, 0.0, 1.0), 1.0)); +} diff --git a/app/src/shaders/enhance_final.spv.inc b/app/src/shaders/enhance_final.spv.inc new file mode 100644 index 0000000..a022aa9 --- /dev/null +++ b/app/src/shaders/enhance_final.spv.inc @@ -0,0 +1,381 @@ +{0x07230203,0x00010000,0x000d000b,0x00000226, +0x00000000,0x00020011,0x00000001,0x0006000b, +0x00000001,0x4c534c47,0x6474732e,0x3035342e, +0x00000000,0x0003000e,0x00000000,0x00000001, +0x0006000f,0x00000005,0x00000004,0x6e69616d, +0x00000000,0x0000005a,0x00060010,0x00000004, +0x00000011,0x00000010,0x00000010,0x00000001, +0x00040047,0x00000043,0x00000021,0x00000001, +0x00040047,0x00000043,0x00000022,0x00000000, +0x00030047,0x00000048,0x00000002,0x00050048, +0x00000048,0x00000000,0x00000023,0x00000000, +0x00050048,0x00000048,0x00000001,0x00000023, +0x00000008,0x00050048,0x00000048,0x00000002, +0x00000023,0x0000000c,0x00050048,0x00000048, +0x00000003,0x00000023,0x00000010,0x00050048, +0x00000048,0x00000004,0x00000023,0x00000014, +0x00040047,0x0000005a,0x0000000b,0x0000001c, +0x00040047,0x00000099,0x00000021,0x00000002, +0x00040047,0x00000099,0x00000022,0x00000000, +0x00030047,0x00000176,0x00000019,0x00040047, +0x00000176,0x00000021,0x00000000,0x00040047, +0x00000176,0x00000022,0x00000000,0x00040047, +0x00000182,0x0000000b,0x00000019,0x00020013, +0x00000002,0x00030021,0x00000003,0x00000002, +0x00040015,0x00000006,0x00000020,0x00000000, +0x00040017,0x00000007,0x00000006,0x00000003, +0x00040015,0x0000000d,0x00000020,0x00000001, +0x00040017,0x0000000e,0x0000000d,0x00000002, +0x00030016,0x00000010,0x00000020,0x00040017, +0x00000011,0x00000010,0x00000003,0x0004002b, +0x00000006,0x00000018,0x00000000,0x0004002b, +0x00000006,0x0000001b,0x8da6b343,0x0004002b, +0x00000006,0x0000001d,0x00000001,0x0004002b, +0x00000006,0x00000020,0xd8163841,0x0004002b, +0x00000006,0x00000026,0xcb1ab31f,0x0004002b, +0x0000000d,0x0000002a,0x0000000f,0x0004002b, +0x00000006,0x0000002e,0x2c1b3c6d,0x0004002b, +0x0000000d,0x00000032,0x0000000c,0x0004002b, +0x00000006,0x00000036,0x297a2d39,0x00090019, +0x00000040,0x00000010,0x00000001,0x00000000, +0x00000000,0x00000000,0x00000001,0x00000000, +0x0003001b,0x00000041,0x00000040,0x00040020, +0x00000042,0x00000000,0x00000041,0x0004003b, +0x00000042,0x00000043,0x00000000,0x0004002b, +0x0000000d,0x00000046,0x00000000,0x0005002c, +0x0000000e,0x00000047,0x00000046,0x00000046, +0x0007001e,0x00000048,0x0000000e,0x00000010, +0x00000010,0x00000010,0x00000006,0x00040020, +0x00000049,0x00000009,0x00000048,0x0004003b, +0x00000049,0x0000004a,0x00000009,0x00040020, +0x0000004b,0x00000009,0x0000000e,0x0004002b, +0x0000000d,0x0000004e,0x00000001,0x00040017, +0x00000053,0x00000010,0x00000004,0x00040020, +0x00000059,0x00000001,0x00000007,0x0004003b, +0x00000059,0x0000005a,0x00000001,0x00040017, +0x0000005b,0x00000006,0x00000002,0x00020014, +0x0000005f,0x00040020,0x00000063,0x00000009, +0x0000000d,0x00040017,0x00000073,0x00000010, +0x00000002,0x0004002b,0x00000010,0x00000078, +0x3f000000,0x0004002b,0x0000000d,0x00000081, +0x00000003,0x00040020,0x00000082,0x00000009, +0x00000010,0x0004002b,0x00000010,0x0000008b, +0x00000000,0x0004003b,0x00000042,0x00000099, +0x00000000,0x0004002b,0x0000000d,0x000000a9, +0xffffffff,0x0005002c,0x0000000e,0x000000aa, +0x00000046,0x000000a9,0x0005002c,0x0000000e, +0x000000b0,0x000000a9,0x00000046,0x0005002c, +0x0000000e,0x000000b6,0x0000004e,0x00000046, +0x0005002c,0x0000000e,0x000000bc,0x00000046, +0x0000004e,0x0005002c,0x0000000e,0x000000d6, +0x000000a9,0x000000a9,0x0005002c,0x0000000e, +0x000000dc,0x0000004e,0x000000a9,0x0005002c, +0x0000000e,0x000000e2,0x000000a9,0x0000004e, +0x0005002c,0x0000000e,0x000000e8,0x0000004e, +0x0000004e,0x0004002b,0x00000010,0x00000108, +0x40000000,0x0004002b,0x00000010,0x0000010e, +0x38d1b717,0x0006002c,0x00000011,0x0000010f, +0x0000010e,0x0000010e,0x0000010e,0x0004002b, +0x00000010,0x00000112,0x3f800000,0x0004002b, +0x00000010,0x00000118,0xbf800000,0x0004002b, +0x00000010,0x00000119,0x41000000,0x0004002b, +0x00000010,0x0000011a,0x40900000,0x0004002b, +0x00000010,0x0000012e,0x40800000,0x0006002c, +0x00000011,0x00000148,0x00000112,0x00000112, +0x00000112,0x0004002b,0x00000010,0x00000149, +0x3f4ccccd,0x0004002b,0x0000000d,0x0000014c, +0x00000002,0x0004002b,0x0000000d,0x00000155, +0x00000004,0x00040020,0x00000156,0x00000009, +0x00000006,0x0004002b,0x00000006,0x00000160, +0x0000ffff,0x0004002b,0x0000000d,0x00000164, +0x00000010,0x00090019,0x00000174,0x00000010, +0x00000001,0x00000000,0x00000000,0x00000000, +0x00000002,0x00000004,0x00040020,0x00000175, +0x00000000,0x00000174,0x0004003b,0x00000175, +0x00000176,0x00000000,0x0004002b,0x00000006, +0x00000181,0x00000010,0x0006002c,0x00000007, +0x00000182,0x00000181,0x00000181,0x0000001d, +0x0005002c,0x00000073,0x00000220,0x00000078, +0x00000078,0x0006002c,0x00000011,0x00000221, +0x00000108,0x00000108,0x00000108,0x0006002c, +0x00000011,0x00000222,0x0000008b,0x0000008b, +0x0000008b,0x0006002c,0x00000011,0x00000223, +0x00000149,0x00000149,0x00000149,0x0004002b, +0x00000010,0x00000224,0x37800080,0x0004002b, +0x00000010,0x00000225,0x3b808081,0x00050036, +0x00000002,0x00000004,0x00000000,0x00000003, +0x000200f8,0x00000005,0x000300f7,0x00000183, +0x00000000,0x000300fb,0x00000018,0x00000184, +0x000200f8,0x00000184,0x0004003d,0x00000007, +0x0000005c,0x0000005a,0x0007004f,0x0000005b, +0x0000005d,0x0000005c,0x0000005c,0x00000000, +0x00000001,0x0004007c,0x0000000e,0x0000005e, +0x0000005d,0x00050051,0x0000000d,0x00000062, +0x0000005e,0x00000000,0x00060041,0x00000063, +0x00000064,0x0000004a,0x00000046,0x00000018, +0x0004003d,0x0000000d,0x00000065,0x00000064, +0x000500af,0x0000005f,0x00000066,0x00000062, +0x00000065,0x000400a8,0x0000005f,0x00000067, +0x00000066,0x000300f7,0x00000069,0x00000000, +0x000400fa,0x00000067,0x00000068,0x00000069, +0x000200f8,0x00000068,0x00050051,0x0000000d, +0x0000006b,0x0000005e,0x00000001,0x00060041, +0x00000063,0x0000006c,0x0000004a,0x00000046, +0x0000001d,0x0004003d,0x0000000d,0x0000006d, +0x0000006c,0x000500af,0x0000005f,0x0000006e, +0x0000006b,0x0000006d,0x000200f9,0x00000069, +0x000200f8,0x00000069,0x000700f5,0x0000005f, +0x0000006f,0x00000066,0x00000184,0x0000006e, +0x00000068,0x000300f7,0x00000071,0x00000000, +0x000400fa,0x0000006f,0x00000070,0x00000071, +0x000200f8,0x00000070,0x000200f9,0x00000183, +0x000200f8,0x00000071,0x0004006f,0x00000073, +0x00000077,0x0000005e,0x00050081,0x00000073, +0x0000007a,0x00000077,0x00000220,0x00050041, +0x0000004b,0x0000007b,0x0000004a,0x00000046, +0x0004003d,0x0000000e,0x0000007c,0x0000007b, +0x0004006f,0x00000073,0x0000007d,0x0000007c, +0x00050088,0x00000073,0x0000007e,0x0000007a, +0x0000007d,0x00050041,0x00000082,0x00000083, +0x0000004a,0x00000081,0x0004003d,0x00000010, +0x00000084,0x00000083,0x0004006f,0x00000010, +0x00000087,0x00000065,0x00050085,0x00000010, +0x00000088,0x00000084,0x00000087,0x000500ba, +0x0000005f,0x0000008c,0x00000084,0x0000008b, +0x000300f7,0x0000008e,0x00000000,0x000400fa, +0x0000008c,0x0000008d,0x0000008e,0x000200f8, +0x0000008d,0x0004006f,0x00000010,0x00000091, +0x00000062,0x000500b8,0x0000005f,0x00000093, +0x00000091,0x00000088,0x000200f9,0x0000008e, +0x000200f8,0x0000008e,0x000700f5,0x0000005f, +0x00000094,0x0000008c,0x00000071,0x00000093, +0x0000008d,0x000300f7,0x00000096,0x00000000, +0x000400fa,0x00000094,0x00000095,0x0000009e, +0x000200f8,0x00000095,0x0004003d,0x00000041, +0x0000009a,0x00000099,0x00070058,0x00000053, +0x0000009c,0x0000009a,0x0000007e,0x00000002, +0x0000008b,0x0008004f,0x00000011,0x0000009d, +0x0000009c,0x0000009c,0x00000000,0x00000001, +0x00000002,0x000200f9,0x00000096,0x000200f8, +0x0000009e,0x0004003d,0x00000041,0x0000018b, +0x00000043,0x00050082,0x0000000e,0x00000190, +0x0000007c,0x000000e8,0x0008000c,0x0000000e, +0x00000191,0x00000001,0x0000002d,0x0000005e, +0x00000047,0x00000190,0x00040064,0x00000040, +0x00000192,0x0000018b,0x0007005f,0x00000053, +0x00000193,0x00000192,0x00000191,0x00000002, +0x00000046,0x0008004f,0x00000011,0x00000194, +0x00000193,0x00000193,0x00000000,0x00000001, +0x00000002,0x00050041,0x00000082,0x000000a2, +0x0000004a,0x0000004e,0x0004003d,0x00000010, +0x000000a3,0x000000a2,0x000500ba,0x0000005f, +0x000000a4,0x000000a3,0x0000008b,0x000300f7, +0x000000a6,0x00000000,0x000400fa,0x000000a4, +0x000000a5,0x000000a6,0x000200f8,0x000000a5, +0x00050080,0x0000000e,0x000000ab,0x0000005e, +0x000000aa,0x0004003d,0x00000041,0x00000197, +0x00000043,0x0008000c,0x0000000e,0x0000019d, +0x00000001,0x0000002d,0x000000ab,0x00000047, +0x00000190,0x00040064,0x00000040,0x0000019e, +0x00000197,0x0007005f,0x00000053,0x0000019f, +0x0000019e,0x0000019d,0x00000002,0x00000046, +0x0008004f,0x00000011,0x000001a0,0x0000019f, +0x0000019f,0x00000000,0x00000001,0x00000002, +0x00050080,0x0000000e,0x000000b1,0x0000005e, +0x000000b0,0x0004003d,0x00000041,0x000001a3, +0x00000043,0x0008000c,0x0000000e,0x000001a9, +0x00000001,0x0000002d,0x000000b1,0x00000047, +0x00000190,0x00040064,0x00000040,0x000001aa, +0x000001a3,0x0007005f,0x00000053,0x000001ab, +0x000001aa,0x000001a9,0x00000002,0x00000046, +0x0008004f,0x00000011,0x000001ac,0x000001ab, +0x000001ab,0x00000000,0x00000001,0x00000002, +0x00050080,0x0000000e,0x000000b7,0x0000005e, +0x000000b6,0x0004003d,0x00000041,0x000001af, +0x00000043,0x0008000c,0x0000000e,0x000001b5, +0x00000001,0x0000002d,0x000000b7,0x00000047, +0x00000190,0x00040064,0x00000040,0x000001b6, +0x000001af,0x0007005f,0x00000053,0x000001b7, +0x000001b6,0x000001b5,0x00000002,0x00000046, +0x0008004f,0x00000011,0x000001b8,0x000001b7, +0x000001b7,0x00000000,0x00000001,0x00000002, +0x00050080,0x0000000e,0x000000bd,0x0000005e, +0x000000bc,0x0004003d,0x00000041,0x000001bb, +0x00000043,0x0008000c,0x0000000e,0x000001c1, +0x00000001,0x0000002d,0x000000bd,0x00000047, +0x00000190,0x00040064,0x00000040,0x000001c2, +0x000001bb,0x0007005f,0x00000053,0x000001c3, +0x000001c2,0x000001c1,0x00000002,0x00000046, +0x0008004f,0x00000011,0x000001c4,0x000001c3, +0x000001c3,0x00000000,0x00000001,0x00000002, +0x0007000c,0x00000011,0x000000c4,0x00000001, +0x00000025,0x000001a0,0x000001ac,0x0007000c, +0x00000011,0x000000c7,0x00000001,0x00000025, +0x000001b8,0x000001c4,0x0007000c,0x00000011, +0x000000c8,0x00000001,0x00000025,0x000000c4, +0x000000c7,0x0007000c,0x00000011,0x000000c9, +0x00000001,0x00000025,0x00000194,0x000000c8, +0x0007000c,0x00000011,0x000000ce,0x00000001, +0x00000028,0x000001a0,0x000001ac,0x0007000c, +0x00000011,0x000000d1,0x00000001,0x00000028, +0x000001b8,0x000001c4,0x0007000c,0x00000011, +0x000000d2,0x00000001,0x00000028,0x000000ce, +0x000000d1,0x0007000c,0x00000011,0x000000d3, +0x00000001,0x00000028,0x00000194,0x000000d2, +0x00050080,0x0000000e,0x000000d7,0x0000005e, +0x000000d6,0x0004003d,0x00000041,0x000001c7, +0x00000043,0x0008000c,0x0000000e,0x000001cd, +0x00000001,0x0000002d,0x000000d7,0x00000047, +0x00000190,0x00040064,0x00000040,0x000001ce, +0x000001c7,0x0007005f,0x00000053,0x000001cf, +0x000001ce,0x000001cd,0x00000002,0x00000046, +0x0008004f,0x00000011,0x000001d0,0x000001cf, +0x000001cf,0x00000000,0x00000001,0x00000002, +0x00050080,0x0000000e,0x000000dd,0x0000005e, +0x000000dc,0x0004003d,0x00000041,0x000001d3, +0x00000043,0x0008000c,0x0000000e,0x000001d9, +0x00000001,0x0000002d,0x000000dd,0x00000047, +0x00000190,0x00040064,0x00000040,0x000001da, +0x000001d3,0x0007005f,0x00000053,0x000001db, +0x000001da,0x000001d9,0x00000002,0x00000046, +0x0008004f,0x00000011,0x000001dc,0x000001db, +0x000001db,0x00000000,0x00000001,0x00000002, +0x00050080,0x0000000e,0x000000e3,0x0000005e, +0x000000e2,0x0004003d,0x00000041,0x000001df, +0x00000043,0x0008000c,0x0000000e,0x000001e5, +0x00000001,0x0000002d,0x000000e3,0x00000047, +0x00000190,0x00040064,0x00000040,0x000001e6, +0x000001df,0x0007005f,0x00000053,0x000001e7, +0x000001e6,0x000001e5,0x00000002,0x00000046, +0x0008004f,0x00000011,0x000001e8,0x000001e7, +0x000001e7,0x00000000,0x00000001,0x00000002, +0x00050080,0x0000000e,0x000000e9,0x0000005e, +0x000000e8,0x0004003d,0x00000041,0x000001eb, +0x00000043,0x0008000c,0x0000000e,0x000001f1, +0x00000001,0x0000002d,0x000000e9,0x00000047, +0x00000190,0x00040064,0x00000040,0x000001f2, +0x000001eb,0x0007005f,0x00000053,0x000001f3, +0x000001f2,0x000001f1,0x00000002,0x00000046, +0x0008004f,0x00000011,0x000001f4,0x000001f3, +0x000001f3,0x00000000,0x00000001,0x00000002, +0x0007000c,0x00000011,0x000000f0,0x00000001, +0x00000025,0x000001d0,0x000001dc,0x0007000c, +0x00000011,0x000000f3,0x00000001,0x00000025, +0x000001e8,0x000001f4,0x0007000c,0x00000011, +0x000000f4,0x00000001,0x00000025,0x000000f0, +0x000000f3,0x0007000c,0x00000011,0x000000f5, +0x00000001,0x00000025,0x000000c9,0x000000f4, +0x0007000c,0x00000011,0x000000fa,0x00000001, +0x00000028,0x000001d0,0x000001dc,0x0007000c, +0x00000011,0x000000fd,0x00000001,0x00000028, +0x000001e8,0x000001f4,0x0007000c,0x00000011, +0x000000fe,0x00000001,0x00000028,0x000000fa, +0x000000fd,0x0007000c,0x00000011,0x000000ff, +0x00000001,0x00000028,0x000000d3,0x000000fe, +0x00050081,0x00000011,0x00000102,0x000000c9, +0x000000f5,0x00050081,0x00000011,0x00000105, +0x000000d3,0x000000ff,0x00050083,0x00000011, +0x0000010b,0x00000221,0x00000105,0x0007000c, +0x00000011,0x0000010c,0x00000001,0x00000025, +0x00000102,0x0000010b,0x0007000c,0x00000011, +0x00000110,0x00000001,0x00000028,0x00000105, +0x0000010f,0x00050088,0x00000011,0x00000111, +0x0000010c,0x00000110,0x0008000c,0x00000011, +0x00000115,0x00000001,0x0000002b,0x00000111, +0x00000222,0x00000148,0x0006000c,0x00000011, +0x00000116,0x00000001,0x0000001f,0x00000115, +0x0008000c,0x00000010,0x0000011d,0x00000001, +0x0000002e,0x00000119,0x0000011a,0x000000a3, +0x00050088,0x00000010,0x0000011e,0x00000118, +0x0000011d,0x0005008e,0x00000011,0x00000122, +0x00000116,0x0000011e,0x00050081,0x00000011, +0x00000126,0x000001a0,0x000001ac,0x00050081, +0x00000011,0x00000128,0x00000126,0x000001b8, +0x00050081,0x00000011,0x0000012a,0x00000128, +0x000001c4,0x00050085,0x00000011,0x0000012c, +0x0000012a,0x00000122,0x00050081,0x00000011, +0x0000012d,0x00000194,0x0000012c,0x0005008e, +0x00000011,0x00000130,0x00000122,0x0000012e, +0x00050081,0x00000011,0x00000132,0x00000148, +0x00000130,0x00050088,0x00000011,0x00000133, +0x0000012d,0x00000132,0x0008000c,0x00000011, +0x00000136,0x00000001,0x0000002b,0x00000133, +0x00000222,0x00000148,0x000200f9,0x000000a6, +0x000200f8,0x000000a6,0x000700f5,0x00000011, +0x0000021d,0x00000194,0x0000009e,0x00000136, +0x000000a5,0x000200f9,0x00000096,0x000200f8, +0x00000096,0x000700f5,0x00000011,0x0000021c, +0x0000009d,0x00000095,0x0000021d,0x000000a6, +0x000300f7,0x0000013b,0x00000000,0x000400fa, +0x0000008c,0x0000013a,0x0000013b,0x000200f8, +0x0000013a,0x0004006f,0x00000010,0x0000013e, +0x00000062,0x00050081,0x00000010,0x0000013f, +0x0000013e,0x00000078,0x00050083,0x00000010, +0x00000141,0x0000013f,0x00000088,0x0006000c, +0x00000010,0x00000142,0x00000001,0x00000004, +0x00000141,0x000500b8,0x0000005f,0x00000143, +0x00000142,0x00000112,0x000200f9,0x0000013b, +0x000200f8,0x0000013b,0x000700f5,0x0000005f, +0x00000144,0x0000008c,0x00000096,0x00000143, +0x0000013a,0x000300f7,0x00000146,0x00000000, +0x000400fa,0x00000144,0x00000145,0x00000146, +0x000200f8,0x00000145,0x0008000c,0x00000011, +0x0000014b,0x00000001,0x0000002e,0x0000021c, +0x00000148,0x00000223,0x000200f9,0x00000146, +0x000200f8,0x00000146,0x000700f5,0x00000011, +0x0000021e,0x0000021c,0x0000013b,0x0000014b, +0x00000145,0x00050041,0x00000082,0x0000014d, +0x0000004a,0x0000014c,0x0004003d,0x00000010, +0x0000014e,0x0000014d,0x000500ba,0x0000005f, +0x0000014f,0x0000014e,0x0000008b,0x000300f7, +0x00000151,0x00000000,0x000400fa,0x0000014f, +0x00000150,0x00000151,0x000200f8,0x00000150, +0x00050041,0x00000156,0x00000157,0x0000004a, +0x00000155,0x0004003d,0x00000006,0x00000158, +0x00000157,0x00050051,0x00000006,0x00000159, +0x0000005c,0x00000000,0x00050051,0x00000006, +0x0000015a,0x0000005c,0x00000001,0x00050084, +0x00000006,0x000001fa,0x00000159,0x0000001b, +0x00050084,0x00000006,0x000001fd,0x0000015a, +0x00000020,0x000500c6,0x00000006,0x000001fe, +0x000001fa,0x000001fd,0x00050084,0x00000006, +0x00000201,0x00000158,0x00000026,0x000500c6, +0x00000006,0x00000202,0x000001fe,0x00000201, +0x000500c2,0x00000006,0x00000204,0x00000202, +0x0000002a,0x000500c6,0x00000006,0x00000206, +0x00000202,0x00000204,0x00050084,0x00000006, +0x00000208,0x00000206,0x0000002e,0x000500c2, +0x00000006,0x0000020a,0x00000208,0x00000032, +0x000500c6,0x00000006,0x0000020c,0x00000208, +0x0000020a,0x00050084,0x00000006,0x0000020e, +0x0000020c,0x00000036,0x000500c2,0x00000006, +0x00000210,0x0000020e,0x0000002a,0x000500c6, +0x00000006,0x00000212,0x0000020e,0x00000210, +0x000500c7,0x00000006,0x00000161,0x00000212, +0x00000160,0x00040070,0x00000010,0x00000162, +0x00000161,0x000500c2,0x00000006,0x00000165, +0x00000212,0x00000164,0x00040070,0x00000010, +0x00000166,0x00000165,0x00050081,0x00000010, +0x00000167,0x00000162,0x00000166,0x00050085, +0x00000010,0x00000169,0x00000167,0x00000224, +0x00050083,0x00000010,0x0000016a,0x00000169, +0x00000112,0x00050085,0x00000010,0x0000016e, +0x0000016a,0x0000014e,0x00050085,0x00000010, +0x00000170,0x0000016e,0x00000225,0x00060050, +0x00000011,0x00000172,0x00000170,0x00000170, +0x00000170,0x00050081,0x00000011,0x00000173, +0x0000021e,0x00000172,0x000200f9,0x00000151, +0x000200f8,0x00000151,0x000700f5,0x00000011, +0x0000021f,0x0000021e,0x00000146,0x00000173, +0x00000150,0x0004003d,0x00000174,0x00000177, +0x00000176,0x0008000c,0x00000011,0x0000017c, +0x00000001,0x0000002b,0x0000021f,0x00000222, +0x00000148,0x00050051,0x00000010,0x0000017d, +0x0000017c,0x00000000,0x00050051,0x00000010, +0x0000017e,0x0000017c,0x00000001,0x00050051, +0x00000010,0x0000017f,0x0000017c,0x00000002, +0x00070050,0x00000053,0x00000180,0x0000017d, +0x0000017e,0x0000017f,0x00000112,0x00040063, +0x00000177,0x0000005e,0x00000180,0x000200f9, +0x00000183,0x000200f8,0x00000183,0x000100fd, +0x00010038} diff --git a/app/src/shaders/enhance_pre.comp b/app/src/shaders/enhance_pre.comp new file mode 100644 index 0000000..8d97094 --- /dev/null +++ b/app/src/shaders/enhance_pre.comp @@ -0,0 +1,86 @@ +#version 450 +// Picture enhancement, first pass, at the stream's own size: compression +// cleanup (edge-preserving denoise, debanding) and colour (exposure, +// saturation, shadow detail). Reads the converted RGBA picture, writes `dst`. +layout(local_size_x = 16, local_size_y = 16) in; + +layout(binding = 0, rgba8) uniform writeonly image2D dst; +layout(binding = 1) uniform sampler2D src; // nearest is fine: texel-exact reads + +layout(push_constant) uniform Params { + ivec2 size; + float denoise; // 0..1 + float deband; // 0..1 + float exposure; // EV, -2..2 + float saturation; // 0..2, 1 = unchanged + float shadows; // 0..1 + uint frame; // varies the deband sample pattern over time +} p; + +float luma(vec3 c) { return dot(c, vec3(0.2126, 0.7152, 0.0722)); } + +uint hash(uvec3 v) +{ + uint h = v.x * 0x8da6b343u ^ v.y * 0xd8163841u ^ v.z * 0xcb1ab31fu; + h ^= h >> 15; h *= 0x2c1b3c6du; h ^= h >> 12; h *= 0x297a2d39u; h ^= h >> 15; + return h; +} + +vec3 fetch(ivec2 at) { return texelFetch(src, clamp(at, ivec2(0), p.size - 1), 0).rgb; } + +void main() +{ + ivec2 at = ivec2(gl_GlobalInvocationID.xy); + if (at.x >= p.size.x || at.y >= p.size.y) return; + vec3 c = fetch(at); + + // Edge-preserving denoise: a 3x3 bilateral filter. Neighbours that differ + // a lot (edges, texture) get almost no weight, so only flat-area noise and + // compression speckle are averaged away. + if (p.denoise > 0.0) { + float sigma = mix(0.015, 0.09, p.denoise); + float inv = 1.0 / (2.0 * sigma * sigma); + float l0 = luma(c); + vec3 sum = vec3(0.0); + float wsum = 0.0; + for (int y = -1; y <= 1; y++) + for (int x = -1; x <= 1; x++) { + vec3 s = fetch(at + ivec2(x, y)); + float d = luma(s) - l0; + float w = exp(-d * d * inv) * ((x == 0 && y == 0) ? 1.0 : 0.6); + sum += s * w; + wsum += w; + } + c = mix(c, sum / wsum, p.denoise); + } + + // Debanding: compare with four points at a random angle and distance. If + // all of them are within a small threshold the area is a smooth gradient + // the encoder cut into bands; use their average there. Real detail differs + // by more than the threshold and is left alone. + if (p.deband > 0.0) { + uint h = hash(uvec3(at, p.frame)); + float angle = float(h & 0xffffu) / 65536.0 * 6.2831853; + float radius = mix(4.0, 14.0, float(h >> 16) / 65536.0); + ivec2 o1 = ivec2(round(vec2(cos(angle), sin(angle)) * radius)); + ivec2 o2 = ivec2(-o1.y, o1.x); + vec3 a = fetch(at + o1), b = fetch(at - o1), d = fetch(at + o2), e = fetch(at - o2); + vec3 avg = (a + b + d + e) * 0.25; + float threshold = mix(0.006, 0.03, p.deband); + vec3 diff = max(max(abs(a - c), abs(b - c)), max(abs(d - c), abs(e - c))); + if (max(diff.r, max(diff.g, diff.b)) < threshold) c = mix(c, avg, 0.85); + } + + // Colour. + c *= exp2(p.exposure); + if (p.shadows > 0.0) { + // Lift the dark end only: a curve that raises shadows and leaves + // mid-tones and highlights where they were. + float l = luma(c); + float lift = p.shadows * 0.35 * (1.0 - smoothstep(0.0, 0.45, l)); + c = c + lift * (1.0 - c) * c * 4.0 / (1.0 + c * 3.0); + } + if (p.saturation != 1.0) c = mix(vec3(luma(c)), c, p.saturation); + + imageStore(dst, at, vec4(clamp(c, 0.0, 1.0), 1.0)); +} diff --git a/app/src/shaders/enhance_pre.spv.inc b/app/src/shaders/enhance_pre.spv.inc new file mode 100644 index 0000000..287ad3f --- /dev/null +++ b/app/src/shaders/enhance_pre.spv.inc @@ -0,0 +1,399 @@ +{0x07230203,0x00010000,0x000d000b,0x0000024d, +0x00000000,0x00020011,0x00000001,0x0006000b, +0x00000001,0x4c534c47,0x6474732e,0x3035342e, +0x00000000,0x0003000e,0x00000000,0x00000001, +0x0006000f,0x00000005,0x00000004,0x6e69616d, +0x00000000,0x00000067,0x00060010,0x00000004, +0x00000011,0x00000010,0x00000010,0x00000001, +0x00040047,0x00000050,0x00000021,0x00000001, +0x00040047,0x00000050,0x00000022,0x00000000, +0x00030047,0x00000055,0x00000002,0x00050048, +0x00000055,0x00000000,0x00000023,0x00000000, +0x00050048,0x00000055,0x00000001,0x00000023, +0x00000008,0x00050048,0x00000055,0x00000002, +0x00000023,0x0000000c,0x00050048,0x00000055, +0x00000003,0x00000023,0x00000010,0x00050048, +0x00000055,0x00000004,0x00000023,0x00000014, +0x00050048,0x00000055,0x00000005,0x00000023, +0x00000018,0x00050048,0x00000055,0x00000006, +0x00000023,0x0000001c,0x00040047,0x00000067, +0x0000000b,0x0000001c,0x00030047,0x000001a3, +0x00000019,0x00040047,0x000001a3,0x00000021, +0x00000000,0x00040047,0x000001a3,0x00000022, +0x00000000,0x00040047,0x000001af,0x0000000b, +0x00000019,0x00020013,0x00000002,0x00030021, +0x00000003,0x00000002,0x00030016,0x00000006, +0x00000020,0x00040017,0x00000007,0x00000006, +0x00000003,0x00040015,0x0000000d,0x00000020, +0x00000000,0x00040017,0x0000000e,0x0000000d, +0x00000003,0x00040015,0x00000014,0x00000020, +0x00000001,0x00040017,0x00000015,0x00000014, +0x00000002,0x0004002b,0x00000006,0x0000001c, +0x3e59b3d0,0x0004002b,0x00000006,0x0000001d, +0x3f371759,0x0004002b,0x00000006,0x0000001e, +0x3d93dd98,0x0006002c,0x00000007,0x0000001f, +0x0000001c,0x0000001d,0x0000001e,0x0004002b, +0x0000000d,0x00000025,0x00000000,0x0004002b, +0x0000000d,0x00000028,0x8da6b343,0x0004002b, +0x0000000d,0x0000002a,0x00000001,0x0004002b, +0x0000000d,0x0000002d,0xd8163841,0x0004002b, +0x0000000d,0x00000033,0xcb1ab31f,0x0004002b, +0x00000014,0x00000037,0x0000000f,0x0004002b, +0x0000000d,0x0000003b,0x2c1b3c6d,0x0004002b, +0x00000014,0x0000003f,0x0000000c,0x0004002b, +0x0000000d,0x00000043,0x297a2d39,0x00090019, +0x0000004d,0x00000006,0x00000001,0x00000000, +0x00000000,0x00000000,0x00000001,0x00000000, +0x0003001b,0x0000004e,0x0000004d,0x00040020, +0x0000004f,0x00000000,0x0000004e,0x0004003b, +0x0000004f,0x00000050,0x00000000,0x0004002b, +0x00000014,0x00000053,0x00000000,0x0005002c, +0x00000015,0x00000054,0x00000053,0x00000053, +0x0009001e,0x00000055,0x00000015,0x00000006, +0x00000006,0x00000006,0x00000006,0x00000006, +0x0000000d,0x00040020,0x00000056,0x00000009, +0x00000055,0x0004003b,0x00000056,0x00000057, +0x00000009,0x00040020,0x00000058,0x00000009, +0x00000015,0x0004002b,0x00000014,0x0000005b, +0x00000001,0x00040017,0x00000060,0x00000006, +0x00000004,0x00040020,0x00000066,0x00000001, +0x0000000e,0x0004003b,0x00000066,0x00000067, +0x00000001,0x00040017,0x00000068,0x0000000d, +0x00000002,0x00020014,0x0000006c,0x00040020, +0x00000070,0x00000009,0x00000014,0x00040020, +0x00000084,0x00000009,0x00000006,0x0004002b, +0x00000006,0x00000087,0x00000000,0x0004002b, +0x00000006,0x0000008d,0x3c75c28f,0x0004002b, +0x00000006,0x0000008e,0x3db851ec,0x0004002b, +0x00000006,0x00000093,0x3f800000,0x0004002b, +0x00000006,0x00000094,0x40000000,0x0006002c, +0x00000007,0x0000009f,0x00000087,0x00000087, +0x00000087,0x0004002b,0x00000014,0x000000a2, +0xffffffff,0x0004002b,0x00000006,0x000000cd, +0x3f19999a,0x0004002b,0x00000014,0x000000e5, +0x00000002,0x0004002b,0x00000014,0x000000ee, +0x00000006,0x00040020,0x000000ef,0x00000009, +0x0000000d,0x0004002b,0x0000000d,0x000000f9, +0x0000ffff,0x0004002b,0x00000006,0x00000101, +0x40800000,0x0004002b,0x00000006,0x00000102, +0x41600000,0x0004002b,0x00000014,0x00000104, +0x00000010,0x00040017,0x0000010e,0x00000006, +0x00000002,0x0004002b,0x00000006,0x0000013b, +0x3e800000,0x0004002b,0x00000006,0x0000013e, +0x3bc49ba6,0x0004002b,0x00000006,0x0000013f, +0x3cf5c28f,0x0004002b,0x00000006,0x00000165, +0x3f59999a,0x0004002b,0x00000014,0x00000168, +0x00000003,0x0004002b,0x00000014,0x0000016e, +0x00000005,0x0004002b,0x00000006,0x0000017b, +0x3eb33333,0x0004002b,0x00000006,0x0000017d, +0x3ee66666,0x0004002b,0x00000006,0x0000018c, +0x40400000,0x0004002b,0x00000014,0x00000192, +0x00000004,0x00090019,0x000001a1,0x00000006, +0x00000001,0x00000000,0x00000000,0x00000000, +0x00000002,0x00000004,0x00040020,0x000001a2, +0x00000000,0x000001a1,0x0004003b,0x000001a2, +0x000001a3,0x00000000,0x0004002b,0x0000000d, +0x000001ae,0x00000010,0x0006002c,0x0000000e, +0x000001af,0x000001ae,0x000001ae,0x0000002a, +0x0005002c,0x00000015,0x00000245,0x0000005b, +0x0000005b,0x0006002c,0x00000007,0x00000247, +0x00000165,0x00000165,0x00000165,0x0006002c, +0x00000007,0x00000248,0x00000093,0x00000093, +0x00000093,0x0004002b,0x00000006,0x0000024b, +0x37800000,0x0004002b,0x00000006,0x0000024c, +0x38c90fdb,0x00050036,0x00000002,0x00000004, +0x00000000,0x00000003,0x000200f8,0x00000005, +0x000300f7,0x000001b0,0x00000000,0x000300fb, +0x00000025,0x000001b1,0x000200f8,0x000001b1, +0x0004003d,0x0000000e,0x00000069,0x00000067, +0x0007004f,0x00000068,0x0000006a,0x00000069, +0x00000069,0x00000000,0x00000001,0x0004007c, +0x00000015,0x0000006b,0x0000006a,0x00050051, +0x00000014,0x0000006f,0x0000006b,0x00000000, +0x00060041,0x00000070,0x00000071,0x00000057, +0x00000053,0x00000025,0x0004003d,0x00000014, +0x00000072,0x00000071,0x000500af,0x0000006c, +0x00000073,0x0000006f,0x00000072,0x000400a8, +0x0000006c,0x00000074,0x00000073,0x000300f7, +0x00000076,0x00000000,0x000400fa,0x00000074, +0x00000075,0x00000076,0x000200f8,0x00000075, +0x00050051,0x00000014,0x00000078,0x0000006b, +0x00000001,0x00060041,0x00000070,0x00000079, +0x00000057,0x00000053,0x0000002a,0x0004003d, +0x00000014,0x0000007a,0x00000079,0x000500af, +0x0000006c,0x0000007b,0x00000078,0x0000007a, +0x000200f9,0x00000076,0x000200f8,0x00000076, +0x000700f5,0x0000006c,0x0000007c,0x00000073, +0x000001b1,0x0000007b,0x00000075,0x000300f7, +0x0000007e,0x00000000,0x000400fa,0x0000007c, +0x0000007d,0x0000007e,0x000200f8,0x0000007d, +0x000200f9,0x000001b0,0x000200f8,0x0000007e, +0x0004003d,0x0000004e,0x000001b8,0x00000050, +0x00050041,0x00000058,0x000001ba,0x00000057, +0x00000053,0x0004003d,0x00000015,0x000001bb, +0x000001ba,0x00050082,0x00000015,0x000001bd, +0x000001bb,0x00000245,0x0008000c,0x00000015, +0x000001be,0x00000001,0x0000002d,0x0000006b, +0x00000054,0x000001bd,0x00040064,0x0000004d, +0x000001bf,0x000001b8,0x0007005f,0x00000060, +0x000001c0,0x000001bf,0x000001be,0x00000002, +0x00000053,0x0008004f,0x00000007,0x000001c1, +0x000001c0,0x000001c0,0x00000000,0x00000001, +0x00000002,0x00050041,0x00000084,0x00000085, +0x00000057,0x0000005b,0x0004003d,0x00000006, +0x00000086,0x00000085,0x000500ba,0x0000006c, +0x00000088,0x00000086,0x00000087,0x000300f7, +0x0000008a,0x00000000,0x000400fa,0x00000088, +0x00000089,0x0000008a,0x000200f8,0x00000089, +0x0008000c,0x00000006,0x00000091,0x00000001, +0x0000002e,0x0000008d,0x0000008e,0x00000086, +0x00050085,0x00000006,0x00000096,0x00000094, +0x00000091,0x00050085,0x00000006,0x00000098, +0x00000096,0x00000091,0x00050088,0x00000006, +0x00000099,0x00000093,0x00000098,0x00050094, +0x00000006,0x000001c5,0x000001c1,0x0000001f, +0x000200f9,0x000000a3,0x000200f8,0x000000a3, +0x000700f5,0x00000006,0x0000023a,0x00000087, +0x00000089,0x00000243,0x000000a6,0x000700f5, +0x00000007,0x00000239,0x0000009f,0x00000089, +0x00000242,0x000000a6,0x000700f5,0x00000014, +0x00000237,0x000000a2,0x00000089,0x000000db, +0x000000a6,0x000500b3,0x0000006c,0x000000a9, +0x00000237,0x0000005b,0x000400f6,0x000000a5, +0x000000a6,0x00000000,0x000400fa,0x000000a9, +0x000000a4,0x000000a5,0x000200f8,0x000000a4, +0x000200f9,0x000000ab,0x000200f8,0x000000ab, +0x000700f5,0x00000006,0x00000243,0x0000023a, +0x000000a4,0x000000d7,0x000000ac,0x000700f5, +0x00000007,0x00000242,0x00000239,0x000000a4, +0x000000d4,0x000000ac,0x000700f5,0x00000014, +0x00000240,0x000000a2,0x000000a4,0x000000d9, +0x000000ac,0x000500b3,0x0000006c,0x000000b1, +0x00000240,0x0000005b,0x000400f6,0x000000ad, +0x000000ac,0x00000000,0x000400fa,0x000000b1, +0x000000ac,0x000000ad,0x000200f8,0x000000ac, +0x00050050,0x00000015,0x000000b6,0x00000240, +0x00000237,0x00050080,0x00000015,0x000000b7, +0x0000006b,0x000000b6,0x0004003d,0x0000004e, +0x000001c8,0x00000050,0x0008000c,0x00000015, +0x000001ce,0x00000001,0x0000002d,0x000000b7, +0x00000054,0x000001bd,0x00040064,0x0000004d, +0x000001cf,0x000001c8,0x0007005f,0x00000060, +0x000001d0,0x000001cf,0x000001ce,0x00000002, +0x00000053,0x0008004f,0x00000007,0x000001d1, +0x000001d0,0x000001d0,0x00000000,0x00000001, +0x00000002,0x00050094,0x00000006,0x000001d5, +0x000001d1,0x0000001f,0x00050083,0x00000006, +0x000000bf,0x000001d5,0x000001c5,0x0004007f, +0x00000006,0x000000c2,0x000000bf,0x00050085, +0x00000006,0x000000c4,0x000000c2,0x000000bf, +0x00050085,0x00000006,0x000000c6,0x000000c4, +0x00000099,0x0006000c,0x00000006,0x000000c7, +0x00000001,0x0000001b,0x000000c6,0x000500aa, +0x0000006c,0x000000c9,0x00000240,0x00000053, +0x000500aa,0x0000006c,0x000000cb,0x00000237, +0x00000053,0x000500a7,0x0000006c,0x000000cc, +0x000000c9,0x000000cb,0x000600a9,0x00000006, +0x000000ce,0x000000cc,0x00000093,0x000000cd, +0x00050085,0x00000006,0x000000cf,0x000000c7, +0x000000ce,0x0005008e,0x00000007,0x000000d2, +0x000001d1,0x000000cf,0x00050081,0x00000007, +0x000000d4,0x00000242,0x000000d2,0x00050081, +0x00000006,0x000000d7,0x00000243,0x000000cf, +0x00050080,0x00000014,0x000000d9,0x00000240, +0x0000005b,0x000200f9,0x000000ab,0x000200f8, +0x000000ad,0x000200f9,0x000000a6,0x000200f8, +0x000000a6,0x00050080,0x00000014,0x000000db, +0x00000237,0x0000005b,0x000200f9,0x000000a3, +0x000200f8,0x000000a5,0x00060050,0x00000007, +0x000000df,0x0000023a,0x0000023a,0x0000023a, +0x00050088,0x00000007,0x000000e0,0x00000239, +0x000000df,0x00060050,0x00000007,0x000000e3, +0x00000086,0x00000086,0x00000086,0x0008000c, +0x00000007,0x000000e4,0x00000001,0x0000002e, +0x000001c1,0x000000e0,0x000000e3,0x000200f9, +0x0000008a,0x000200f8,0x0000008a,0x000700f5, +0x00000007,0x0000023b,0x000001c1,0x0000007e, +0x000000e4,0x000000a5,0x00050041,0x00000084, +0x000000e6,0x00000057,0x000000e5,0x0004003d, +0x00000006,0x000000e7,0x000000e6,0x000500ba, +0x0000006c,0x000000e8,0x000000e7,0x00000087, +0x000300f7,0x000000ea,0x00000000,0x000400fa, +0x000000e8,0x000000e9,0x000000ea,0x000200f8, +0x000000e9,0x00050041,0x000000ef,0x000000f0, +0x00000057,0x000000ee,0x0004003d,0x0000000d, +0x000000f1,0x000000f0,0x00050051,0x0000000d, +0x000000f2,0x00000069,0x00000000,0x00050051, +0x0000000d,0x000000f3,0x00000069,0x00000001, +0x00050084,0x0000000d,0x000001db,0x000000f2, +0x00000028,0x00050084,0x0000000d,0x000001de, +0x000000f3,0x0000002d,0x000500c6,0x0000000d, +0x000001df,0x000001db,0x000001de,0x00050084, +0x0000000d,0x000001e2,0x000000f1,0x00000033, +0x000500c6,0x0000000d,0x000001e3,0x000001df, +0x000001e2,0x000500c2,0x0000000d,0x000001e5, +0x000001e3,0x00000037,0x000500c6,0x0000000d, +0x000001e7,0x000001e3,0x000001e5,0x00050084, +0x0000000d,0x000001e9,0x000001e7,0x0000003b, +0x000500c2,0x0000000d,0x000001eb,0x000001e9, +0x0000003f,0x000500c6,0x0000000d,0x000001ed, +0x000001e9,0x000001eb,0x00050084,0x0000000d, +0x000001ef,0x000001ed,0x00000043,0x000500c2, +0x0000000d,0x000001f1,0x000001ef,0x00000037, +0x000500c6,0x0000000d,0x000001f3,0x000001ef, +0x000001f1,0x000500c7,0x0000000d,0x000000fa, +0x000001f3,0x000000f9,0x00040070,0x00000006, +0x000000fb,0x000000fa,0x00050085,0x00000006, +0x000000ff,0x000000fb,0x0000024c,0x000500c2, +0x0000000d,0x00000105,0x000001f3,0x00000104, +0x00040070,0x00000006,0x00000106,0x00000105, +0x00050085,0x00000006,0x00000107,0x00000106, +0x0000024b,0x0008000c,0x00000006,0x00000108, +0x00000001,0x0000002e,0x00000101,0x00000102, +0x00000107,0x0006000c,0x00000006,0x0000010b, +0x00000001,0x0000000e,0x000000ff,0x0006000c, +0x00000006,0x0000010d,0x00000001,0x0000000d, +0x000000ff,0x00050050,0x0000010e,0x0000010f, +0x0000010b,0x0000010d,0x0005008e,0x0000010e, +0x00000111,0x0000010f,0x00000108,0x0006000c, +0x0000010e,0x00000112,0x00000001,0x00000001, +0x00000111,0x0004006e,0x00000015,0x00000113, +0x00000112,0x00050051,0x00000014,0x00000116, +0x00000113,0x00000001,0x0004007e,0x00000014, +0x00000117,0x00000116,0x00050051,0x00000014, +0x00000119,0x00000113,0x00000000,0x00050050, +0x00000015,0x0000011a,0x00000117,0x00000119, +0x00050080,0x00000015,0x0000011e,0x0000006b, +0x00000113,0x0004003d,0x0000004e,0x000001f7, +0x00000050,0x0008000c,0x00000015,0x000001fd, +0x00000001,0x0000002d,0x0000011e,0x00000054, +0x000001bd,0x00040064,0x0000004d,0x000001fe, +0x000001f7,0x0007005f,0x00000060,0x000001ff, +0x000001fe,0x000001fd,0x00000002,0x00000053, +0x0008004f,0x00000007,0x00000200,0x000001ff, +0x000001ff,0x00000000,0x00000001,0x00000002, +0x00050082,0x00000015,0x00000124,0x0000006b, +0x00000113,0x0004003d,0x0000004e,0x00000203, +0x00000050,0x0008000c,0x00000015,0x00000209, +0x00000001,0x0000002d,0x00000124,0x00000054, +0x000001bd,0x00040064,0x0000004d,0x0000020a, +0x00000203,0x0007005f,0x00000060,0x0000020b, +0x0000020a,0x00000209,0x00000002,0x00000053, +0x0008004f,0x00000007,0x0000020c,0x0000020b, +0x0000020b,0x00000000,0x00000001,0x00000002, +0x00050080,0x00000015,0x0000012a,0x0000006b, +0x0000011a,0x0004003d,0x0000004e,0x0000020f, +0x00000050,0x0008000c,0x00000015,0x00000215, +0x00000001,0x0000002d,0x0000012a,0x00000054, +0x000001bd,0x00040064,0x0000004d,0x00000216, +0x0000020f,0x0007005f,0x00000060,0x00000217, +0x00000216,0x00000215,0x00000002,0x00000053, +0x0008004f,0x00000007,0x00000218,0x00000217, +0x00000217,0x00000000,0x00000001,0x00000002, +0x00050082,0x00000015,0x00000130,0x0000006b, +0x0000011a,0x0004003d,0x0000004e,0x0000021b, +0x00000050,0x0008000c,0x00000015,0x00000221, +0x00000001,0x0000002d,0x00000130,0x00000054, +0x000001bd,0x00040064,0x0000004d,0x00000222, +0x0000021b,0x0007005f,0x00000060,0x00000223, +0x00000222,0x00000221,0x00000002,0x00000053, +0x0008004f,0x00000007,0x00000224,0x00000223, +0x00000223,0x00000000,0x00000001,0x00000002, +0x00050081,0x00000007,0x00000136,0x00000200, +0x0000020c,0x00050081,0x00000007,0x00000138, +0x00000136,0x00000218,0x00050081,0x00000007, +0x0000013a,0x00000138,0x00000224,0x0005008e, +0x00000007,0x0000013c,0x0000013a,0x0000013b, +0x0008000c,0x00000006,0x00000142,0x00000001, +0x0000002e,0x0000013e,0x0000013f,0x000000e7, +0x00050083,0x00000007,0x00000146,0x00000200, +0x0000023b,0x0006000c,0x00000007,0x00000147, +0x00000001,0x00000004,0x00000146,0x00050083, +0x00000007,0x0000014a,0x0000020c,0x0000023b, +0x0006000c,0x00000007,0x0000014b,0x00000001, +0x00000004,0x0000014a,0x0007000c,0x00000007, +0x0000014c,0x00000001,0x00000028,0x00000147, +0x0000014b,0x00050083,0x00000007,0x0000014f, +0x00000218,0x0000023b,0x0006000c,0x00000007, +0x00000150,0x00000001,0x00000004,0x0000014f, +0x00050083,0x00000007,0x00000153,0x00000224, +0x0000023b,0x0006000c,0x00000007,0x00000154, +0x00000001,0x00000004,0x00000153,0x0007000c, +0x00000007,0x00000155,0x00000001,0x00000028, +0x00000150,0x00000154,0x0007000c,0x00000007, +0x00000156,0x00000001,0x00000028,0x0000014c, +0x00000155,0x00050051,0x00000006,0x00000158, +0x00000156,0x00000000,0x00050051,0x00000006, +0x0000015a,0x00000156,0x00000001,0x00050051, +0x00000006,0x0000015c,0x00000156,0x00000002, +0x0007000c,0x00000006,0x0000015d,0x00000001, +0x00000028,0x0000015a,0x0000015c,0x0007000c, +0x00000006,0x0000015e,0x00000001,0x00000028, +0x00000158,0x0000015d,0x000500b8,0x0000006c, +0x00000160,0x0000015e,0x00000142,0x000300f7, +0x00000162,0x00000000,0x000400fa,0x00000160, +0x00000161,0x00000162,0x000200f8,0x00000161, +0x0008000c,0x00000007,0x00000167,0x00000001, +0x0000002e,0x0000023b,0x0000013c,0x00000247, +0x000200f9,0x00000162,0x000200f8,0x00000162, +0x000700f5,0x00000007,0x0000023d,0x0000023b, +0x000000e9,0x00000167,0x00000161,0x000200f9, +0x000000ea,0x000200f8,0x000000ea,0x000700f5, +0x00000007,0x0000023c,0x0000023b,0x0000008a, +0x0000023d,0x00000162,0x00050041,0x00000084, +0x00000169,0x00000057,0x00000168,0x0004003d, +0x00000006,0x0000016a,0x00000169,0x0006000c, +0x00000006,0x0000016b,0x00000001,0x0000001d, +0x0000016a,0x0005008e,0x00000007,0x0000016d, +0x0000023c,0x0000016b,0x00050041,0x00000084, +0x0000016f,0x00000057,0x0000016e,0x0004003d, +0x00000006,0x00000170,0x0000016f,0x000500ba, +0x0000006c,0x00000171,0x00000170,0x00000087, +0x000300f7,0x00000173,0x00000000,0x000400fa, +0x00000171,0x00000172,0x00000173,0x000200f8, +0x00000172,0x00050094,0x00000006,0x00000228, +0x0000016d,0x0000001f,0x00050085,0x00000006, +0x0000017c,0x00000170,0x0000017b,0x0008000c, +0x00000006,0x0000017f,0x00000001,0x00000031, +0x00000087,0x0000017d,0x00000228,0x00050083, +0x00000006,0x00000180,0x00000093,0x0000017f, +0x00050085,0x00000006,0x00000181,0x0000017c, +0x00000180,0x00050083,0x00000007,0x00000186, +0x00000248,0x0000016d,0x0005008e,0x00000007, +0x00000187,0x00000186,0x00000181,0x00050085, +0x00000007,0x00000189,0x00000187,0x0000016d, +0x0005008e,0x00000007,0x0000018a,0x00000189, +0x00000101,0x0005008e,0x00000007,0x0000018d, +0x0000016d,0x0000018c,0x00050081,0x00000007, +0x0000018f,0x00000248,0x0000018d,0x00050088, +0x00000007,0x00000190,0x0000018a,0x0000018f, +0x00050081,0x00000007,0x00000191,0x0000016d, +0x00000190,0x000200f9,0x00000173,0x000200f8, +0x00000173,0x000700f5,0x00000007,0x0000023e, +0x0000016d,0x000000ea,0x00000191,0x00000172, +0x00050041,0x00000084,0x00000193,0x00000057, +0x00000192,0x0004003d,0x00000006,0x00000194, +0x00000193,0x000500b7,0x0000006c,0x00000195, +0x00000194,0x00000093,0x000300f7,0x00000197, +0x00000000,0x000400fa,0x00000195,0x00000196, +0x00000197,0x000200f8,0x00000196,0x00050094, +0x00000006,0x0000022c,0x0000023e,0x0000001f, +0x00060050,0x00000007,0x0000019b,0x0000022c, +0x0000022c,0x0000022c,0x00060050,0x00000007, +0x0000019f,0x00000194,0x00000194,0x00000194, +0x0008000c,0x00000007,0x000001a0,0x00000001, +0x0000002e,0x0000019b,0x0000023e,0x0000019f, +0x000200f9,0x00000197,0x000200f8,0x00000197, +0x000700f5,0x00000007,0x0000023f,0x0000023e, +0x00000173,0x000001a0,0x00000196,0x0004003d, +0x000001a1,0x000001a4,0x000001a3,0x0008000c, +0x00000007,0x000001a9,0x00000001,0x0000002b, +0x0000023f,0x0000009f,0x00000248,0x00050051, +0x00000006,0x000001aa,0x000001a9,0x00000000, +0x00050051,0x00000006,0x000001ab,0x000001a9, +0x00000001,0x00050051,0x00000006,0x000001ac, +0x000001a9,0x00000002,0x00070050,0x00000060, +0x000001ad,0x000001aa,0x000001ab,0x000001ac, +0x00000093,0x00040063,0x000001a4,0x0000006b, +0x000001ad,0x000200f9,0x000001b0,0x000200f8, +0x000001b0,0x000100fd,0x00010038} diff --git a/app/src/shaders/enhance_scale.comp b/app/src/shaders/enhance_scale.comp new file mode 100644 index 0000000..fb8f379 --- /dev/null +++ b/app/src/shaders/enhance_scale.comp @@ -0,0 +1,60 @@ +#version 450 +// Picture enhancement: upscaling from the stream's size to the window's. +// mode 0 = bilinear, 1 = Lanczos-3 with anti-ringing (the result is clamped to +// the four nearest source pixels, so sharp edges don't get halos). +layout(local_size_x = 16, local_size_y = 16) in; + +layout(binding = 0, rgba8) uniform writeonly image2D dst; +layout(binding = 1) uniform sampler2D src; // linear sampler + +layout(push_constant) uniform Params { + ivec2 src_size; + ivec2 dst_size; + int mode; +} p; + +float lanczos3(float x) +{ + x = abs(x); + if (x < 1e-5) return 1.0; + if (x >= 3.0) return 0.0; + float px = 3.14159265 * x; + return 3.0 * sin(px) * sin(px / 3.0) / (px * px); +} + +void main() +{ + ivec2 at = ivec2(gl_GlobalInvocationID.xy); + if (at.x >= p.dst_size.x || at.y >= p.dst_size.y) return; + vec2 uv = (vec2(at) + 0.5) / vec2(p.dst_size); + + if (p.mode == 0) { + imageStore(dst, at, vec4(textureLod(src, uv, 0.0).rgb, 1.0)); + return; + } + + vec2 pos = uv * vec2(p.src_size) - 0.5; // in source texel centres + vec2 base = floor(pos); + vec2 f = pos - base; + float wx[6], wy[6]; + float sx = 0.0, sy = 0.0; + for (int i = 0; i < 6; i++) { + wx[i] = lanczos3(f.x - float(i - 2)); sx += wx[i]; + wy[i] = lanczos3(f.y - float(i - 2)); sy += wy[i]; + } + vec3 sum = vec3(0.0); + vec3 lo = vec3(1.0), hi = vec3(0.0); + ivec2 b = ivec2(base); + for (int y = 0; y < 6; y++) { + vec3 row = vec3(0.0); + for (int x = 0; x < 6; x++) { + ivec2 t = clamp(b + ivec2(x - 2, y - 2), ivec2(0), p.src_size - 1); + vec3 s = texelFetch(src, t, 0).rgb; + row += s * wx[x]; + if ((x == 2 || x == 3) && (y == 2 || y == 3)) { lo = min(lo, s); hi = max(hi, s); } + } + sum += row * wy[y]; + } + vec3 c = sum / (sx * sy); + imageStore(dst, at, vec4(clamp(c, lo, hi), 1.0)); +} diff --git a/app/src/shaders/enhance_scale.spv.inc b/app/src/shaders/enhance_scale.spv.inc new file mode 100644 index 0000000..53c0dda --- /dev/null +++ b/app/src/shaders/enhance_scale.spv.inc @@ -0,0 +1,311 @@ +{0x07230203,0x00010000,0x000d000b,0x000001a5, +0x00000000,0x00020011,0x00000001,0x0006000b, +0x00000001,0x4c534c47,0x6474732e,0x3035342e, +0x00000000,0x0003000e,0x00000000,0x00000001, +0x0006000f,0x00000005,0x00000004,0x6e69616d, +0x00000000,0x00000035,0x00060010,0x00000004, +0x00000011,0x00000010,0x00000010,0x00000001, +0x00040047,0x00000035,0x0000000b,0x0000001c, +0x00030047,0x0000003e,0x00000002,0x00050048, +0x0000003e,0x00000000,0x00000023,0x00000000, +0x00050048,0x0000003e,0x00000001,0x00000023, +0x00000008,0x00050048,0x0000003e,0x00000002, +0x00000023,0x00000010,0x00030047,0x00000069, +0x00000019,0x00040047,0x00000069,0x00000021, +0x00000000,0x00040047,0x00000069,0x00000022, +0x00000000,0x00040047,0x0000006f,0x00000021, +0x00000001,0x00040047,0x0000006f,0x00000022, +0x00000000,0x00040047,0x00000122,0x0000000b, +0x00000019,0x00020013,0x00000002,0x00030021, +0x00000003,0x00000002,0x00030016,0x00000006, +0x00000020,0x00040020,0x00000007,0x00000007, +0x00000006,0x0004002b,0x00000006,0x0000000f, +0x3727c5ac,0x00020014,0x00000010,0x0004002b, +0x00000006,0x00000014,0x3f800000,0x0004002b, +0x00000006,0x00000017,0x40400000,0x0004002b, +0x00000006,0x0000001b,0x00000000,0x0004002b, +0x00000006,0x0000001e,0x40490fdb,0x00040015, +0x0000002e,0x00000020,0x00000001,0x00040017, +0x0000002f,0x0000002e,0x00000002,0x00040015, +0x00000032,0x00000020,0x00000000,0x00040017, +0x00000033,0x00000032,0x00000003,0x00040020, +0x00000034,0x00000001,0x00000033,0x0004003b, +0x00000034,0x00000035,0x00000001,0x00040017, +0x00000036,0x00000032,0x00000002,0x0004002b, +0x00000032,0x0000003a,0x00000000,0x0005001e, +0x0000003e,0x0000002f,0x0000002f,0x0000002e, +0x00040020,0x0000003f,0x00000009,0x0000003e, +0x0004003b,0x0000003f,0x00000040,0x00000009, +0x0004002b,0x0000002e,0x00000041,0x00000001, +0x00040020,0x00000042,0x00000009,0x0000002e, +0x0004002b,0x00000032,0x00000049,0x00000001, +0x00040017,0x00000053,0x00000006,0x00000002, +0x0004002b,0x00000006,0x00000058,0x3f000000, +0x00040020,0x0000005b,0x00000009,0x0000002f, +0x0004002b,0x0000002e,0x00000060,0x00000002, +0x0004002b,0x0000002e,0x00000063,0x00000000, +0x00090019,0x00000067,0x00000006,0x00000001, +0x00000000,0x00000000,0x00000000,0x00000002, +0x00000004,0x00040020,0x00000068,0x00000000, +0x00000067,0x0004003b,0x00000068,0x00000069, +0x00000000,0x00090019,0x0000006c,0x00000006, +0x00000001,0x00000000,0x00000000,0x00000000, +0x00000001,0x00000000,0x0003001b,0x0000006d, +0x0000006c,0x00040020,0x0000006e,0x00000000, +0x0000006d,0x0004003b,0x0000006e,0x0000006f, +0x00000000,0x00040017,0x00000072,0x00000006, +0x00000004,0x00040017,0x00000074,0x00000006, +0x00000003,0x0004002b,0x0000002e,0x00000093, +0x00000006,0x0004002b,0x00000032,0x00000095, +0x00000006,0x0004001c,0x00000096,0x00000006, +0x00000095,0x00040020,0x00000097,0x00000007, +0x00000096,0x0006002c,0x00000074,0x000000bc, +0x0000001b,0x0000001b,0x0000001b,0x0006002c, +0x00000074,0x000000be,0x00000014,0x00000014, +0x00000014,0x0005002c,0x0000002f,0x000000dc, +0x00000063,0x00000063,0x0004002b,0x0000002e, +0x000000f2,0x00000003,0x0004002b,0x00000032, +0x00000121,0x00000010,0x0006002c,0x00000033, +0x00000122,0x00000121,0x00000121,0x00000049, +0x0005002c,0x00000053,0x00000199,0x00000058, +0x00000058,0x0005002c,0x0000002f,0x0000019e, +0x00000041,0x00000041,0x0004002b,0x00000006, +0x000001a1,0x3f860a92,0x0004002b,0x00000006, +0x000001a2,0x411de9e7,0x00050036,0x00000002, +0x00000004,0x00000000,0x00000003,0x000200f8, +0x00000005,0x0004003b,0x00000097,0x00000098, +0x00000007,0x0004003b,0x00000097,0x000000a8, +0x00000007,0x000300f7,0x00000123,0x00000000, +0x000300fb,0x0000003a,0x00000124,0x000200f8, +0x00000124,0x0004003d,0x00000033,0x00000037, +0x00000035,0x0007004f,0x00000036,0x00000038, +0x00000037,0x00000037,0x00000000,0x00000001, +0x0004007c,0x0000002f,0x00000039,0x00000038, +0x00050051,0x0000002e,0x0000003d,0x00000039, +0x00000000,0x00060041,0x00000042,0x00000043, +0x00000040,0x00000041,0x0000003a,0x0004003d, +0x0000002e,0x00000044,0x00000043,0x000500af, +0x00000010,0x00000045,0x0000003d,0x00000044, +0x000400a8,0x00000010,0x00000046,0x00000045, +0x000300f7,0x00000048,0x00000000,0x000400fa, +0x00000046,0x00000047,0x00000048,0x000200f8, +0x00000047,0x00050051,0x0000002e,0x0000004b, +0x00000039,0x00000001,0x00060041,0x00000042, +0x0000004c,0x00000040,0x00000041,0x00000049, +0x0004003d,0x0000002e,0x0000004d,0x0000004c, +0x000500af,0x00000010,0x0000004e,0x0000004b, +0x0000004d,0x000200f9,0x00000048,0x000200f8, +0x00000048,0x000700f5,0x00000010,0x0000004f, +0x00000045,0x00000124,0x0000004e,0x00000047, +0x000300f7,0x00000051,0x00000000,0x000400fa, +0x0000004f,0x00000050,0x00000051,0x000200f8, +0x00000050,0x000200f9,0x00000123,0x000200f8, +0x00000051,0x0004006f,0x00000053,0x00000057, +0x00000039,0x00050081,0x00000053,0x0000005a, +0x00000057,0x00000199,0x00050041,0x0000005b, +0x0000005c,0x00000040,0x00000041,0x0004003d, +0x0000002f,0x0000005d,0x0000005c,0x0004006f, +0x00000053,0x0000005e,0x0000005d,0x00050088, +0x00000053,0x0000005f,0x0000005a,0x0000005e, +0x00050041,0x00000042,0x00000061,0x00000040, +0x00000060,0x0004003d,0x0000002e,0x00000062, +0x00000061,0x000500aa,0x00000010,0x00000064, +0x00000062,0x00000063,0x000300f7,0x00000066, +0x00000000,0x000400fa,0x00000064,0x00000065, +0x00000066,0x000200f8,0x00000065,0x0004003d, +0x00000067,0x0000006a,0x00000069,0x0004003d, +0x0000006d,0x00000070,0x0000006f,0x00070058, +0x00000072,0x00000073,0x00000070,0x0000005f, +0x00000002,0x0000001b,0x00050051,0x00000006, +0x00000076,0x00000073,0x00000000,0x00050051, +0x00000006,0x00000077,0x00000073,0x00000001, +0x00050051,0x00000006,0x00000078,0x00000073, +0x00000002,0x00070050,0x00000072,0x00000079, +0x00000076,0x00000077,0x00000078,0x00000014, +0x00040063,0x0000006a,0x00000039,0x00000079, +0x000200f9,0x00000123,0x000200f8,0x00000066, +0x00050041,0x0000005b,0x0000007d,0x00000040, +0x00000063,0x0004003d,0x0000002f,0x0000007e, +0x0000007d,0x0004006f,0x00000053,0x0000007f, +0x0000007e,0x00050085,0x00000053,0x00000080, +0x0000005f,0x0000007f,0x00050083,0x00000053, +0x00000082,0x00000080,0x00000199,0x0006000c, +0x00000053,0x00000085,0x00000001,0x00000008, +0x00000082,0x00050083,0x00000053,0x00000089, +0x00000082,0x00000085,0x000200f9,0x0000008d, +0x000200f8,0x0000008d,0x000700f5,0x00000006, +0x00000176,0x0000001b,0x00000066,0x000000b7, +0x00000090,0x000700f5,0x00000006,0x00000174, +0x0000001b,0x00000066,0x000000a7,0x00000090, +0x000700f5,0x0000002e,0x00000170,0x00000063, +0x00000066,0x000000b9,0x00000090,0x000500b1, +0x00000010,0x00000094,0x00000170,0x00000093, +0x000400f6,0x0000008f,0x00000090,0x00000000, +0x000400fa,0x00000094,0x0000008e,0x0000008f, +0x000200f8,0x0000008e,0x00050051,0x00000006, +0x0000009b,0x00000089,0x00000000,0x00050082, +0x0000002e,0x0000009d,0x00000170,0x00000060, +0x0004006f,0x00000006,0x0000009e,0x0000009d, +0x00050083,0x00000006,0x0000009f,0x0000009b, +0x0000009e,0x000300f7,0x0000014b,0x00000000, +0x000300fb,0x0000003a,0x00000133,0x000200f8, +0x00000133,0x0006000c,0x00000006,0x00000135, +0x00000001,0x00000004,0x0000009f,0x000500b8, +0x00000010,0x00000137,0x00000135,0x0000000f, +0x000300f7,0x00000139,0x00000000,0x000400fa, +0x00000137,0x00000138,0x00000139,0x000200f8, +0x00000138,0x000200f9,0x0000014b,0x000200f8, +0x00000139,0x000500be,0x00000010,0x0000013b, +0x00000135,0x00000017,0x000300f7,0x0000013d, +0x00000000,0x000400fa,0x0000013b,0x0000013c, +0x0000013d,0x000200f8,0x0000013c,0x000200f9, +0x0000014b,0x000200f8,0x0000013d,0x00050085, +0x00000006,0x0000013f,0x0000001e,0x00000135, +0x0006000c,0x00000006,0x00000141,0x00000001, +0x0000000d,0x0000013f,0x00050085,0x00000006, +0x00000142,0x00000017,0x00000141,0x00050085, +0x00000006,0x00000144,0x00000135,0x000001a1, +0x0006000c,0x00000006,0x00000145,0x00000001, +0x0000000d,0x00000144,0x00050085,0x00000006, +0x00000146,0x00000142,0x00000145,0x00050085, +0x00000006,0x000001a3,0x00000135,0x00000135, +0x00050085,0x00000006,0x00000149,0x000001a2, +0x000001a3,0x00050088,0x00000006,0x0000014a, +0x00000146,0x00000149,0x000200f9,0x0000014b, +0x000200f8,0x0000014b,0x000900f5,0x00000006, +0x00000183,0x00000014,0x00000138,0x0000001b, +0x0000013c,0x0000014a,0x0000013d,0x00050041, +0x00000007,0x000000a2,0x00000098,0x00000170, +0x0003003e,0x000000a2,0x00000183,0x0004003d, +0x00000006,0x000000a5,0x000000a2,0x00050081, +0x00000006,0x000000a7,0x00000174,0x000000a5, +0x00050051,0x00000006,0x000000ab,0x00000089, +0x00000001,0x00050083,0x00000006,0x000000af, +0x000000ab,0x0000009e,0x000300f7,0x0000016a, +0x00000000,0x000300fb,0x0000003a,0x00000152, +0x000200f8,0x00000152,0x0006000c,0x00000006, +0x00000154,0x00000001,0x00000004,0x000000af, +0x000500b8,0x00000010,0x00000156,0x00000154, +0x0000000f,0x000300f7,0x00000158,0x00000000, +0x000400fa,0x00000156,0x00000157,0x00000158, +0x000200f8,0x00000157,0x000200f9,0x0000016a, +0x000200f8,0x00000158,0x000500be,0x00000010, +0x0000015a,0x00000154,0x00000017,0x000300f7, +0x0000015c,0x00000000,0x000400fa,0x0000015a, +0x0000015b,0x0000015c,0x000200f8,0x0000015b, +0x000200f9,0x0000016a,0x000200f8,0x0000015c, +0x00050085,0x00000006,0x0000015e,0x0000001e, +0x00000154,0x0006000c,0x00000006,0x00000160, +0x00000001,0x0000000d,0x0000015e,0x00050085, +0x00000006,0x00000161,0x00000017,0x00000160, +0x00050085,0x00000006,0x00000163,0x00000154, +0x000001a1,0x0006000c,0x00000006,0x00000164, +0x00000001,0x0000000d,0x00000163,0x00050085, +0x00000006,0x00000165,0x00000161,0x00000164, +0x00050085,0x00000006,0x000001a4,0x00000154, +0x00000154,0x00050085,0x00000006,0x00000168, +0x000001a2,0x000001a4,0x00050088,0x00000006, +0x00000169,0x00000165,0x00000168,0x000200f9, +0x0000016a,0x000200f8,0x0000016a,0x000900f5, +0x00000006,0x00000186,0x00000014,0x00000157, +0x0000001b,0x0000015b,0x00000169,0x0000015c, +0x00050041,0x00000007,0x000000b2,0x000000a8, +0x00000170,0x0003003e,0x000000b2,0x00000186, +0x0004003d,0x00000006,0x000000b5,0x000000b2, +0x00050081,0x00000006,0x000000b7,0x00000176, +0x000000b5,0x000200f9,0x00000090,0x000200f8, +0x00000090,0x00050080,0x0000002e,0x000000b9, +0x00000170,0x00000041,0x000200f9,0x0000008d, +0x000200f8,0x0000008f,0x0004006e,0x0000002f, +0x000000c2,0x00000085,0x000200f9,0x000000c4, +0x000200f8,0x000000c4,0x000700f5,0x00000074, +0x00000178,0x000000bc,0x0000008f,0x00000180, +0x000000c7,0x000700f5,0x00000074,0x00000177, +0x000000be,0x0000008f,0x0000017e,0x000000c7, +0x000700f5,0x00000074,0x00000172,0x000000bc, +0x0000008f,0x0000010d,0x000000c7,0x000700f5, +0x0000002e,0x00000171,0x00000063,0x0000008f, +0x0000010f,0x000000c7,0x000500b1,0x00000010, +0x000000ca,0x00000171,0x00000093,0x000400f6, +0x000000c6,0x000000c7,0x00000000,0x000400fa, +0x000000ca,0x000000c5,0x000000c6,0x000200f8, +0x000000c5,0x000200f9,0x000000cd,0x000200f8, +0x000000cd,0x000700f5,0x00000074,0x00000180, +0x00000178,0x000000c5,0x00000198,0x000000d0, +0x000700f5,0x00000074,0x0000017e,0x00000177, +0x000000c5,0x00000197,0x000000d0,0x000700f5, +0x00000074,0x0000017a,0x000000bc,0x000000c5, +0x000000ee,0x000000d0,0x000700f5,0x0000002e, +0x00000179,0x00000063,0x000000c5,0x00000106, +0x000000d0,0x000500b1,0x00000010,0x000000d3, +0x00000179,0x00000093,0x000400f6,0x000000cf, +0x000000d0,0x00000000,0x000400fa,0x000000d3, +0x000000ce,0x000000cf,0x000200f8,0x000000ce, +0x00050082,0x0000002e,0x000000d7,0x00000179, +0x00000060,0x00050082,0x0000002e,0x000000d9, +0x00000171,0x00000060,0x00050050,0x0000002f, +0x000000da,0x000000d7,0x000000d9,0x00050080, +0x0000002f,0x000000db,0x000000c2,0x000000da, +0x00050082,0x0000002f,0x000000e0,0x0000007e, +0x0000019e,0x0008000c,0x0000002f,0x000000e1, +0x00000001,0x0000002d,0x000000db,0x000000dc, +0x000000e0,0x0004003d,0x0000006d,0x000000e3, +0x0000006f,0x00040064,0x0000006c,0x000000e5, +0x000000e3,0x0007005f,0x00000072,0x000000e6, +0x000000e5,0x000000e1,0x00000002,0x00000063, +0x0008004f,0x00000074,0x000000e7,0x000000e6, +0x000000e6,0x00000000,0x00000001,0x00000002, +0x00050041,0x00000007,0x000000ea,0x00000098, +0x00000179,0x0004003d,0x00000006,0x000000eb, +0x000000ea,0x0005008e,0x00000074,0x000000ec, +0x000000e7,0x000000eb,0x00050081,0x00000074, +0x000000ee,0x0000017a,0x000000ec,0x000500aa, +0x00000010,0x000000f0,0x00000179,0x00000060, +0x000500aa,0x00000010,0x000000f3,0x00000179, +0x000000f2,0x000500a6,0x00000010,0x000000f4, +0x000000f0,0x000000f3,0x000300f7,0x000000f6, +0x00000000,0x000400fa,0x000000f4,0x000000f5, +0x000000f6,0x000200f8,0x000000f5,0x000500aa, +0x00000010,0x000000f8,0x00000171,0x00000060, +0x000500aa,0x00000010,0x000000fa,0x00000171, +0x000000f2,0x000500a6,0x00000010,0x000000fb, +0x000000f8,0x000000fa,0x000200f9,0x000000f6, +0x000200f8,0x000000f6,0x000700f5,0x00000010, +0x000000fc,0x000000f4,0x000000ce,0x000000fb, +0x000000f5,0x000300f7,0x000000fe,0x00000000, +0x000400fa,0x000000fc,0x000000fd,0x000000fe, +0x000200f8,0x000000fd,0x0007000c,0x00000074, +0x00000101,0x00000001,0x00000025,0x0000017e, +0x000000e7,0x0007000c,0x00000074,0x00000104, +0x00000001,0x00000028,0x00000180,0x000000e7, +0x000200f9,0x000000fe,0x000200f8,0x000000fe, +0x000700f5,0x00000074,0x00000198,0x00000180, +0x000000f6,0x00000104,0x000000fd,0x000700f5, +0x00000074,0x00000197,0x0000017e,0x000000f6, +0x00000101,0x000000fd,0x000200f9,0x000000d0, +0x000200f8,0x000000d0,0x00050080,0x0000002e, +0x00000106,0x00000179,0x00000041,0x000200f9, +0x000000cd,0x000200f8,0x000000cf,0x00050041, +0x00000007,0x00000109,0x000000a8,0x00000171, +0x0004003d,0x00000006,0x0000010a,0x00000109, +0x0005008e,0x00000074,0x0000010b,0x0000017a, +0x0000010a,0x00050081,0x00000074,0x0000010d, +0x00000172,0x0000010b,0x000200f9,0x000000c7, +0x000200f8,0x000000c7,0x00050080,0x0000002e, +0x0000010f,0x00000171,0x00000041,0x000200f9, +0x000000c4,0x000200f8,0x000000c6,0x00050085, +0x00000006,0x00000114,0x00000174,0x00000176, +0x00060050,0x00000074,0x00000115,0x00000114, +0x00000114,0x00000114,0x00050088,0x00000074, +0x00000116,0x00000172,0x00000115,0x0004003d, +0x00000067,0x00000117,0x00000069,0x0008000c, +0x00000074,0x0000011c,0x00000001,0x0000002b, +0x00000116,0x00000177,0x00000178,0x00050051, +0x00000006,0x0000011d,0x0000011c,0x00000000, +0x00050051,0x00000006,0x0000011e,0x0000011c, +0x00000001,0x00050051,0x00000006,0x0000011f, +0x0000011c,0x00000002,0x00070050,0x00000072, +0x00000120,0x0000011d,0x0000011e,0x0000011f, +0x00000014,0x00040063,0x00000117,0x00000039, +0x00000120,0x000200f9,0x00000123,0x000200f8, +0x00000123,0x000100fd,0x00010038} diff --git a/app/src/shaders/fsrcnnx/pass_01.comp b/app/src/shaders/fsrcnnx/pass_01.comp new file mode 100644 index 0000000..5182573 --- /dev/null +++ b/app/src/shaders/fsrcnnx/pass_01.comp @@ -0,0 +1,51 @@ +#version 450 +// Generated by tools/gen_fsrcnnx.js from third_party/FSRCNNX_x2_8-0-4-1.glsl +// (FSRCNNX by igv, LGPL-3.0). Layer: feature map 1. Do not edit. +layout(local_size_x = 16, local_size_y = 16) in; +layout(binding = 0, rgba16f) uniform writeonly image2D dst; +layout(binding = 1) uniform sampler2D in0; +layout(binding = 2) uniform sampler2D in1; +layout(binding = 3) uniform sampler2D in2; +layout(push_constant) uniform Params { ivec2 size; } p; + +ivec2 at_; +vec4 fetch_(sampler2D s, vec2 o) { return texelFetch(s, clamp(at_ + ivec2(o), ivec2(0), p.size - 1), 0); } +#define LUMA_texOff(o) fetch_(in0, vec2(o)).x + +vec4 hook() +{ +vec4 res = vec4(-0.1572492271661758,-0.0120896836742759,0.0061487639322877,-0.2852848768234253); +res += vec4(-0.0047900392673910,0.0537447109818459,-0.0000247144635068,0.0066653941757977) * float(LUMA_texOff(vec2(-2,-2))); +res += vec4(0.0073144687339664,-0.0309004038572311,-0.0109181385487318,-0.0092840325087309) * float(LUMA_texOff(vec2(-2,-1))); +res += vec4(0.0591700896620750,0.1974907070398331,-0.0197357516735792,-0.0546554848551750) * float(LUMA_texOff(vec2(-2,0))); +res += vec4(-0.0011764382943511,-0.0299451071768999,0.0229587312787771,0.0021908886265010) * float(LUMA_texOff(vec2(-2,1))); +res += vec4(0.0098101310431957,0.0080995410680771,-0.0030452020000666,-0.0132035519927740) * float(LUMA_texOff(vec2(-2,2))); +res += vec4(-0.0168330334126949,-0.0743711441755295,-0.0259261634200811,0.0234480481594801) * float(LUMA_texOff(vec2(-1,-2))); +res += vec4(0.0239933785051107,0.1896541714668274,0.0207756329327822,-0.0370332375168800) * float(LUMA_texOff(vec2(-1,-1))); +res += vec4(0.0094799501821399,-0.0652511194348335,-0.0004292793164495,-0.0726212188601494) * float(LUMA_texOff(vec2(-1,0))); +res += vec4(0.0297284796833992,-0.1210186630487442,-0.0202929321676493,-0.0574462898075581) * float(LUMA_texOff(vec2(-1,1))); +res += vec4(-0.0318185277283192,0.0840775370597839,0.0110451309010386,0.0415569432079792) * float(LUMA_texOff(vec2(-1,2))); +res += vec4(-0.0253141783177853,0.1168256178498268,0.1159729585051537,0.0963164269924164) * float(LUMA_texOff(vec2(0,-2))); +res += vec4(-0.1103615835309029,-0.0276833958923817,-0.4999594092369080,0.1053867191076279) * float(LUMA_texOff(vec2(0,-1))); +res += vec4(1.1100435256958008,0.0646764487028122,0.0154005717486143,0.8891586661338806) * float(LUMA_texOff(vec2(0,0))); +res += vec4(0.1229330673813820,0.1719468832015991,0.5730338096618652,-0.1645544171333313) * float(LUMA_texOff(vec2(0,1))); +res += vec4(-0.0090442728251219,-0.3023961782455444,-0.1589493155479431,0.0418574027717113) * float(LUMA_texOff(vec2(0,2))); +res += vec4(0.0031942036002874,-0.1310926079750061,0.0075543406419456,-0.0016449346439913) * float(LUMA_texOff(vec2(1,-2))); +res += vec4(-0.0995150282979012,-0.0701921209692955,-0.0130895879119635,0.1344170123338699) * float(LUMA_texOff(vec2(1,-1))); +res += vec4(0.0060519003309309,-0.1533465683460236,0.0114194005727768,0.0264683905988932) * float(LUMA_texOff(vec2(1,0))); +res += vec4(0.0244008023291826,0.1881769001483917,-0.0206351149827242,-0.0628309547901154) * float(LUMA_texOff(vec2(1,1))); +res += vec4(0.0075713125988841,0.0508594363927841,0.0430423170328140,-0.0124188791960478) * float(LUMA_texOff(vec2(1,2))); +res += vec4(-0.0166875869035721,-0.0047865519300103,0.0006719123339280,0.0316803231835365) * float(LUMA_texOff(vec2(2,-2))); +res += vec4(-0.0058461269363761,0.0990798473358154,-0.0177743826061487,-0.0066122291609645) * float(LUMA_texOff(vec2(2,-1))); +res += vec4(-0.0972401946783066,-0.0225446373224258,-0.0037693574558944,0.1953062713146210) * float(LUMA_texOff(vec2(2,0))); +res += vec4(-0.0216837190091610,-0.1824268400669098,0.0069816261529922,0.0283037684857845) * float(LUMA_texOff(vec2(2,1))); +res += vec4(-0.0025767991319299,0.0459827110171318,-0.0080216089263558,0.0084134787321091) * float(LUMA_texOff(vec2(2,2))); +return res; +} + +void main() +{ + at_ = ivec2(gl_GlobalInvocationID.xy); + if (at_.x >= p.size.x || at_.y >= p.size.y) return; + imageStore(dst, at_, hook()); +} diff --git a/app/src/shaders/fsrcnnx/pass_01.spv.inc b/app/src/shaders/fsrcnnx/pass_01.spv.inc new file mode 100644 index 0000000..b4569d7 --- /dev/null +++ b/app/src/shaders/fsrcnnx/pass_01.spv.inc @@ -0,0 +1,532 @@ +{0x07230203,0x00010000,0x000d000b,0x000003af, +0x00000000,0x00020011,0x00000001,0x0006000b, +0x00000001,0x4c534c47,0x6474732e,0x3035342e, +0x00000000,0x0003000e,0x00000000,0x00000001, +0x0006000f,0x00000005,0x00000004,0x6e69616d, +0x00000000,0x0000016e,0x00060010,0x00000004, +0x00000011,0x00000010,0x00000010,0x00000001, +0x00030047,0x00000020,0x00000002,0x00050048, +0x00000020,0x00000000,0x00000023,0x00000000, +0x00040047,0x0000003a,0x00000021,0x00000001, +0x00040047,0x0000003a,0x00000022,0x00000000, +0x00040047,0x0000016e,0x0000000b,0x0000001c, +0x00030047,0x0000018a,0x00000019,0x00040047, +0x0000018a,0x00000021,0x00000000,0x00040047, +0x0000018a,0x00000022,0x00000000,0x00040047, +0x0000018f,0x0000000b,0x00000019,0x00020013, +0x00000002,0x00030021,0x00000003,0x00000002, +0x00030016,0x00000006,0x00000020,0x00090019, +0x00000007,0x00000006,0x00000001,0x00000000, +0x00000000,0x00000000,0x00000001,0x00000000, +0x0003001b,0x00000008,0x00000007,0x00040020, +0x00000009,0x00000000,0x00000008,0x00040017, +0x0000000c,0x00000006,0x00000004,0x00040015, +0x00000016,0x00000020,0x00000001,0x00040017, +0x00000017,0x00000016,0x00000002,0x0004002b, +0x00000016,0x0000001e,0x00000000,0x0005002c, +0x00000017,0x0000001f,0x0000001e,0x0000001e, +0x0003001e,0x00000020,0x00000017,0x00040020, +0x00000021,0x00000009,0x00000020,0x0004003b, +0x00000021,0x00000022,0x00000009,0x00040020, +0x00000023,0x00000009,0x00000017,0x0004002b, +0x00000016,0x00000026,0x00000001,0x0004002b, +0x00000006,0x00000030,0xbe2105f1,0x0004002b, +0x00000006,0x00000031,0xbc4613cf,0x0004002b, +0x00000006,0x00000032,0x3bc97b92,0x0004002b, +0x00000006,0x00000033,0xbe9210dc,0x0007002c, +0x0000000c,0x00000034,0x00000030,0x00000031, +0x00000032,0x00000033,0x0004002b,0x00000006, +0x00000035,0xbb9cf5c3,0x0004002b,0x00000006, +0x00000036,0x3d5c236a,0x0004002b,0x00000006, +0x00000037,0xb7cf51e8,0x0004002b,0x00000006, +0x00000038,0x3bda6961,0x0007002c,0x0000000c, +0x00000039,0x00000035,0x00000036,0x00000037, +0x00000038,0x0004003b,0x00000009,0x0000003a, +0x00000000,0x00040015,0x0000003f,0x00000020, +0x00000000,0x0004002b,0x0000003f,0x00000040, +0x00000000,0x0004002b,0x00000006,0x00000045, +0x3befae36,0x0004002b,0x00000006,0x00000046, +0xbcfd22d8,0x0004002b,0x00000006,0x00000047, +0xbc32e1fe,0x0004002b,0x00000006,0x00000048, +0xbc181c0e,0x0007002c,0x0000000c,0x00000049, +0x00000045,0x00000046,0x00000047,0x00000048, +0x0004002b,0x00000006,0x00000052,0x3d725c56, +0x0004002b,0x00000006,0x00000053,0x3e4a3b01, +0x0004002b,0x00000006,0x00000054,0xbca1acdf, +0x0004002b,0x00000006,0x00000055,0xbd5fde6e, +0x0007002c,0x0000000c,0x00000056,0x00000052, +0x00000053,0x00000054,0x00000055,0x0004002b, +0x00000006,0x0000005f,0xba9a32b8,0x0004002b, +0x00000006,0x00000060,0xbcf54f71,0x0004002b, +0x00000006,0x00000061,0x3cbc13f3,0x0004002b, +0x00000006,0x00000062,0x3b0f9503,0x0007002c, +0x0000000c,0x00000063,0x0000005f,0x00000060, +0x00000061,0x00000062,0x0004002b,0x00000006, +0x0000006c,0x3c20baac,0x0004002b,0x00000006, +0x0000006d,0x3c04b3f0,0x0004002b,0x00000006, +0x0000006e,0xbb479203,0x0004002b,0x00000006, +0x0000006f,0xbc5853b6,0x0007002c,0x0000000c, +0x00000070,0x0000006c,0x0000006d,0x0000006e, +0x0000006f,0x0004002b,0x00000006,0x00000079, +0xbc89e56e,0x0004002b,0x00000006,0x0000007a, +0xbd984fe6,0x0004002b,0x00000006,0x0000007b, +0xbcd4631b,0x0004002b,0x00000006,0x0000007c, +0x3cc0161f,0x0007002c,0x0000000c,0x0000007d, +0x00000079,0x0000007a,0x0000007b,0x0000007c, +0x0004002b,0x00000006,0x00000085,0x3cc48dc3, +0x0004002b,0x00000006,0x00000086,0x3e4234b4, +0x0004002b,0x00000006,0x00000087,0x3caa31a9, +0x0004002b,0x00000006,0x00000088,0xbd17b02a, +0x0007002c,0x0000000c,0x00000089,0x00000085, +0x00000086,0x00000087,0x00000088,0x0004002b, +0x00000006,0x00000091,0x3c1b51cb,0x0004002b, +0x00000006,0x00000092,0xbd85a261,0x0004002b, +0x00000006,0x00000093,0xb9e110e5,0x0004002b, +0x00000006,0x00000094,0xbd94ba6f,0x0007002c, +0x0000000c,0x00000095,0x00000091,0x00000092, +0x00000093,0x00000094,0x0004002b,0x00000006, +0x0000009d,0x3cf38924,0x0004002b,0x00000006, +0x0000009e,0xbdf7d8a2,0x0004002b,0x00000006, +0x0000009f,0xbca63d5d,0x0004002b,0x00000006, +0x000000a0,0xbd6b4ccd,0x0007002c,0x0000000c, +0x000000a1,0x0000009d,0x0000009e,0x0000009f, +0x000000a0,0x0004002b,0x00000006,0x000000a9, +0xbd025425,0x0004002b,0x00000006,0x000000aa, +0x3dac30d8,0x0004002b,0x00000006,0x000000ab, +0x3c34f6a3,0x0004002b,0x00000006,0x000000ac, +0x3d2a379d,0x0007002c,0x0000000c,0x000000ad, +0x000000a9,0x000000aa,0x000000ab,0x000000ac, +0x0004002b,0x00000006,0x000000b5,0xbccf5fae, +0x0004002b,0x00000006,0x000000b6,0x3def4245, +0x0004002b,0x00000006,0x000000b7,0x3ded833b, +0x0004002b,0x00000006,0x000000b8,0x3dc5418c, +0x0007002c,0x0000000c,0x000000b9,0x000000b5, +0x000000b6,0x000000b7,0x000000b8,0x0004002b, +0x00000006,0x000000c1,0xbde20541,0x0004002b, +0x00000006,0x000000c2,0xbce2c84a,0x0004002b, +0x00000006,0x000000c3,0xbefffaae,0x0004002b, +0x00000006,0x000000c4,0x3dd7d4fe,0x0007002c, +0x0000000c,0x000000c5,0x000000c1,0x000000c2, +0x000000c3,0x000000c4,0x0004002b,0x00000006, +0x000000cd,0x3f8e15e8,0x0004002b,0x00000006, +0x000000ce,0x3d847516,0x0004002b,0x00000006, +0x000000cf,0x3c7c52ae,0x0004002b,0x00000006, +0x000000d0,0x3f639fe7,0x0007002c,0x0000000c, +0x000000d1,0x000000cd,0x000000ce,0x000000cf, +0x000000d0,0x0004002b,0x00000006,0x000000d9, +0x3dfbc455,0x0004002b,0x00000006,0x000000da, +0x3e3012d8,0x0004002b,0x00000006,0x000000db, +0x3f12b258,0x0004002b,0x00000006,0x000000dc, +0xbe2880f4,0x0007002c,0x0000000c,0x000000dd, +0x000000d9,0x000000da,0x000000db,0x000000dc, +0x0004002b,0x00000006,0x000000e5,0xbc142e6e, +0x0004002b,0x00000006,0x000000e6,0xbe9ad3ac, +0x0004002b,0x00000006,0x000000e7,0xbe22c39c, +0x0004002b,0x00000006,0x000000e8,0x3d2b72ab, +0x0007002c,0x0000000c,0x000000e9,0x000000e5, +0x000000e6,0x000000e7,0x000000e8,0x0004002b, +0x00000006,0x000000f1,0x3b5155d8,0x0004002b, +0x00000006,0x000000f2,0xbe063d24,0x0004002b, +0x00000006,0x000000f3,0x3bf78a67,0x0004002b, +0x00000006,0x000000f4,0xbad79ad9,0x0007002c, +0x0000000c,0x000000f5,0x000000f1,0x000000f2, +0x000000f3,0x000000f4,0x0004002b,0x00000006, +0x000000fd,0xbdcbce89,0x0004002b,0x00000006, +0x000000fe,0xbd8fc0e3,0x0004002b,0x00000006, +0x000000ff,0xbc5675b6,0x0004002b,0x00000006, +0x00000100,0x3e09a49d,0x0007002c,0x0000000c, +0x00000101,0x000000fd,0x000000fe,0x000000ff, +0x00000100,0x0004002b,0x00000006,0x00000109, +0x3bc64f05,0x0004002b,0x00000006,0x0000010a, +0xbe1d06e2,0x0004002b,0x00000006,0x0000010b, +0x3c3b1870,0x0004002b,0x00000006,0x0000010c, +0x3cd8d43d,0x0007002c,0x0000000c,0x0000010d, +0x00000109,0x0000010a,0x0000010b,0x0000010c, +0x0004002b,0x00000006,0x00000115,0x3cc7e431, +0x0004002b,0x00000006,0x00000116,0x3e40b172, +0x0004002b,0x00000006,0x00000117,0xbca90af9, +0x0004002b,0x00000006,0x00000118,0xbd80ad84, +0x0007002c,0x0000000c,0x00000119,0x00000115, +0x00000116,0x00000117,0x00000118,0x0004002b, +0x00000006,0x00000121,0x3bf818c6,0x0004002b, +0x00000006,0x00000122,0x3d5051fc,0x0004002b, +0x00000006,0x00000123,0x3d304d24,0x0004002b, +0x00000006,0x00000124,0xbc4b788e,0x0007002c, +0x0000000c,0x00000125,0x00000121,0x00000122, +0x00000123,0x00000124,0x0004002b,0x00000006, +0x0000012d,0xbc88b468,0x0004002b,0x00000006, +0x0000012e,0xbb9cd882,0x0004002b,0x00000006, +0x0000012f,0x3a302346,0x0004002b,0x00000006, +0x00000130,0x3d01c33a,0x0007002c,0x0000000c, +0x00000131,0x0000012d,0x0000012e,0x0000012f, +0x00000130,0x0004002b,0x00000006,0x00000139, +0xbbbf90de,0x0004002b,0x00000006,0x0000013a, +0x3dcaea60,0x0004002b,0x00000006,0x0000013b, +0xbc919b95,0x0004002b,0x00000006,0x0000013c, +0xbbd8ab66,0x0007002c,0x0000000c,0x0000013d, +0x00000139,0x0000013a,0x0000013b,0x0000013c, +0x0004002b,0x00000006,0x00000145,0xbdc725de, +0x0004002b,0x00000006,0x00000146,0xbcb8af88, +0x0004002b,0x00000006,0x00000147,0xbb770753, +0x0004002b,0x00000006,0x00000148,0x3e47fe5e, +0x0007002c,0x0000000c,0x00000149,0x00000145, +0x00000146,0x00000147,0x00000148,0x0004002b, +0x00000006,0x00000151,0xbcb1a20e,0x0004002b, +0x00000006,0x00000152,0xbe3ace1a,0x0004002b, +0x00000006,0x00000153,0x3be4c620,0x0004002b, +0x00000006,0x00000154,0x3ce7dd4e,0x0007002c, +0x0000000c,0x00000155,0x00000151,0x00000152, +0x00000153,0x00000154,0x0004002b,0x00000006, +0x0000015d,0xbb28df84,0x0004002b,0x00000006, +0x0000015e,0x3d3c585e,0x0004002b,0x00000006, +0x0000015f,0xbc036d11,0x0004002b,0x00000006, +0x00000160,0x3c09d8b0,0x0007002c,0x0000000c, +0x00000161,0x0000015d,0x0000015e,0x0000015f, +0x00000160,0x00040017,0x0000016c,0x0000003f, +0x00000003,0x00040020,0x0000016d,0x00000001, +0x0000016c,0x0004003b,0x0000016d,0x0000016e, +0x00000001,0x00040017,0x0000016f,0x0000003f, +0x00000002,0x00020014,0x00000173,0x00040020, +0x00000177,0x00000009,0x00000016,0x0004002b, +0x0000003f,0x0000017e,0x00000001,0x00090019, +0x00000188,0x00000006,0x00000001,0x00000000, +0x00000000,0x00000000,0x00000002,0x00000002, +0x00040020,0x00000189,0x00000000,0x00000188, +0x0004003b,0x00000189,0x0000018a,0x00000000, +0x0004002b,0x0000003f,0x0000018e,0x00000010, +0x0006002c,0x0000016c,0x0000018f,0x0000018e, +0x0000018e,0x0000017e,0x0004002b,0x00000016, +0x00000394,0xfffffffe,0x0005002c,0x00000017, +0x00000395,0x00000394,0x00000394,0x0005002c, +0x00000017,0x00000396,0x00000026,0x00000026, +0x0004002b,0x00000016,0x00000397,0xffffffff, +0x0005002c,0x00000017,0x00000398,0x00000394, +0x00000397,0x0005002c,0x00000017,0x00000399, +0x00000394,0x0000001e,0x0005002c,0x00000017, +0x0000039a,0x00000394,0x00000026,0x0004002b, +0x00000016,0x0000039b,0x00000002,0x0005002c, +0x00000017,0x0000039c,0x00000394,0x0000039b, +0x0005002c,0x00000017,0x0000039d,0x00000397, +0x00000394,0x0005002c,0x00000017,0x0000039e, +0x00000397,0x00000397,0x0005002c,0x00000017, +0x0000039f,0x00000397,0x0000001e,0x0005002c, +0x00000017,0x000003a0,0x00000397,0x00000026, +0x0005002c,0x00000017,0x000003a1,0x00000397, +0x0000039b,0x0005002c,0x00000017,0x000003a2, +0x0000001e,0x00000394,0x0005002c,0x00000017, +0x000003a3,0x0000001e,0x00000397,0x0005002c, +0x00000017,0x000003a4,0x0000001e,0x00000026, +0x0005002c,0x00000017,0x000003a5,0x0000001e, +0x0000039b,0x0005002c,0x00000017,0x000003a6, +0x00000026,0x00000394,0x0005002c,0x00000017, +0x000003a7,0x00000026,0x00000397,0x0005002c, +0x00000017,0x000003a8,0x00000026,0x0000001e, +0x0005002c,0x00000017,0x000003a9,0x00000026, +0x0000039b,0x0005002c,0x00000017,0x000003aa, +0x0000039b,0x00000394,0x0005002c,0x00000017, +0x000003ab,0x0000039b,0x00000397,0x0005002c, +0x00000017,0x000003ac,0x0000039b,0x0000001e, +0x0005002c,0x00000017,0x000003ad,0x0000039b, +0x00000026,0x0005002c,0x00000017,0x000003ae, +0x0000039b,0x0000039b,0x00050036,0x00000002, +0x00000004,0x00000000,0x00000003,0x000200f8, +0x00000005,0x000300f7,0x00000192,0x00000000, +0x000300fb,0x00000040,0x00000193,0x000200f8, +0x00000193,0x0004003d,0x0000016c,0x00000170, +0x0000016e,0x0007004f,0x0000016f,0x00000171, +0x00000170,0x00000170,0x00000000,0x00000001, +0x0004007c,0x00000017,0x00000172,0x00000171, +0x00050051,0x00000016,0x00000176,0x00000172, +0x00000000,0x00060041,0x00000177,0x00000178, +0x00000022,0x0000001e,0x00000040,0x0004003d, +0x00000016,0x00000179,0x00000178,0x000500af, +0x00000173,0x0000017a,0x00000176,0x00000179, +0x000400a8,0x00000173,0x0000017b,0x0000017a, +0x000300f7,0x0000017d,0x00000000,0x000400fa, +0x0000017b,0x0000017c,0x0000017d,0x000200f8, +0x0000017c,0x00050051,0x00000016,0x00000180, +0x00000172,0x00000001,0x00060041,0x00000177, +0x00000181,0x00000022,0x0000001e,0x0000017e, +0x0004003d,0x00000016,0x00000182,0x00000181, +0x000500af,0x00000173,0x00000183,0x00000180, +0x00000182,0x000200f9,0x0000017d,0x000200f8, +0x0000017d,0x000700f5,0x00000173,0x00000184, +0x0000017a,0x00000193,0x00000183,0x0000017c, +0x000300f7,0x00000186,0x00000000,0x000400fa, +0x00000184,0x00000185,0x00000186,0x000200f8, +0x00000185,0x000200f9,0x00000192,0x000200f8, +0x00000186,0x0004003d,0x00000188,0x0000018b, +0x0000018a,0x0004003d,0x00000008,0x00000234, +0x0000003a,0x00050080,0x00000017,0x00000238, +0x00000172,0x00000395,0x00050041,0x00000023, +0x00000239,0x00000022,0x0000001e,0x0004003d, +0x00000017,0x0000023a,0x00000239,0x00050082, +0x00000017,0x0000023c,0x0000023a,0x00000396, +0x0008000c,0x00000017,0x0000023d,0x00000001, +0x0000002d,0x00000238,0x0000001f,0x0000023c, +0x00040064,0x00000007,0x0000023e,0x00000234, +0x0007005f,0x0000000c,0x0000023f,0x0000023e, +0x0000023d,0x00000002,0x0000001e,0x00050051, +0x00000006,0x000001b5,0x0000023f,0x00000000, +0x0005008e,0x0000000c,0x000001b6,0x00000039, +0x000001b5,0x00050081,0x0000000c,0x000001b8, +0x00000034,0x000001b6,0x0004003d,0x00000008, +0x00000242,0x0000003a,0x00050080,0x00000017, +0x00000246,0x00000172,0x00000398,0x0008000c, +0x00000017,0x0000024b,0x00000001,0x0000002d, +0x00000246,0x0000001f,0x0000023c,0x00040064, +0x00000007,0x0000024c,0x00000242,0x0007005f, +0x0000000c,0x0000024d,0x0000024c,0x0000024b, +0x00000002,0x0000001e,0x00050051,0x00000006, +0x000001ba,0x0000024d,0x00000000,0x0005008e, +0x0000000c,0x000001bb,0x00000049,0x000001ba, +0x00050081,0x0000000c,0x000001bd,0x000001b8, +0x000001bb,0x0004003d,0x00000008,0x00000250, +0x0000003a,0x00050080,0x00000017,0x00000254, +0x00000172,0x00000399,0x0008000c,0x00000017, +0x00000259,0x00000001,0x0000002d,0x00000254, +0x0000001f,0x0000023c,0x00040064,0x00000007, +0x0000025a,0x00000250,0x0007005f,0x0000000c, +0x0000025b,0x0000025a,0x00000259,0x00000002, +0x0000001e,0x00050051,0x00000006,0x000001bf, +0x0000025b,0x00000000,0x0005008e,0x0000000c, +0x000001c0,0x00000056,0x000001bf,0x00050081, +0x0000000c,0x000001c2,0x000001bd,0x000001c0, +0x0004003d,0x00000008,0x0000025e,0x0000003a, +0x00050080,0x00000017,0x00000262,0x00000172, +0x0000039a,0x0008000c,0x00000017,0x00000267, +0x00000001,0x0000002d,0x00000262,0x0000001f, +0x0000023c,0x00040064,0x00000007,0x00000268, +0x0000025e,0x0007005f,0x0000000c,0x00000269, +0x00000268,0x00000267,0x00000002,0x0000001e, +0x00050051,0x00000006,0x000001c4,0x00000269, +0x00000000,0x0005008e,0x0000000c,0x000001c5, +0x00000063,0x000001c4,0x00050081,0x0000000c, +0x000001c7,0x000001c2,0x000001c5,0x0004003d, +0x00000008,0x0000026c,0x0000003a,0x00050080, +0x00000017,0x00000270,0x00000172,0x0000039c, +0x0008000c,0x00000017,0x00000275,0x00000001, +0x0000002d,0x00000270,0x0000001f,0x0000023c, +0x00040064,0x00000007,0x00000276,0x0000026c, +0x0007005f,0x0000000c,0x00000277,0x00000276, +0x00000275,0x00000002,0x0000001e,0x00050051, +0x00000006,0x000001c9,0x00000277,0x00000000, +0x0005008e,0x0000000c,0x000001ca,0x00000070, +0x000001c9,0x00050081,0x0000000c,0x000001cc, +0x000001c7,0x000001ca,0x0004003d,0x00000008, +0x0000027a,0x0000003a,0x00050080,0x00000017, +0x0000027e,0x00000172,0x0000039d,0x0008000c, +0x00000017,0x00000283,0x00000001,0x0000002d, +0x0000027e,0x0000001f,0x0000023c,0x00040064, +0x00000007,0x00000284,0x0000027a,0x0007005f, +0x0000000c,0x00000285,0x00000284,0x00000283, +0x00000002,0x0000001e,0x00050051,0x00000006, +0x000001ce,0x00000285,0x00000000,0x0005008e, +0x0000000c,0x000001cf,0x0000007d,0x000001ce, +0x00050081,0x0000000c,0x000001d1,0x000001cc, +0x000001cf,0x0004003d,0x00000008,0x00000288, +0x0000003a,0x00050080,0x00000017,0x0000028c, +0x00000172,0x0000039e,0x0008000c,0x00000017, +0x00000291,0x00000001,0x0000002d,0x0000028c, +0x0000001f,0x0000023c,0x00040064,0x00000007, +0x00000292,0x00000288,0x0007005f,0x0000000c, +0x00000293,0x00000292,0x00000291,0x00000002, +0x0000001e,0x00050051,0x00000006,0x000001d3, +0x00000293,0x00000000,0x0005008e,0x0000000c, +0x000001d4,0x00000089,0x000001d3,0x00050081, +0x0000000c,0x000001d6,0x000001d1,0x000001d4, +0x0004003d,0x00000008,0x00000296,0x0000003a, +0x00050080,0x00000017,0x0000029a,0x00000172, +0x0000039f,0x0008000c,0x00000017,0x0000029f, +0x00000001,0x0000002d,0x0000029a,0x0000001f, +0x0000023c,0x00040064,0x00000007,0x000002a0, +0x00000296,0x0007005f,0x0000000c,0x000002a1, +0x000002a0,0x0000029f,0x00000002,0x0000001e, +0x00050051,0x00000006,0x000001d8,0x000002a1, +0x00000000,0x0005008e,0x0000000c,0x000001d9, +0x00000095,0x000001d8,0x00050081,0x0000000c, +0x000001db,0x000001d6,0x000001d9,0x0004003d, +0x00000008,0x000002a4,0x0000003a,0x00050080, +0x00000017,0x000002a8,0x00000172,0x000003a0, +0x0008000c,0x00000017,0x000002ad,0x00000001, +0x0000002d,0x000002a8,0x0000001f,0x0000023c, +0x00040064,0x00000007,0x000002ae,0x000002a4, +0x0007005f,0x0000000c,0x000002af,0x000002ae, +0x000002ad,0x00000002,0x0000001e,0x00050051, +0x00000006,0x000001dd,0x000002af,0x00000000, +0x0005008e,0x0000000c,0x000001de,0x000000a1, +0x000001dd,0x00050081,0x0000000c,0x000001e0, +0x000001db,0x000001de,0x0004003d,0x00000008, +0x000002b2,0x0000003a,0x00050080,0x00000017, +0x000002b6,0x00000172,0x000003a1,0x0008000c, +0x00000017,0x000002bb,0x00000001,0x0000002d, +0x000002b6,0x0000001f,0x0000023c,0x00040064, +0x00000007,0x000002bc,0x000002b2,0x0007005f, +0x0000000c,0x000002bd,0x000002bc,0x000002bb, +0x00000002,0x0000001e,0x00050051,0x00000006, +0x000001e2,0x000002bd,0x00000000,0x0005008e, +0x0000000c,0x000001e3,0x000000ad,0x000001e2, +0x00050081,0x0000000c,0x000001e5,0x000001e0, +0x000001e3,0x0004003d,0x00000008,0x000002c0, +0x0000003a,0x00050080,0x00000017,0x000002c4, +0x00000172,0x000003a2,0x0008000c,0x00000017, +0x000002c9,0x00000001,0x0000002d,0x000002c4, +0x0000001f,0x0000023c,0x00040064,0x00000007, +0x000002ca,0x000002c0,0x0007005f,0x0000000c, +0x000002cb,0x000002ca,0x000002c9,0x00000002, +0x0000001e,0x00050051,0x00000006,0x000001e7, +0x000002cb,0x00000000,0x0005008e,0x0000000c, +0x000001e8,0x000000b9,0x000001e7,0x00050081, +0x0000000c,0x000001ea,0x000001e5,0x000001e8, +0x0004003d,0x00000008,0x000002ce,0x0000003a, +0x00050080,0x00000017,0x000002d2,0x00000172, +0x000003a3,0x0008000c,0x00000017,0x000002d7, +0x00000001,0x0000002d,0x000002d2,0x0000001f, +0x0000023c,0x00040064,0x00000007,0x000002d8, +0x000002ce,0x0007005f,0x0000000c,0x000002d9, +0x000002d8,0x000002d7,0x00000002,0x0000001e, +0x00050051,0x00000006,0x000001ec,0x000002d9, +0x00000000,0x0005008e,0x0000000c,0x000001ed, +0x000000c5,0x000001ec,0x00050081,0x0000000c, +0x000001ef,0x000001ea,0x000001ed,0x0004003d, +0x00000008,0x000002dc,0x0000003a,0x0008000c, +0x00000017,0x000002e5,0x00000001,0x0000002d, +0x00000172,0x0000001f,0x0000023c,0x00040064, +0x00000007,0x000002e6,0x000002dc,0x0007005f, +0x0000000c,0x000002e7,0x000002e6,0x000002e5, +0x00000002,0x0000001e,0x00050051,0x00000006, +0x000001f1,0x000002e7,0x00000000,0x0005008e, +0x0000000c,0x000001f2,0x000000d1,0x000001f1, +0x00050081,0x0000000c,0x000001f4,0x000001ef, +0x000001f2,0x0004003d,0x00000008,0x000002ea, +0x0000003a,0x00050080,0x00000017,0x000002ee, +0x00000172,0x000003a4,0x0008000c,0x00000017, +0x000002f3,0x00000001,0x0000002d,0x000002ee, +0x0000001f,0x0000023c,0x00040064,0x00000007, +0x000002f4,0x000002ea,0x0007005f,0x0000000c, +0x000002f5,0x000002f4,0x000002f3,0x00000002, +0x0000001e,0x00050051,0x00000006,0x000001f6, +0x000002f5,0x00000000,0x0005008e,0x0000000c, +0x000001f7,0x000000dd,0x000001f6,0x00050081, +0x0000000c,0x000001f9,0x000001f4,0x000001f7, +0x0004003d,0x00000008,0x000002f8,0x0000003a, +0x00050080,0x00000017,0x000002fc,0x00000172, +0x000003a5,0x0008000c,0x00000017,0x00000301, +0x00000001,0x0000002d,0x000002fc,0x0000001f, +0x0000023c,0x00040064,0x00000007,0x00000302, +0x000002f8,0x0007005f,0x0000000c,0x00000303, +0x00000302,0x00000301,0x00000002,0x0000001e, +0x00050051,0x00000006,0x000001fb,0x00000303, +0x00000000,0x0005008e,0x0000000c,0x000001fc, +0x000000e9,0x000001fb,0x00050081,0x0000000c, +0x000001fe,0x000001f9,0x000001fc,0x0004003d, +0x00000008,0x00000306,0x0000003a,0x00050080, +0x00000017,0x0000030a,0x00000172,0x000003a6, +0x0008000c,0x00000017,0x0000030f,0x00000001, +0x0000002d,0x0000030a,0x0000001f,0x0000023c, +0x00040064,0x00000007,0x00000310,0x00000306, +0x0007005f,0x0000000c,0x00000311,0x00000310, +0x0000030f,0x00000002,0x0000001e,0x00050051, +0x00000006,0x00000200,0x00000311,0x00000000, +0x0005008e,0x0000000c,0x00000201,0x000000f5, +0x00000200,0x00050081,0x0000000c,0x00000203, +0x000001fe,0x00000201,0x0004003d,0x00000008, +0x00000314,0x0000003a,0x00050080,0x00000017, +0x00000318,0x00000172,0x000003a7,0x0008000c, +0x00000017,0x0000031d,0x00000001,0x0000002d, +0x00000318,0x0000001f,0x0000023c,0x00040064, +0x00000007,0x0000031e,0x00000314,0x0007005f, +0x0000000c,0x0000031f,0x0000031e,0x0000031d, +0x00000002,0x0000001e,0x00050051,0x00000006, +0x00000205,0x0000031f,0x00000000,0x0005008e, +0x0000000c,0x00000206,0x00000101,0x00000205, +0x00050081,0x0000000c,0x00000208,0x00000203, +0x00000206,0x0004003d,0x00000008,0x00000322, +0x0000003a,0x00050080,0x00000017,0x00000326, +0x00000172,0x000003a8,0x0008000c,0x00000017, +0x0000032b,0x00000001,0x0000002d,0x00000326, +0x0000001f,0x0000023c,0x00040064,0x00000007, +0x0000032c,0x00000322,0x0007005f,0x0000000c, +0x0000032d,0x0000032c,0x0000032b,0x00000002, +0x0000001e,0x00050051,0x00000006,0x0000020a, +0x0000032d,0x00000000,0x0005008e,0x0000000c, +0x0000020b,0x0000010d,0x0000020a,0x00050081, +0x0000000c,0x0000020d,0x00000208,0x0000020b, +0x0004003d,0x00000008,0x00000330,0x0000003a, +0x00050080,0x00000017,0x00000334,0x00000172, +0x00000396,0x0008000c,0x00000017,0x00000339, +0x00000001,0x0000002d,0x00000334,0x0000001f, +0x0000023c,0x00040064,0x00000007,0x0000033a, +0x00000330,0x0007005f,0x0000000c,0x0000033b, +0x0000033a,0x00000339,0x00000002,0x0000001e, +0x00050051,0x00000006,0x0000020f,0x0000033b, +0x00000000,0x0005008e,0x0000000c,0x00000210, +0x00000119,0x0000020f,0x00050081,0x0000000c, +0x00000212,0x0000020d,0x00000210,0x0004003d, +0x00000008,0x0000033e,0x0000003a,0x00050080, +0x00000017,0x00000342,0x00000172,0x000003a9, +0x0008000c,0x00000017,0x00000347,0x00000001, +0x0000002d,0x00000342,0x0000001f,0x0000023c, +0x00040064,0x00000007,0x00000348,0x0000033e, +0x0007005f,0x0000000c,0x00000349,0x00000348, +0x00000347,0x00000002,0x0000001e,0x00050051, +0x00000006,0x00000214,0x00000349,0x00000000, +0x0005008e,0x0000000c,0x00000215,0x00000125, +0x00000214,0x00050081,0x0000000c,0x00000217, +0x00000212,0x00000215,0x0004003d,0x00000008, +0x0000034c,0x0000003a,0x00050080,0x00000017, +0x00000350,0x00000172,0x000003aa,0x0008000c, +0x00000017,0x00000355,0x00000001,0x0000002d, +0x00000350,0x0000001f,0x0000023c,0x00040064, +0x00000007,0x00000356,0x0000034c,0x0007005f, +0x0000000c,0x00000357,0x00000356,0x00000355, +0x00000002,0x0000001e,0x00050051,0x00000006, +0x00000219,0x00000357,0x00000000,0x0005008e, +0x0000000c,0x0000021a,0x00000131,0x00000219, +0x00050081,0x0000000c,0x0000021c,0x00000217, +0x0000021a,0x0004003d,0x00000008,0x0000035a, +0x0000003a,0x00050080,0x00000017,0x0000035e, +0x00000172,0x000003ab,0x0008000c,0x00000017, +0x00000363,0x00000001,0x0000002d,0x0000035e, +0x0000001f,0x0000023c,0x00040064,0x00000007, +0x00000364,0x0000035a,0x0007005f,0x0000000c, +0x00000365,0x00000364,0x00000363,0x00000002, +0x0000001e,0x00050051,0x00000006,0x0000021e, +0x00000365,0x00000000,0x0005008e,0x0000000c, +0x0000021f,0x0000013d,0x0000021e,0x00050081, +0x0000000c,0x00000221,0x0000021c,0x0000021f, +0x0004003d,0x00000008,0x00000368,0x0000003a, +0x00050080,0x00000017,0x0000036c,0x00000172, +0x000003ac,0x0008000c,0x00000017,0x00000371, +0x00000001,0x0000002d,0x0000036c,0x0000001f, +0x0000023c,0x00040064,0x00000007,0x00000372, +0x00000368,0x0007005f,0x0000000c,0x00000373, +0x00000372,0x00000371,0x00000002,0x0000001e, +0x00050051,0x00000006,0x00000223,0x00000373, +0x00000000,0x0005008e,0x0000000c,0x00000224, +0x00000149,0x00000223,0x00050081,0x0000000c, +0x00000226,0x00000221,0x00000224,0x0004003d, +0x00000008,0x00000376,0x0000003a,0x00050080, +0x00000017,0x0000037a,0x00000172,0x000003ad, +0x0008000c,0x00000017,0x0000037f,0x00000001, +0x0000002d,0x0000037a,0x0000001f,0x0000023c, +0x00040064,0x00000007,0x00000380,0x00000376, +0x0007005f,0x0000000c,0x00000381,0x00000380, +0x0000037f,0x00000002,0x0000001e,0x00050051, +0x00000006,0x00000228,0x00000381,0x00000000, +0x0005008e,0x0000000c,0x00000229,0x00000155, +0x00000228,0x00050081,0x0000000c,0x0000022b, +0x00000226,0x00000229,0x0004003d,0x00000008, +0x00000384,0x0000003a,0x00050080,0x00000017, +0x00000388,0x00000172,0x000003ae,0x0008000c, +0x00000017,0x0000038d,0x00000001,0x0000002d, +0x00000388,0x0000001f,0x0000023c,0x00040064, +0x00000007,0x0000038e,0x00000384,0x0007005f, +0x0000000c,0x0000038f,0x0000038e,0x0000038d, +0x00000002,0x0000001e,0x00050051,0x00000006, +0x0000022d,0x0000038f,0x00000000,0x0005008e, +0x0000000c,0x0000022e,0x00000161,0x0000022d, +0x00050081,0x0000000c,0x00000230,0x0000022b, +0x0000022e,0x00040063,0x0000018b,0x00000172, +0x00000230,0x000200f9,0x00000192,0x000200f8, +0x00000192,0x000100fd,0x00010038} diff --git a/app/src/shaders/fsrcnnx/pass_02.comp b/app/src/shaders/fsrcnnx/pass_02.comp new file mode 100644 index 0000000..847976c --- /dev/null +++ b/app/src/shaders/fsrcnnx/pass_02.comp @@ -0,0 +1,51 @@ +#version 450 +// Generated by tools/gen_fsrcnnx.js from third_party/FSRCNNX_x2_8-0-4-1.glsl +// (FSRCNNX by igv, LGPL-3.0). Layer: feature map 2. Do not edit. +layout(local_size_x = 16, local_size_y = 16) in; +layout(binding = 0, rgba16f) uniform writeonly image2D dst; +layout(binding = 1) uniform sampler2D in0; +layout(binding = 2) uniform sampler2D in1; +layout(binding = 3) uniform sampler2D in2; +layout(push_constant) uniform Params { ivec2 size; } p; + +ivec2 at_; +vec4 fetch_(sampler2D s, vec2 o) { return texelFetch(s, clamp(at_ + ivec2(o), ivec2(0), p.size - 1), 0); } +#define LUMA_texOff(o) fetch_(in0, vec2(o)).x + +vec4 hook() +{ +vec4 res = vec4(0.0541447550058365,0.0088306749239564,-0.0112389577552676,-0.0127860950306058); +res += vec4(0.0142660010606050,0.0137931071221828,0.0061188107356429,-0.0104134222492576) * float(LUMA_texOff(vec2(-2,-2))); +res += vec4(0.0147292809560895,-0.0289912857115269,0.0266769435256720,0.0933856964111328) * float(LUMA_texOff(vec2(-2,-1))); +res += vec4(-0.1734338253736496,0.1116316691040993,-0.1973157376050949,-0.0581855811178684) * float(LUMA_texOff(vec2(-2,0))); +res += vec4(0.0347507223486900,-0.0341566652059555,0.0061667622067034,0.0075258882716298) * float(LUMA_texOff(vec2(-2,1))); +res += vec4(0.0069884369149804,-0.0194250214844942,0.0080830128863454,-0.0036874092184007) * float(LUMA_texOff(vec2(-2,2))); +res += vec4(0.0233764201402664,0.0344744995236397,0.0162145942449570,0.0979529991745949) * float(LUMA_texOff(vec2(-1,-2))); +res += vec4(0.1280796974897385,-0.1018339172005653,-0.0132977198809385,-0.0019474622095004) * float(LUMA_texOff(vec2(-1,-1))); +res += vec4(0.4286882579326630,0.1222677752375603,0.7046694159507751,0.0945475697517395) * float(LUMA_texOff(vec2(-1,0))); +res += vec4(0.1107441782951355,-0.0134433070197701,-0.0174900908023119,-0.1686445474624634) * float(LUMA_texOff(vec2(-1,1))); +res += vec4(0.0321478620171547,0.0065357843413949,0.0300805997103453,0.0420113280415535) * float(LUMA_texOff(vec2(-1,2))); +res += vec4(-0.1240341588854790,0.0950303301215172,-0.0129648456349969,-0.2681856453418732) * float(LUMA_texOff(vec2(0,-2))); +res += vec4(0.4846960902214050,0.0351924635469913,0.0223043337464333,-0.1273630708456039) * float(LUMA_texOff(vec2(0,-1))); +res += vec4(-1.9379507303237915,-0.2444442063570023,0.0291962660849094,-0.3835578560829163) * float(LUMA_texOff(vec2(0,0))); +res += vec4(0.6396278142929077,-0.0765938311815262,-0.0552659817039967,0.4393545985221863) * float(LUMA_texOff(vec2(0,1))); +res += vec4(-0.1969728022813797,-0.0607173256576061,0.0131113547831774,0.0542017817497253) * float(LUMA_texOff(vec2(0,2))); +res += vec4(0.0091696009039879,-0.0031533432193100,-0.0368777588009834,-0.0459998287260532) * float(LUMA_texOff(vec2(1,-2))); +res += vec4(0.1096992492675781,0.2597902715206146,0.0304869692772627,-0.0195200722664595) * float(LUMA_texOff(vec2(1,-1))); +res += vec4(0.2889648377895355,-0.4275591969490051,-0.7414156794548035,0.2695442438125610) * float(LUMA_texOff(vec2(1,0))); +res += vec4(0.0892018377780914,-0.0229137558490038,0.0244414471089840,-0.1926898956298828) * float(LUMA_texOff(vec2(1,1))); +res += vec4(0.0576358586549759,0.0027846973389387,-0.0036861505359411,-0.0253547113388777) * float(LUMA_texOff(vec2(1,2))); +res += vec4(0.0159624069929123,0.0319602824747562,0.0019470085389912,0.0089780492708087) * float(LUMA_texOff(vec2(2,-2))); +res += vec4(0.0552792511880398,0.0543054342269897,0.0134062822908163,0.0545728243887424) * float(LUMA_texOff(vec2(2,-1))); +res += vec4(-0.1170092225074768,0.1963327825069427,0.1503890156745911,0.1891828328371048) * float(LUMA_texOff(vec2(2,0))); +res += vec4(-0.0084421783685684,0.1297017931938171,-0.0330600887537003,-0.0942063704133034) * float(LUMA_texOff(vec2(2,1))); +res += vec4(0.0118440408259630,-0.0337875857949257,0.0055063469335437,0.0254479162395000) * float(LUMA_texOff(vec2(2,2))); +return res; +} + +void main() +{ + at_ = ivec2(gl_GlobalInvocationID.xy); + if (at_.x >= p.size.x || at_.y >= p.size.y) return; + imageStore(dst, at_, hook()); +} diff --git a/app/src/shaders/fsrcnnx/pass_02.spv.inc b/app/src/shaders/fsrcnnx/pass_02.spv.inc new file mode 100644 index 0000000..9b4c7fe --- /dev/null +++ b/app/src/shaders/fsrcnnx/pass_02.spv.inc @@ -0,0 +1,532 @@ +{0x07230203,0x00010000,0x000d000b,0x000003af, +0x00000000,0x00020011,0x00000001,0x0006000b, +0x00000001,0x4c534c47,0x6474732e,0x3035342e, +0x00000000,0x0003000e,0x00000000,0x00000001, +0x0006000f,0x00000005,0x00000004,0x6e69616d, +0x00000000,0x0000016e,0x00060010,0x00000004, +0x00000011,0x00000010,0x00000010,0x00000001, +0x00030047,0x00000020,0x00000002,0x00050048, +0x00000020,0x00000000,0x00000023,0x00000000, +0x00040047,0x0000003a,0x00000021,0x00000001, +0x00040047,0x0000003a,0x00000022,0x00000000, +0x00040047,0x0000016e,0x0000000b,0x0000001c, +0x00030047,0x0000018a,0x00000019,0x00040047, +0x0000018a,0x00000021,0x00000000,0x00040047, +0x0000018a,0x00000022,0x00000000,0x00040047, +0x0000018f,0x0000000b,0x00000019,0x00020013, +0x00000002,0x00030021,0x00000003,0x00000002, +0x00030016,0x00000006,0x00000020,0x00090019, +0x00000007,0x00000006,0x00000001,0x00000000, +0x00000000,0x00000000,0x00000001,0x00000000, +0x0003001b,0x00000008,0x00000007,0x00040020, +0x00000009,0x00000000,0x00000008,0x00040017, +0x0000000c,0x00000006,0x00000004,0x00040015, +0x00000016,0x00000020,0x00000001,0x00040017, +0x00000017,0x00000016,0x00000002,0x0004002b, +0x00000016,0x0000001e,0x00000000,0x0005002c, +0x00000017,0x0000001f,0x0000001e,0x0000001e, +0x0003001e,0x00000020,0x00000017,0x00040020, +0x00000021,0x00000009,0x00000020,0x0004003b, +0x00000021,0x00000022,0x00000009,0x00040020, +0x00000023,0x00000009,0x00000017,0x0004002b, +0x00000016,0x00000026,0x00000001,0x0004002b, +0x00000006,0x00000030,0x3d5dc6e4,0x0004002b, +0x00000006,0x00000031,0x3c10ae89,0x0004002b, +0x00000006,0x00000032,0xbc38239b,0x0004002b, +0x00000006,0x00000033,0xbc517cc5,0x0007002c, +0x0000000c,0x00000034,0x00000030,0x00000031, +0x00000032,0x00000033,0x0004002b,0x00000006, +0x00000035,0x3c69bbf2,0x0004002b,0x00000006, +0x00000036,0x3c61fc7c,0x0004002b,0x00000006, +0x00000037,0x3bc8804e,0x0004002b,0x00000006, +0x00000038,0xbc2a9d0f,0x0007002c,0x0000000c, +0x00000039,0x00000035,0x00000036,0x00000037, +0x00000038,0x0004003b,0x00000009,0x0000003a, +0x00000000,0x00040015,0x0000003f,0x00000020, +0x00000000,0x0004002b,0x0000003f,0x00000040, +0x00000000,0x0004002b,0x00000006,0x00000045, +0x3c715315,0x0004002b,0x00000006,0x00000046, +0xbced7f22,0x0004002b,0x00000006,0x00000047, +0x3cda899b,0x0004002b,0x00000006,0x00000048, +0x3dbf4100,0x0007002c,0x0000000c,0x00000049, +0x00000045,0x00000046,0x00000047,0x00000048, +0x0004002b,0x00000006,0x00000052,0xbe3198a3, +0x0004002b,0x00000006,0x00000053,0x3de49f25, +0x0004002b,0x00000006,0x00000054,0xbe4a0d23, +0x0004002b,0x00000006,0x00000055,0xbd6e5401, +0x0007002c,0x0000000c,0x00000056,0x00000052, +0x00000053,0x00000054,0x00000055,0x0004002b, +0x00000006,0x0000005f,0x3d0e56c6,0x0004002b, +0x00000006,0x00000060,0xbd0be7dc,0x0004002b, +0x00000006,0x00000061,0x3bca128d,0x0004002b, +0x00000006,0x00000062,0x3bf69bba,0x0007002c, +0x0000000c,0x00000063,0x0000005f,0x00000060, +0x00000061,0x00000062,0x0004002b,0x00000006, +0x0000006c,0x3be4ff42,0x0004002b,0x00000006, +0x0000006d,0xbc9f2139,0x0004002b,0x00000006, +0x0000006e,0x3c046e9d,0x0004002b,0x00000006, +0x0000006f,0xbb71a876,0x0007002c,0x0000000c, +0x00000070,0x0000006c,0x0000006d,0x0000006e, +0x0000006f,0x0004002b,0x00000006,0x00000079, +0x3cbf7fe8,0x0004002b,0x00000006,0x0000007a, +0x3d0d3522,0x0004002b,0x00000006,0x0000007b, +0x3c84d478,0x0004002b,0x00000006,0x0000007c, +0x3dc89b95,0x0007002c,0x0000000c,0x0000007d, +0x00000079,0x0000007a,0x0000007b,0x0000007c, +0x0004002b,0x00000006,0x00000085,0x3e032753, +0x0004002b,0x00000006,0x00000086,0xbdd08e4d, +0x0004002b,0x00000006,0x00000087,0xbc59deae, +0x0004002b,0x00000006,0x00000088,0xbaff41fd, +0x0007002c,0x0000000c,0x00000089,0x00000085, +0x00000086,0x00000087,0x00000088,0x0004002b, +0x00000006,0x00000091,0x3edb7d07,0x0004002b, +0x00000006,0x00000092,0x3dfa6787,0x0004002b, +0x00000006,0x00000093,0x3f346537,0x0004002b, +0x00000006,0x00000094,0x3dc1a228,0x0007002c, +0x0000000c,0x00000095,0x00000091,0x00000092, +0x00000093,0x00000094,0x0004002b,0x00000006, +0x0000009d,0x3de2cdd8,0x0004002b,0x00000006, +0x0000009e,0xbc5c4151,0x0004002b,0x00000006, +0x0000009f,0xbc8f4761,0x0004002b,0x00000006, +0x000000a0,0xbe2cb128,0x0007002c,0x0000000c, +0x000000a1,0x0000009d,0x0000009e,0x0000009f, +0x000000a0,0x0004002b,0x00000006,0x000000a9, +0x3d03ad7a,0x0004002b,0x00000006,0x000000aa, +0x3bd62a22,0x0004002b,0x00000006,0x000000ab, +0x3cf66b97,0x0004002b,0x00000006,0x000000ac, +0x3d2c1412,0x0007002c,0x0000000c,0x000000ad, +0x000000a9,0x000000aa,0x000000ab,0x000000ac, +0x0004002b,0x00000006,0x000000b5,0xbdfe059f, +0x0004002b,0x00000006,0x000000b6,0x3dc29f43, +0x0004002b,0x00000006,0x000000b7,0xbc546a81, +0x0004002b,0x00000006,0x000000b8,0xbe894fa1, +0x0007002c,0x0000000c,0x000000b9,0x000000b5, +0x000000b6,0x000000b7,0x000000b8,0x0004002b, +0x00000006,0x000000c1,0x3ef82a16,0x0004002b, +0x00000006,0x000000c2,0x3d1025f9,0x0004002b, +0x00000006,0x000000c3,0x3cb6b794,0x0004002b, +0x00000006,0x000000c4,0xbe026b77,0x0007002c, +0x0000000c,0x000000c5,0x000000c1,0x000000c2, +0x000000c3,0x000000c4,0x0004002b,0x00000006, +0x000000cd,0xbff80ec5,0x0004002b,0x00000006, +0x000000ce,0xbe7a4f95,0x0004002b,0x00000006, +0x000000cf,0x3cef2d02,0x0004002b,0x00000006, +0x000000d0,0xbec461b2,0x0007002c,0x0000000c, +0x000000d1,0x000000cd,0x000000ce,0x000000cf, +0x000000d0,0x0004002b,0x00000006,0x000000d9, +0x3f23bea6,0x0004002b,0x00000006,0x000000da, +0xbd9cdd3a,0x0004002b,0x00000006,0x000000db, +0xbd625e95,0x0004002b,0x00000006,0x000000dc, +0x3ee0f316,0x0007002c,0x0000000c,0x000000dd, +0x000000d9,0x000000da,0x000000db,0x000000dc, +0x0004002b,0x00000006,0x000000e5,0xbe49b33d, +0x0004002b,0x00000006,0x000000e6,0xbd78b2bb, +0x0004002b,0x00000006,0x000000e7,0x3c56d102, +0x0004002b,0x00000006,0x000000e8,0x3d5e02b0, +0x0007002c,0x0000000c,0x000000e9,0x000000e5, +0x000000e6,0x000000e7,0x000000e8,0x0004002b, +0x00000006,0x000000f1,0x3c163c18,0x0004002b, +0x00000006,0x000000f2,0xbb4ea852,0x0004002b, +0x00000006,0x000000f3,0xbd170d22,0x0004002b, +0x00000006,0x000000f4,0xbd3c6a51,0x0007002c, +0x0000000c,0x000000f5,0x000000f1,0x000000f2, +0x000000f3,0x000000f4,0x0004002b,0x00000006, +0x000000fd,0x3de0aa00,0x0004002b,0x00000006, +0x000000fe,0x3e85033b,0x0004002b,0x00000006, +0x000000ff,0x3cf9bfcf,0x0004002b,0x00000006, +0x00000100,0xbc9fe88f,0x0007002c,0x0000000c, +0x00000101,0x000000fd,0x000000fe,0x000000ff, +0x00000100,0x0004002b,0x00000006,0x00000109, +0x3e93f333,0x0004002b,0x00000006,0x0000010a, +0xbedae90a,0x0004002b,0x00000006,0x0000010b, +0xbf3dcd6b,0x0004002b,0x00000006,0x0000010c, +0x3e8a01b4,0x0007002c,0x0000000c,0x0000010d, +0x00000109,0x0000010a,0x0000010b,0x0000010c, +0x0004002b,0x00000006,0x00000115,0x3db6af74, +0x0004002b,0x00000006,0x00000116,0xbcbbb5a1, +0x0004002b,0x00000006,0x00000117,0x3cc8396e, +0x0004002b,0x00000006,0x00000118,0xbe455080, +0x0007002c,0x0000000c,0x00000119,0x00000115, +0x00000116,0x00000117,0x00000118,0x0004002b, +0x00000006,0x00000121,0x3d6c1394,0x0004002b, +0x00000006,0x00000122,0x3b367f78,0x0004002b, +0x00000006,0x00000123,0xbb719358,0x0004002b, +0x00000006,0x00000124,0xbccfb4af,0x0007002c, +0x0000000c,0x00000125,0x00000121,0x00000122, +0x00000123,0x00000124,0x0004002b,0x00000006, +0x0000012d,0x3c82c398,0x0004002b,0x00000006, +0x0000012e,0x3d02e8c9,0x0004002b,0x00000006, +0x0000012f,0x3aff32c4,0x0004002b,0x00000006, +0x00000130,0x3c1318ab,0x0007002c,0x0000000c, +0x00000131,0x0000012d,0x0000012e,0x0000012f, +0x00000130,0x0004002b,0x00000006,0x00000139, +0x3d626c7f,0x0004002b,0x00000006,0x0000013a, +0x3d5e6f60,0x0004002b,0x00000006,0x0000013b, +0x3c5ba606,0x0004002b,0x00000006,0x0000013c, +0x3d5f87c1,0x0007002c,0x0000000c,0x0000013d, +0x00000139,0x0000013a,0x0000013b,0x0000013c, +0x0004002b,0x00000006,0x00000145,0xbdefa288, +0x0004002b,0x00000006,0x00000146,0x3e490b76, +0x0004002b,0x00000006,0x00000147,0x3e19ff94, +0x0004002b,0x00000006,0x00000148,0x3e41b925, +0x0007002c,0x0000000c,0x00000149,0x00000145, +0x00000146,0x00000147,0x00000148,0x0004002b, +0x00000006,0x00000151,0xbc0a5110,0x0004002b, +0x00000006,0x00000152,0x3e04d08c,0x0004002b, +0x00000006,0x00000153,0xbd076a04,0x0004002b, +0x00000006,0x00000154,0xbdc0ef45,0x0007002c, +0x0000000c,0x00000155,0x00000151,0x00000152, +0x00000153,0x00000154,0x0004002b,0x00000006, +0x0000015d,0x3c420d82,0x0004002b,0x00000006, +0x0000015e,0xbd0a64da,0x0004002b,0x00000006, +0x0000015f,0x3bb46e96,0x0004002b,0x00000006, +0x00000160,0x3cd07826,0x0007002c,0x0000000c, +0x00000161,0x0000015d,0x0000015e,0x0000015f, +0x00000160,0x00040017,0x0000016c,0x0000003f, +0x00000003,0x00040020,0x0000016d,0x00000001, +0x0000016c,0x0004003b,0x0000016d,0x0000016e, +0x00000001,0x00040017,0x0000016f,0x0000003f, +0x00000002,0x00020014,0x00000173,0x00040020, +0x00000177,0x00000009,0x00000016,0x0004002b, +0x0000003f,0x0000017e,0x00000001,0x00090019, +0x00000188,0x00000006,0x00000001,0x00000000, +0x00000000,0x00000000,0x00000002,0x00000002, +0x00040020,0x00000189,0x00000000,0x00000188, +0x0004003b,0x00000189,0x0000018a,0x00000000, +0x0004002b,0x0000003f,0x0000018e,0x00000010, +0x0006002c,0x0000016c,0x0000018f,0x0000018e, +0x0000018e,0x0000017e,0x0004002b,0x00000016, +0x00000394,0xfffffffe,0x0005002c,0x00000017, +0x00000395,0x00000394,0x00000394,0x0005002c, +0x00000017,0x00000396,0x00000026,0x00000026, +0x0004002b,0x00000016,0x00000397,0xffffffff, +0x0005002c,0x00000017,0x00000398,0x00000394, +0x00000397,0x0005002c,0x00000017,0x00000399, +0x00000394,0x0000001e,0x0005002c,0x00000017, +0x0000039a,0x00000394,0x00000026,0x0004002b, +0x00000016,0x0000039b,0x00000002,0x0005002c, +0x00000017,0x0000039c,0x00000394,0x0000039b, +0x0005002c,0x00000017,0x0000039d,0x00000397, +0x00000394,0x0005002c,0x00000017,0x0000039e, +0x00000397,0x00000397,0x0005002c,0x00000017, +0x0000039f,0x00000397,0x0000001e,0x0005002c, +0x00000017,0x000003a0,0x00000397,0x00000026, +0x0005002c,0x00000017,0x000003a1,0x00000397, +0x0000039b,0x0005002c,0x00000017,0x000003a2, +0x0000001e,0x00000394,0x0005002c,0x00000017, +0x000003a3,0x0000001e,0x00000397,0x0005002c, +0x00000017,0x000003a4,0x0000001e,0x00000026, +0x0005002c,0x00000017,0x000003a5,0x0000001e, +0x0000039b,0x0005002c,0x00000017,0x000003a6, +0x00000026,0x00000394,0x0005002c,0x00000017, +0x000003a7,0x00000026,0x00000397,0x0005002c, +0x00000017,0x000003a8,0x00000026,0x0000001e, +0x0005002c,0x00000017,0x000003a9,0x00000026, +0x0000039b,0x0005002c,0x00000017,0x000003aa, +0x0000039b,0x00000394,0x0005002c,0x00000017, +0x000003ab,0x0000039b,0x00000397,0x0005002c, +0x00000017,0x000003ac,0x0000039b,0x0000001e, +0x0005002c,0x00000017,0x000003ad,0x0000039b, +0x00000026,0x0005002c,0x00000017,0x000003ae, +0x0000039b,0x0000039b,0x00050036,0x00000002, +0x00000004,0x00000000,0x00000003,0x000200f8, +0x00000005,0x000300f7,0x00000192,0x00000000, +0x000300fb,0x00000040,0x00000193,0x000200f8, +0x00000193,0x0004003d,0x0000016c,0x00000170, +0x0000016e,0x0007004f,0x0000016f,0x00000171, +0x00000170,0x00000170,0x00000000,0x00000001, +0x0004007c,0x00000017,0x00000172,0x00000171, +0x00050051,0x00000016,0x00000176,0x00000172, +0x00000000,0x00060041,0x00000177,0x00000178, +0x00000022,0x0000001e,0x00000040,0x0004003d, +0x00000016,0x00000179,0x00000178,0x000500af, +0x00000173,0x0000017a,0x00000176,0x00000179, +0x000400a8,0x00000173,0x0000017b,0x0000017a, +0x000300f7,0x0000017d,0x00000000,0x000400fa, +0x0000017b,0x0000017c,0x0000017d,0x000200f8, +0x0000017c,0x00050051,0x00000016,0x00000180, +0x00000172,0x00000001,0x00060041,0x00000177, +0x00000181,0x00000022,0x0000001e,0x0000017e, +0x0004003d,0x00000016,0x00000182,0x00000181, +0x000500af,0x00000173,0x00000183,0x00000180, +0x00000182,0x000200f9,0x0000017d,0x000200f8, +0x0000017d,0x000700f5,0x00000173,0x00000184, +0x0000017a,0x00000193,0x00000183,0x0000017c, +0x000300f7,0x00000186,0x00000000,0x000400fa, +0x00000184,0x00000185,0x00000186,0x000200f8, +0x00000185,0x000200f9,0x00000192,0x000200f8, +0x00000186,0x0004003d,0x00000188,0x0000018b, +0x0000018a,0x0004003d,0x00000008,0x00000234, +0x0000003a,0x00050080,0x00000017,0x00000238, +0x00000172,0x00000395,0x00050041,0x00000023, +0x00000239,0x00000022,0x0000001e,0x0004003d, +0x00000017,0x0000023a,0x00000239,0x00050082, +0x00000017,0x0000023c,0x0000023a,0x00000396, +0x0008000c,0x00000017,0x0000023d,0x00000001, +0x0000002d,0x00000238,0x0000001f,0x0000023c, +0x00040064,0x00000007,0x0000023e,0x00000234, +0x0007005f,0x0000000c,0x0000023f,0x0000023e, +0x0000023d,0x00000002,0x0000001e,0x00050051, +0x00000006,0x000001b5,0x0000023f,0x00000000, +0x0005008e,0x0000000c,0x000001b6,0x00000039, +0x000001b5,0x00050081,0x0000000c,0x000001b8, +0x00000034,0x000001b6,0x0004003d,0x00000008, +0x00000242,0x0000003a,0x00050080,0x00000017, +0x00000246,0x00000172,0x00000398,0x0008000c, +0x00000017,0x0000024b,0x00000001,0x0000002d, +0x00000246,0x0000001f,0x0000023c,0x00040064, +0x00000007,0x0000024c,0x00000242,0x0007005f, +0x0000000c,0x0000024d,0x0000024c,0x0000024b, +0x00000002,0x0000001e,0x00050051,0x00000006, +0x000001ba,0x0000024d,0x00000000,0x0005008e, +0x0000000c,0x000001bb,0x00000049,0x000001ba, +0x00050081,0x0000000c,0x000001bd,0x000001b8, +0x000001bb,0x0004003d,0x00000008,0x00000250, +0x0000003a,0x00050080,0x00000017,0x00000254, +0x00000172,0x00000399,0x0008000c,0x00000017, +0x00000259,0x00000001,0x0000002d,0x00000254, +0x0000001f,0x0000023c,0x00040064,0x00000007, +0x0000025a,0x00000250,0x0007005f,0x0000000c, +0x0000025b,0x0000025a,0x00000259,0x00000002, +0x0000001e,0x00050051,0x00000006,0x000001bf, +0x0000025b,0x00000000,0x0005008e,0x0000000c, +0x000001c0,0x00000056,0x000001bf,0x00050081, +0x0000000c,0x000001c2,0x000001bd,0x000001c0, +0x0004003d,0x00000008,0x0000025e,0x0000003a, +0x00050080,0x00000017,0x00000262,0x00000172, +0x0000039a,0x0008000c,0x00000017,0x00000267, +0x00000001,0x0000002d,0x00000262,0x0000001f, +0x0000023c,0x00040064,0x00000007,0x00000268, +0x0000025e,0x0007005f,0x0000000c,0x00000269, +0x00000268,0x00000267,0x00000002,0x0000001e, +0x00050051,0x00000006,0x000001c4,0x00000269, +0x00000000,0x0005008e,0x0000000c,0x000001c5, +0x00000063,0x000001c4,0x00050081,0x0000000c, +0x000001c7,0x000001c2,0x000001c5,0x0004003d, +0x00000008,0x0000026c,0x0000003a,0x00050080, +0x00000017,0x00000270,0x00000172,0x0000039c, +0x0008000c,0x00000017,0x00000275,0x00000001, +0x0000002d,0x00000270,0x0000001f,0x0000023c, +0x00040064,0x00000007,0x00000276,0x0000026c, +0x0007005f,0x0000000c,0x00000277,0x00000276, +0x00000275,0x00000002,0x0000001e,0x00050051, +0x00000006,0x000001c9,0x00000277,0x00000000, +0x0005008e,0x0000000c,0x000001ca,0x00000070, +0x000001c9,0x00050081,0x0000000c,0x000001cc, +0x000001c7,0x000001ca,0x0004003d,0x00000008, +0x0000027a,0x0000003a,0x00050080,0x00000017, +0x0000027e,0x00000172,0x0000039d,0x0008000c, +0x00000017,0x00000283,0x00000001,0x0000002d, +0x0000027e,0x0000001f,0x0000023c,0x00040064, +0x00000007,0x00000284,0x0000027a,0x0007005f, +0x0000000c,0x00000285,0x00000284,0x00000283, +0x00000002,0x0000001e,0x00050051,0x00000006, +0x000001ce,0x00000285,0x00000000,0x0005008e, +0x0000000c,0x000001cf,0x0000007d,0x000001ce, +0x00050081,0x0000000c,0x000001d1,0x000001cc, +0x000001cf,0x0004003d,0x00000008,0x00000288, +0x0000003a,0x00050080,0x00000017,0x0000028c, +0x00000172,0x0000039e,0x0008000c,0x00000017, +0x00000291,0x00000001,0x0000002d,0x0000028c, +0x0000001f,0x0000023c,0x00040064,0x00000007, +0x00000292,0x00000288,0x0007005f,0x0000000c, +0x00000293,0x00000292,0x00000291,0x00000002, +0x0000001e,0x00050051,0x00000006,0x000001d3, +0x00000293,0x00000000,0x0005008e,0x0000000c, +0x000001d4,0x00000089,0x000001d3,0x00050081, +0x0000000c,0x000001d6,0x000001d1,0x000001d4, +0x0004003d,0x00000008,0x00000296,0x0000003a, +0x00050080,0x00000017,0x0000029a,0x00000172, +0x0000039f,0x0008000c,0x00000017,0x0000029f, +0x00000001,0x0000002d,0x0000029a,0x0000001f, +0x0000023c,0x00040064,0x00000007,0x000002a0, +0x00000296,0x0007005f,0x0000000c,0x000002a1, +0x000002a0,0x0000029f,0x00000002,0x0000001e, +0x00050051,0x00000006,0x000001d8,0x000002a1, +0x00000000,0x0005008e,0x0000000c,0x000001d9, +0x00000095,0x000001d8,0x00050081,0x0000000c, +0x000001db,0x000001d6,0x000001d9,0x0004003d, +0x00000008,0x000002a4,0x0000003a,0x00050080, +0x00000017,0x000002a8,0x00000172,0x000003a0, +0x0008000c,0x00000017,0x000002ad,0x00000001, +0x0000002d,0x000002a8,0x0000001f,0x0000023c, +0x00040064,0x00000007,0x000002ae,0x000002a4, +0x0007005f,0x0000000c,0x000002af,0x000002ae, +0x000002ad,0x00000002,0x0000001e,0x00050051, +0x00000006,0x000001dd,0x000002af,0x00000000, +0x0005008e,0x0000000c,0x000001de,0x000000a1, +0x000001dd,0x00050081,0x0000000c,0x000001e0, +0x000001db,0x000001de,0x0004003d,0x00000008, +0x000002b2,0x0000003a,0x00050080,0x00000017, +0x000002b6,0x00000172,0x000003a1,0x0008000c, +0x00000017,0x000002bb,0x00000001,0x0000002d, +0x000002b6,0x0000001f,0x0000023c,0x00040064, +0x00000007,0x000002bc,0x000002b2,0x0007005f, +0x0000000c,0x000002bd,0x000002bc,0x000002bb, +0x00000002,0x0000001e,0x00050051,0x00000006, +0x000001e2,0x000002bd,0x00000000,0x0005008e, +0x0000000c,0x000001e3,0x000000ad,0x000001e2, +0x00050081,0x0000000c,0x000001e5,0x000001e0, +0x000001e3,0x0004003d,0x00000008,0x000002c0, +0x0000003a,0x00050080,0x00000017,0x000002c4, +0x00000172,0x000003a2,0x0008000c,0x00000017, +0x000002c9,0x00000001,0x0000002d,0x000002c4, +0x0000001f,0x0000023c,0x00040064,0x00000007, +0x000002ca,0x000002c0,0x0007005f,0x0000000c, +0x000002cb,0x000002ca,0x000002c9,0x00000002, +0x0000001e,0x00050051,0x00000006,0x000001e7, +0x000002cb,0x00000000,0x0005008e,0x0000000c, +0x000001e8,0x000000b9,0x000001e7,0x00050081, +0x0000000c,0x000001ea,0x000001e5,0x000001e8, +0x0004003d,0x00000008,0x000002ce,0x0000003a, +0x00050080,0x00000017,0x000002d2,0x00000172, +0x000003a3,0x0008000c,0x00000017,0x000002d7, +0x00000001,0x0000002d,0x000002d2,0x0000001f, +0x0000023c,0x00040064,0x00000007,0x000002d8, +0x000002ce,0x0007005f,0x0000000c,0x000002d9, +0x000002d8,0x000002d7,0x00000002,0x0000001e, +0x00050051,0x00000006,0x000001ec,0x000002d9, +0x00000000,0x0005008e,0x0000000c,0x000001ed, +0x000000c5,0x000001ec,0x00050081,0x0000000c, +0x000001ef,0x000001ea,0x000001ed,0x0004003d, +0x00000008,0x000002dc,0x0000003a,0x0008000c, +0x00000017,0x000002e5,0x00000001,0x0000002d, +0x00000172,0x0000001f,0x0000023c,0x00040064, +0x00000007,0x000002e6,0x000002dc,0x0007005f, +0x0000000c,0x000002e7,0x000002e6,0x000002e5, +0x00000002,0x0000001e,0x00050051,0x00000006, +0x000001f1,0x000002e7,0x00000000,0x0005008e, +0x0000000c,0x000001f2,0x000000d1,0x000001f1, +0x00050081,0x0000000c,0x000001f4,0x000001ef, +0x000001f2,0x0004003d,0x00000008,0x000002ea, +0x0000003a,0x00050080,0x00000017,0x000002ee, +0x00000172,0x000003a4,0x0008000c,0x00000017, +0x000002f3,0x00000001,0x0000002d,0x000002ee, +0x0000001f,0x0000023c,0x00040064,0x00000007, +0x000002f4,0x000002ea,0x0007005f,0x0000000c, +0x000002f5,0x000002f4,0x000002f3,0x00000002, +0x0000001e,0x00050051,0x00000006,0x000001f6, +0x000002f5,0x00000000,0x0005008e,0x0000000c, +0x000001f7,0x000000dd,0x000001f6,0x00050081, +0x0000000c,0x000001f9,0x000001f4,0x000001f7, +0x0004003d,0x00000008,0x000002f8,0x0000003a, +0x00050080,0x00000017,0x000002fc,0x00000172, +0x000003a5,0x0008000c,0x00000017,0x00000301, +0x00000001,0x0000002d,0x000002fc,0x0000001f, +0x0000023c,0x00040064,0x00000007,0x00000302, +0x000002f8,0x0007005f,0x0000000c,0x00000303, +0x00000302,0x00000301,0x00000002,0x0000001e, +0x00050051,0x00000006,0x000001fb,0x00000303, +0x00000000,0x0005008e,0x0000000c,0x000001fc, +0x000000e9,0x000001fb,0x00050081,0x0000000c, +0x000001fe,0x000001f9,0x000001fc,0x0004003d, +0x00000008,0x00000306,0x0000003a,0x00050080, +0x00000017,0x0000030a,0x00000172,0x000003a6, +0x0008000c,0x00000017,0x0000030f,0x00000001, +0x0000002d,0x0000030a,0x0000001f,0x0000023c, +0x00040064,0x00000007,0x00000310,0x00000306, +0x0007005f,0x0000000c,0x00000311,0x00000310, +0x0000030f,0x00000002,0x0000001e,0x00050051, +0x00000006,0x00000200,0x00000311,0x00000000, +0x0005008e,0x0000000c,0x00000201,0x000000f5, +0x00000200,0x00050081,0x0000000c,0x00000203, +0x000001fe,0x00000201,0x0004003d,0x00000008, +0x00000314,0x0000003a,0x00050080,0x00000017, +0x00000318,0x00000172,0x000003a7,0x0008000c, +0x00000017,0x0000031d,0x00000001,0x0000002d, +0x00000318,0x0000001f,0x0000023c,0x00040064, +0x00000007,0x0000031e,0x00000314,0x0007005f, +0x0000000c,0x0000031f,0x0000031e,0x0000031d, +0x00000002,0x0000001e,0x00050051,0x00000006, +0x00000205,0x0000031f,0x00000000,0x0005008e, +0x0000000c,0x00000206,0x00000101,0x00000205, +0x00050081,0x0000000c,0x00000208,0x00000203, +0x00000206,0x0004003d,0x00000008,0x00000322, +0x0000003a,0x00050080,0x00000017,0x00000326, +0x00000172,0x000003a8,0x0008000c,0x00000017, +0x0000032b,0x00000001,0x0000002d,0x00000326, +0x0000001f,0x0000023c,0x00040064,0x00000007, +0x0000032c,0x00000322,0x0007005f,0x0000000c, +0x0000032d,0x0000032c,0x0000032b,0x00000002, +0x0000001e,0x00050051,0x00000006,0x0000020a, +0x0000032d,0x00000000,0x0005008e,0x0000000c, +0x0000020b,0x0000010d,0x0000020a,0x00050081, +0x0000000c,0x0000020d,0x00000208,0x0000020b, +0x0004003d,0x00000008,0x00000330,0x0000003a, +0x00050080,0x00000017,0x00000334,0x00000172, +0x00000396,0x0008000c,0x00000017,0x00000339, +0x00000001,0x0000002d,0x00000334,0x0000001f, +0x0000023c,0x00040064,0x00000007,0x0000033a, +0x00000330,0x0007005f,0x0000000c,0x0000033b, +0x0000033a,0x00000339,0x00000002,0x0000001e, +0x00050051,0x00000006,0x0000020f,0x0000033b, +0x00000000,0x0005008e,0x0000000c,0x00000210, +0x00000119,0x0000020f,0x00050081,0x0000000c, +0x00000212,0x0000020d,0x00000210,0x0004003d, +0x00000008,0x0000033e,0x0000003a,0x00050080, +0x00000017,0x00000342,0x00000172,0x000003a9, +0x0008000c,0x00000017,0x00000347,0x00000001, +0x0000002d,0x00000342,0x0000001f,0x0000023c, +0x00040064,0x00000007,0x00000348,0x0000033e, +0x0007005f,0x0000000c,0x00000349,0x00000348, +0x00000347,0x00000002,0x0000001e,0x00050051, +0x00000006,0x00000214,0x00000349,0x00000000, +0x0005008e,0x0000000c,0x00000215,0x00000125, +0x00000214,0x00050081,0x0000000c,0x00000217, +0x00000212,0x00000215,0x0004003d,0x00000008, +0x0000034c,0x0000003a,0x00050080,0x00000017, +0x00000350,0x00000172,0x000003aa,0x0008000c, +0x00000017,0x00000355,0x00000001,0x0000002d, +0x00000350,0x0000001f,0x0000023c,0x00040064, +0x00000007,0x00000356,0x0000034c,0x0007005f, +0x0000000c,0x00000357,0x00000356,0x00000355, +0x00000002,0x0000001e,0x00050051,0x00000006, +0x00000219,0x00000357,0x00000000,0x0005008e, +0x0000000c,0x0000021a,0x00000131,0x00000219, +0x00050081,0x0000000c,0x0000021c,0x00000217, +0x0000021a,0x0004003d,0x00000008,0x0000035a, +0x0000003a,0x00050080,0x00000017,0x0000035e, +0x00000172,0x000003ab,0x0008000c,0x00000017, +0x00000363,0x00000001,0x0000002d,0x0000035e, +0x0000001f,0x0000023c,0x00040064,0x00000007, +0x00000364,0x0000035a,0x0007005f,0x0000000c, +0x00000365,0x00000364,0x00000363,0x00000002, +0x0000001e,0x00050051,0x00000006,0x0000021e, +0x00000365,0x00000000,0x0005008e,0x0000000c, +0x0000021f,0x0000013d,0x0000021e,0x00050081, +0x0000000c,0x00000221,0x0000021c,0x0000021f, +0x0004003d,0x00000008,0x00000368,0x0000003a, +0x00050080,0x00000017,0x0000036c,0x00000172, +0x000003ac,0x0008000c,0x00000017,0x00000371, +0x00000001,0x0000002d,0x0000036c,0x0000001f, +0x0000023c,0x00040064,0x00000007,0x00000372, +0x00000368,0x0007005f,0x0000000c,0x00000373, +0x00000372,0x00000371,0x00000002,0x0000001e, +0x00050051,0x00000006,0x00000223,0x00000373, +0x00000000,0x0005008e,0x0000000c,0x00000224, +0x00000149,0x00000223,0x00050081,0x0000000c, +0x00000226,0x00000221,0x00000224,0x0004003d, +0x00000008,0x00000376,0x0000003a,0x00050080, +0x00000017,0x0000037a,0x00000172,0x000003ad, +0x0008000c,0x00000017,0x0000037f,0x00000001, +0x0000002d,0x0000037a,0x0000001f,0x0000023c, +0x00040064,0x00000007,0x00000380,0x00000376, +0x0007005f,0x0000000c,0x00000381,0x00000380, +0x0000037f,0x00000002,0x0000001e,0x00050051, +0x00000006,0x00000228,0x00000381,0x00000000, +0x0005008e,0x0000000c,0x00000229,0x00000155, +0x00000228,0x00050081,0x0000000c,0x0000022b, +0x00000226,0x00000229,0x0004003d,0x00000008, +0x00000384,0x0000003a,0x00050080,0x00000017, +0x00000388,0x00000172,0x000003ae,0x0008000c, +0x00000017,0x0000038d,0x00000001,0x0000002d, +0x00000388,0x0000001f,0x0000023c,0x00040064, +0x00000007,0x0000038e,0x00000384,0x0007005f, +0x0000000c,0x0000038f,0x0000038e,0x0000038d, +0x00000002,0x0000001e,0x00050051,0x00000006, +0x0000022d,0x0000038f,0x00000000,0x0005008e, +0x0000000c,0x0000022e,0x00000161,0x0000022d, +0x00050081,0x0000000c,0x00000230,0x0000022b, +0x0000022e,0x00040063,0x0000018b,0x00000172, +0x00000230,0x000200f9,0x00000192,0x000200f8, +0x00000192,0x000100fd,0x00010038} diff --git a/app/src/shaders/fsrcnnx/pass_03.comp b/app/src/shaders/fsrcnnx/pass_03.comp new file mode 100644 index 0000000..6d6d93f --- /dev/null +++ b/app/src/shaders/fsrcnnx/pass_03.comp @@ -0,0 +1,46 @@ +#version 450 +// Generated by tools/gen_fsrcnnx.js from third_party/FSRCNNX_x2_8-0-4-1.glsl +// (FSRCNNX by igv, LGPL-3.0). Layer: mapping 1_1. Do not edit. +layout(local_size_x = 16, local_size_y = 16) in; +layout(binding = 0, rgba16f) uniform writeonly image2D dst; +layout(binding = 1) uniform sampler2D in0; +layout(binding = 2) uniform sampler2D in1; +layout(binding = 3) uniform sampler2D in2; +layout(push_constant) uniform Params { ivec2 size; } p; + +ivec2 at_; +vec4 fetch_(sampler2D s, vec2 o) { return texelFetch(s, clamp(at_ + ivec2(o), ivec2(0), p.size - 1), 0); } +#define FEATURE1_texOff(o) fetch_(in0, vec2(o)) +#define FEATURE2_texOff(o) fetch_(in1, vec2(o)) + +vec4 hook() +{ +vec4 res = vec4(-0.0445119962096214,-0.7632357478141785,0.0156328510493040,-0.2424548566341400); +res += mat4(0.1279004216194153,-0.0275541823357344,0.2275633513927460,0.2241709381341934,0.0197204202413559,-0.0456816256046295,-0.1296672523021698,0.0564568229019642,-0.0241488646715879,-0.0237508192658424,-0.1899632662534714,0.4177669584751129,-0.1814560592174530,-0.0526473335921764,0.1154382973909378,-0.0715614855289459) * FEATURE1_texOff(vec2(-1,-1)); +res += mat4(-0.0660311505198479,0.0416736751794815,0.3146112561225891,0.1472041457891464,-0.3456672728061676,-0.0055983816273510,0.0022350433282554,0.0819796621799469,0.0057485047727823,0.1532524228096008,0.0204557459801435,-0.2500547170639038,-0.0524359568953514,-0.1911625266075134,-0.1078366711735725,-0.1296254843473434) * FEATURE2_texOff(vec2(-1,-1)); +res += mat4(0.0904538556933403,-0.0150672039017081,0.3322310745716095,0.0638923197984695,0.5975797176361084,-0.2452044337987900,-0.4947478473186493,-0.0783191770315170,0.5771877169609070,-0.0870653912425041,-0.8966570496559143,-0.2140965163707733,-0.0493861362338066,-0.0380848757922649,-0.1345319598913193,-0.0186063013970852) * FEATURE1_texOff(vec2(-1,0)); +res += mat4(-0.2523841261863708,0.1387074738740921,0.7878478765487671,-0.2251627445220947,0.2277439534664154,0.5417668819427490,0.0866540968418121,-0.1707777529954910,-0.0598246827721596,-0.4717158675193787,-1.2242834568023682,0.0454643070697784,-0.3503442704677582,0.0573085807263851,0.2530198395252228,-0.0207283068448305) * FEATURE2_texOff(vec2(-1,0)); +res += mat4(0.0168380383402109,-0.2142438590526581,-0.0207892972975969,0.3628533780574799,0.2431225180625916,0.3098322153091431,0.4073205888271332,-0.2762102782726288,-0.0197229012846947,0.1305596232414246,-0.5697882771492004,-0.2976251542568207,-0.0551432967185974,0.2614036500453949,-0.1410341411828995,-0.2906406223773956) * FEATURE1_texOff(vec2(-1,1)); +res += mat4(-0.0498303361237049,0.0224859956651926,0.1952174901962280,-0.0311204437166452,0.2501715123653412,-0.5893352627754211,-1.0793941020965576,0.0160885509103537,0.5081620812416077,0.0482814386487007,0.0546359121799469,-0.0501569248735905,0.1400523334741592,-0.0106841633096337,-0.0940591320395470,-0.1791856139898300) * FEATURE2_texOff(vec2(-1,1)); +res += mat4(0.0393299944698811,0.2232691347599030,-0.1055066883563995,-0.1607919186353683,-0.1567825973033905,-0.0042221010662615,-0.0548228211700916,0.2352052628993988,0.1483389288187027,0.7503526806831360,0.0797731876373291,-0.0049001369625330,-0.0242983382195234,-0.0308702979236841,0.0828925222158432,0.0561857633292675) * FEATURE1_texOff(vec2(0,-1)); +res += mat4(0.0926392748951912,-0.0418718457221985,-0.3060409128665924,-0.1883587390184402,0.0284292586147785,-0.3584854304790497,-0.7909982800483704,-0.0187337957322598,-0.2496993243694305,-0.7520986795425415,0.3771523833274841,-0.0259053874760866,0.0337998159229755,0.2209153026342392,0.0708771497011185,-0.2814430892467499) * FEATURE2_texOff(vec2(0,-1)); +res += mat4(-0.5287809371948242,0.5777525901794434,0.0880500450730324,-0.8452472090721130,-0.3393408954143524,-0.2273543328046799,-0.1298527419567108,0.4990308582782745,1.2613251209259033,-0.7636719942092896,1.5694186687469482,-0.4087363779544830,0.0874531939625740,0.7067158818244934,-0.3419588804244995,-0.3265531957149506) * FEATURE1_texOff(vec2(0,0)); +res += mat4(0.8229957222938538,-0.1236215904355049,-0.1859253048896790,1.6684840917587280,0.2000777721405029,-0.1239093989133835,1.5623438358306885,0.1779983490705490,0.1017884835600853,-0.3707404434680939,1.0626678466796875,-0.3124029338359833,0.0659058541059494,-0.3585464656352997,-0.1866402775049210,0.6733445525169373) * FEATURE2_texOff(vec2(0,0)); +res += mat4(-0.5544115900993347,-0.1892931908369064,0.2460739761590958,-0.1056193932890892,-0.4318082630634308,0.1257930994033813,-0.2672747671604156,-0.1690235435962677,0.0018221997888759,-0.4397548139095306,-0.3007801771163940,0.1068472340703011,0.3506655991077423,0.1143834441900253,0.1363849341869354,-0.1417382210493088) * FEATURE1_texOff(vec2(0,1)); +res += mat4(-0.0505668744444847,0.1831464916467667,0.3957343697547913,-0.2295413911342621,-0.3892803490161896,0.5436951518058777,0.1217770799994469,0.0223295800387859,-0.4462866187095642,-0.4055982232093811,-0.3771279454231262,0.0807068347930908,0.2116729617118835,0.0281026475131512,-0.0229265503585339,0.2868605256080627) * FEATURE2_texOff(vec2(0,1)); +res += mat4(0.1962712109088898,-0.2373334914445877,-2.5208437442779541,-0.1988540291786194,0.2224564403295517,-0.1783192902803421,-0.3962321281433105,-0.1685980409383774,0.1910390257835388,0.2554391324520111,0.4586416482925415,0.2779130041599274,-0.2002453953027725,-0.0061091855168343,1.3808131217956543,0.0434907525777817) * FEATURE1_texOff(vec2(1,-1)); +res += mat4(-0.0307611189782619,-0.0524470545351505,-0.5897512435913086,-0.0816674903035164,0.4052906930446625,0.2542210817337036,-1.9041002988815308,0.0835462361574173,-0.2484460622072220,-0.0184739269316196,0.4510098397731781,0.2587619423866272,0.1537084281444550,0.1503131389617920,-0.0742949545383453,0.0613216012716293) * FEATURE2_texOff(vec2(1,-1)); +res += mat4(0.1772638261318207,0.0948876664042473,0.0083848545327783,-0.2919732332229614,0.2566950321197510,0.0288751143962145,-0.4624863862991333,-0.0608786940574646,0.3310996592044830,-0.0104284398257732,0.6334818005561829,-0.0027201652992517,-0.0342350602149963,0.1938806027173996,-0.2464301586151123,0.0125883584842086) * FEATURE1_texOff(vec2(1,0)); +res += mat4(0.4839433431625366,-0.0502159744501114,-1.1114163398742676,-0.3965759575366974,0.2117286175489426,0.0414481423795223,-0.1332397013902664,-0.0549883767962456,-0.1275007277727127,0.7844302654266357,-0.0095163453370333,0.0961041301488876,-0.4759134948253632,-0.4284025132656097,-0.2072399407625198,-0.3953579664230347) * FEATURE2_texOff(vec2(1,0)); +res += mat4(0.1605869531631470,-0.1715892106294632,0.0865620598196983,-0.0464400537312031,-0.2688548862934113,0.1722514480352402,0.0167612321674824,-0.0032994034700096,-0.3451044559478760,-0.2280300110578537,-0.0029796555172652,-0.1597652435302734,0.0500137843191624,0.1023071259260178,-0.0407028235495090,0.2228624969720840) * FEATURE1_texOff(vec2(1,1)); +res += mat4(0.6999920010566711,0.0839441940188408,0.0815469548106194,-0.1509176045656204,-0.0690853074193001,-0.3200871348381042,0.0780162736773491,-0.1449639797210693,0.2868815064430237,0.3962450027465820,-0.3439113497734070,0.2657423913478851,0.0988137871026993,0.3471299111843109,-0.2186402678489685,-0.0648017078638077) * FEATURE2_texOff(vec2(1,1)); +res = max(res, vec4(0.0)) + vec4(1.0311057567596436,0.1051208898425102,0.1158760935068130,0.0466635078191757) * min(res, vec4(0.0)); +return res; +} + +void main() +{ + at_ = ivec2(gl_GlobalInvocationID.xy); + if (at_.x >= p.size.x || at_.y >= p.size.y) return; + imageStore(dst, at_, hook()); +} diff --git a/app/src/shaders/fsrcnnx/pass_03.spv.inc b/app/src/shaders/fsrcnnx/pass_03.spv.inc new file mode 100644 index 0000000..8e03450 --- /dev/null +++ b/app/src/shaders/fsrcnnx/pass_03.spv.inc @@ -0,0 +1,703 @@ +{0x07230203,0x00010000,0x000d000b,0x000003c1, +0x00000000,0x00020011,0x00000001,0x0006000b, +0x00000001,0x4c534c47,0x6474732e,0x3035342e, +0x00000000,0x0003000e,0x00000000,0x00000001, +0x0006000f,0x00000005,0x00000004,0x6e69616d, +0x00000000,0x0000022a,0x00060010,0x00000004, +0x00000011,0x00000010,0x00000010,0x00000001, +0x00030047,0x00000020,0x00000002,0x00050048, +0x00000020,0x00000000,0x00000023,0x00000000, +0x00040047,0x0000004b,0x00000021,0x00000001, +0x00040047,0x0000004b,0x00000022,0x00000000, +0x00040047,0x00000068,0x00000021,0x00000002, +0x00040047,0x00000068,0x00000022,0x00000000, +0x00040047,0x0000022a,0x0000000b,0x0000001c, +0x00030047,0x00000247,0x00000019,0x00040047, +0x00000247,0x00000021,0x00000000,0x00040047, +0x00000247,0x00000022,0x00000000,0x00040047, +0x0000024c,0x0000000b,0x00000019,0x00020013, +0x00000002,0x00030021,0x00000003,0x00000002, +0x00030016,0x00000006,0x00000020,0x00090019, +0x00000007,0x00000006,0x00000001,0x00000000, +0x00000000,0x00000000,0x00000001,0x00000000, +0x0003001b,0x00000008,0x00000007,0x00040020, +0x00000009,0x00000000,0x00000008,0x00040017, +0x0000000c,0x00000006,0x00000004,0x00040015, +0x00000016,0x00000020,0x00000001,0x00040017, +0x00000017,0x00000016,0x00000002,0x0004002b, +0x00000016,0x0000001e,0x00000000,0x0005002c, +0x00000017,0x0000001f,0x0000001e,0x0000001e, +0x0003001e,0x00000020,0x00000017,0x00040020, +0x00000021,0x00000009,0x00000020,0x0004003b, +0x00000021,0x00000022,0x00000009,0x00040020, +0x00000023,0x00000009,0x00000017,0x0004002b, +0x00000016,0x00000026,0x00000001,0x0004002b, +0x00000006,0x00000030,0xbd365236,0x0004002b, +0x00000006,0x00000031,0xbf43636b,0x0004002b, +0x00000006,0x00000032,0x3c801077,0x0004002b, +0x00000006,0x00000033,0xbe784616,0x0007002c, +0x0000000c,0x00000034,0x00000030,0x00000031, +0x00000032,0x00000033,0x00040018,0x00000035, +0x0000000c,0x00000004,0x0004002b,0x00000006, +0x00000036,0x3e02f854,0x0004002b,0x00000006, +0x00000037,0xbce1b94f,0x0004002b,0x00000006, +0x00000038,0x3e69065e,0x0004002b,0x00000006, +0x00000039,0x3e658d11,0x0007002c,0x0000000c, +0x0000003a,0x00000036,0x00000037,0x00000038, +0x00000039,0x0004002b,0x00000006,0x0000003b, +0x3ca18cb8,0x0004002b,0x00000006,0x0000003c, +0xbd3b1ca8,0x0004002b,0x00000006,0x0000003d, +0xbe04c77e,0x0004002b,0x00000006,0x0000003e, +0x3d673f45,0x0007002c,0x0000000c,0x0000003f, +0x0000003b,0x0000003c,0x0000003d,0x0000003e, +0x0004002b,0x00000006,0x00000040,0xbcc5d3d7, +0x0004002b,0x00000006,0x00000041,0xbcc29114, +0x0004002b,0x00000006,0x00000042,0xbe4285bb, +0x0004002b,0x00000006,0x00000043,0x3ed5e58d, +0x0007002c,0x0000000c,0x00000044,0x00000040, +0x00000041,0x00000042,0x00000043,0x0004002b, +0x00000006,0x00000045,0xbe39cf9e,0x0004002b, +0x00000006,0x00000046,0xbd57a4bb,0x0004002b, +0x00000006,0x00000047,0x3dec6aea,0x0004002b, +0x00000006,0x00000048,0xbd928ed4,0x0007002c, +0x0000000c,0x00000049,0x00000045,0x00000046, +0x00000047,0x00000048,0x0007002c,0x00000035, +0x0000004a,0x0000003a,0x0000003f,0x00000044, +0x00000049,0x0004003b,0x00000009,0x0000004b, +0x00000000,0x0004002b,0x00000006,0x00000053, +0xbd873b57,0x0004002b,0x00000006,0x00000054, +0x3d2ab204,0x0004002b,0x00000006,0x00000055, +0x3ea114ba,0x0004002b,0x00000006,0x00000056, +0x3e16bcaf,0x0007002c,0x0000000c,0x00000057, +0x00000053,0x00000054,0x00000055,0x00000056, +0x0004002b,0x00000006,0x00000058,0xbeb0fb4d, +0x0004002b,0x00000006,0x00000059,0xbbb772a1, +0x0004002b,0x00000006,0x0000005a,0x3b1279ce, +0x0004002b,0x00000006,0x0000005b,0x3da7e4f4, +0x0007002c,0x0000000c,0x0000005c,0x00000058, +0x00000059,0x0000005a,0x0000005b,0x0004002b, +0x00000006,0x0000005d,0x3bbc5df4,0x0004002b, +0x00000006,0x0000005e,0x3e1cee34,0x0004002b, +0x00000006,0x0000005f,0x3ca792cf,0x0004002b, +0x00000006,0x00000060,0xbe80072c,0x0007002c, +0x0000000c,0x00000061,0x0000005d,0x0000005e, +0x0000005f,0x00000060,0x0004002b,0x00000006, +0x00000062,0xbd56c716,0x0004002b,0x00000006, +0x00000063,0xbe43c01c,0x0004002b,0x00000006, +0x00000064,0xbddcd979,0x0004002b,0x00000006, +0x00000065,0xbe04bc8b,0x0007002c,0x0000000c, +0x00000066,0x00000062,0x00000063,0x00000064, +0x00000065,0x0007002c,0x00000035,0x00000067, +0x00000057,0x0000005c,0x00000061,0x00000066, +0x0004003b,0x00000009,0x00000068,0x00000000, +0x0004002b,0x00000006,0x0000006e,0x3db93fdf, +0x0004002b,0x00000006,0x0000006f,0xbc76dc6f, +0x0004002b,0x00000006,0x00000070,0x3eaa1a31, +0x0004002b,0x00000006,0x00000071,0x3d82d9fa, +0x0007002c,0x0000000c,0x00000072,0x0000006e, +0x0000006f,0x00000070,0x00000071,0x0004002b, +0x00000006,0x00000073,0x3f18fafc,0x0004002b, +0x00000006,0x00000074,0xbe7b16df,0x0004002b, +0x00000006,0x00000075,0xbefd4f97,0x0004002b, +0x00000006,0x00000076,0xbda065ce,0x0007002c, +0x0000000c,0x00000077,0x00000073,0x00000074, +0x00000075,0x00000076,0x0004002b,0x00000006, +0x00000078,0x3f13c293,0x0004002b,0x00000006, +0x00000079,0xbdb24f57,0x0004002b,0x00000006, +0x0000007a,0xbf658b51,0x0004002b,0x00000006, +0x0000007b,0xbe5b3c1e,0x0007002c,0x0000000c, +0x0000007c,0x00000078,0x00000079,0x0000007a, +0x0000007b,0x0004002b,0x00000006,0x0000007d, +0xbd4a491e,0x0004002b,0x00000006,0x0000007e, +0xbd1bfee3,0x0004002b,0x00000006,0x0000007f, +0xbe09c2bf,0x0004002b,0x00000006,0x00000080, +0xbc986c3e,0x0007002c,0x0000000c,0x00000081, +0x0000007d,0x0000007e,0x0000007f,0x00000080, +0x0007002c,0x00000035,0x00000082,0x00000072, +0x00000077,0x0000007c,0x00000081,0x0004002b, +0x00000006,0x00000083,0x00000000,0x0004002b, +0x00000006,0x0000008a,0xbe81387e,0x0004002b, +0x00000006,0x0000008b,0x3e0e0955,0x0004002b, +0x00000006,0x0000008c,0x3f49b066,0x0004002b, +0x00000006,0x0000008d,0xbe669110,0x0007002c, +0x0000000c,0x0000008e,0x0000008a,0x0000008b, +0x0000008c,0x0000008d,0x0004002b,0x00000006, +0x0000008f,0x3e6935b6,0x0004002b,0x00000006, +0x00000090,0x3f0ab13c,0x0004002b,0x00000006, +0x00000091,0x3db177b4,0x0004002b,0x00000006, +0x00000092,0xbe2ee05d,0x0007002c,0x0000000c, +0x00000093,0x0000008f,0x00000090,0x00000091, +0x00000092,0x0004002b,0x00000006,0x00000094, +0xbd750aba,0x0004002b,0x00000006,0x00000095, +0xbef184be,0x0004002b,0x00000006,0x00000096, +0xbf9cb552,0x0004002b,0x00000006,0x00000097, +0x3d3a38c8,0x0007002c,0x0000000c,0x00000098, +0x00000094,0x00000095,0x00000096,0x00000097, +0x0004002b,0x00000006,0x00000099,0xbeb36053, +0x0004002b,0x00000006,0x0000009a,0x3d6abc67, +0x0004002b,0x00000006,0x0000009b,0x3e818bd1, +0x0004002b,0x00000006,0x0000009c,0xbca9ce69, +0x0007002c,0x0000000c,0x0000009d,0x00000099, +0x0000009a,0x0000009b,0x0000009c,0x0007002c, +0x00000035,0x0000009e,0x0000008e,0x00000093, +0x00000098,0x0000009d,0x0004002b,0x00000006, +0x000000a4,0x3c89efed,0x0004002b,0x00000006, +0x000000a5,0xbe5b62be,0x0004002b,0x00000006, +0x000000a6,0xbcaa4e51,0x0004002b,0x00000006, +0x000000a7,0x3eb9c7eb,0x0007002c,0x0000000c, +0x000000a8,0x000000a4,0x000000a5,0x000000a6, +0x000000a7,0x0004002b,0x00000006,0x000000a9, +0x3e78f51c,0x0004002b,0x00000006,0x000000aa, +0x3e9ea254,0x0004002b,0x00000006,0x000000ab, +0x3ed08c53,0x0004002b,0x00000006,0x000000ac, +0xbe8d6b6f,0x0007002c,0x0000000c,0x000000ad, +0x000000a9,0x000000aa,0x000000ab,0x000000ac, +0x0004002b,0x00000006,0x000000ae,0xbca191ec, +0x0004002b,0x00000006,0x000000af,0x3e05b16c, +0x0004002b,0x00000006,0x000000b0,0xbf11dda5, +0x0004002b,0x00000006,0x000000b1,0xbe986253, +0x0007002c,0x0000000c,0x000000b2,0x000000ae, +0x000000af,0x000000b0,0x000000b1,0x0004002b, +0x00000006,0x000000b3,0xbd61ddf0,0x0004002b, +0x00000006,0x000000b4,0x3e85d6b3,0x0004002b, +0x00000006,0x000000b5,0xbe106b41,0x0004002b, +0x00000006,0x000000b6,0xbe94ced9,0x0007002c, +0x0000000c,0x000000b7,0x000000b3,0x000000b4, +0x000000b5,0x000000b6,0x0007002c,0x00000035, +0x000000b8,0x000000a8,0x000000ad,0x000000b2, +0x000000b7,0x0004002b,0x00000006,0x000000c0, +0xbd4c1ae5,0x0004002b,0x00000006,0x000000c1, +0x3cb8348d,0x0004002b,0x00000006,0x000000c2, +0x3e47e718,0x0004002b,0x00000006,0x000000c3, +0xbcfef04d,0x0007002c,0x0000000c,0x000000c4, +0x000000c0,0x000000c1,0x000000c2,0x000000c3, +0x0004002b,0x00000006,0x000000c5,0x3e80167b, +0x0004002b,0x00000006,0x000000c6,0xbf16dead, +0x0004002b,0x00000006,0x000000c7,0xbf8a2996, +0x0004002b,0x00000006,0x000000c8,0x3c83cc23, +0x0007002c,0x0000000c,0x000000c9,0x000000c5, +0x000000c6,0x000000c7,0x000000c8,0x0004002b, +0x00000006,0x000000ca,0x3f0216e9,0x0004002b, +0x00000006,0x000000cb,0x3d45c2c2,0x0004002b, +0x00000006,0x000000cc,0x3d5fc9e8,0x0004002b, +0x00000006,0x000000cd,0xbd4d7159,0x0007002c, +0x0000000c,0x000000ce,0x000000ca,0x000000cb, +0x000000cc,0x000000cd,0x0004002b,0x00000006, +0x000000cf,0x3e0f69e1,0x0004002b,0x00000006, +0x000000d0,0xbc2f0ca1,0x0004002b,0x00000006, +0x000000d1,0xbdc0a213,0x0004002b,0x00000006, +0x000000d2,0xbe377c6f,0x0007002c,0x0000000c, +0x000000d3,0x000000cf,0x000000d0,0x000000d1, +0x000000d2,0x0007002c,0x00000035,0x000000d4, +0x000000c4,0x000000c9,0x000000ce,0x000000d3, +0x0004002b,0x00000006,0x000000da,0x3d21187d, +0x0004002b,0x00000006,0x000000db,0x3e64a0aa, +0x0004002b,0x00000006,0x000000dc,0xbdd813e4, +0x0004002b,0x00000006,0x000000dd,0xbe24a6a3, +0x0007002c,0x0000000c,0x000000de,0x000000da, +0x000000db,0x000000dc,0x000000dd,0x0004002b, +0x00000006,0x000000df,0xbe208b9e,0x0004002b, +0x00000006,0x000000e0,0xbb8a598d,0x0004002b, +0x00000006,0x000000e1,0xbd608de5,0x0004002b, +0x00000006,0x000000e2,0x3e70d9a6,0x0007002c, +0x0000000c,0x000000e3,0x000000df,0x000000e0, +0x000000e1,0x000000e2,0x0004002b,0x00000006, +0x000000e4,0x3e17e629,0x0004002b,0x00000006, +0x000000e5,0x3f40171d,0x0004002b,0x00000006, +0x000000e6,0x3da36020,0x0004002b,0x00000006, +0x000000e7,0xbba09154,0x0007002c,0x0000000c, +0x000000e8,0x000000e4,0x000000e5,0x000000e6, +0x000000e7,0x0004002b,0x00000006,0x000000e9, +0xbcc70d4f,0x0004002b,0x00000006,0x000000ea, +0xbcfce3b5,0x0004002b,0x00000006,0x000000eb, +0x3da9c38e,0x0004002b,0x00000006,0x000000ec, +0x3d66230b,0x0007002c,0x0000000c,0x000000ed, +0x000000e9,0x000000ea,0x000000eb,0x000000ec, +0x0007002c,0x00000035,0x000000ee,0x000000de, +0x000000e3,0x000000e8,0x000000ed,0x0004002b, +0x00000006,0x000000f5,0x3dbdb9a9,0x0004002b, +0x00000006,0x000000f6,0xbd2b81d0,0x0004002b, +0x00000006,0x000000f7,0xbe9cb165,0x0004002b, +0x00000006,0x000000f8,0xbe40e11d,0x0007002c, +0x0000000c,0x000000f9,0x000000f5,0x000000f6, +0x000000f7,0x000000f8,0x0004002b,0x00000006, +0x000000fa,0x3ce8e47a,0x0004002b,0x00000006, +0x000000fb,0xbeb78b67,0x0004002b,0x00000006, +0x000000fc,0xbf4a7edd,0x0004002b,0x00000006, +0x000000fd,0xbc99779e,0x0007002c,0x0000000c, +0x000000fe,0x000000fa,0x000000fb,0x000000fc, +0x000000fd,0x0004002b,0x00000006,0x000000ff, +0xbe7fb12e,0x0004002b,0x00000006,0x00000100, +0xbf40898a,0x0004002b,0x00000006,0x00000101, +0x3ec11a1e,0x0004002b,0x00000006,0x00000102, +0xbcd43789,0x0007002c,0x0000000c,0x00000103, +0x000000ff,0x00000100,0x00000101,0x00000102, +0x0004002b,0x00000006,0x00000104,0x3d0a71ad, +0x0004002b,0x00000006,0x00000105,0x3e62379f, +0x0004002b,0x00000006,0x00000106,0x3d91280a, +0x0004002b,0x00000006,0x00000107,0xbe90194f, +0x0007002c,0x0000000c,0x00000108,0x00000104, +0x00000105,0x00000106,0x00000107,0x0007002c, +0x00000035,0x00000109,0x000000f9,0x000000fe, +0x00000103,0x00000108,0x0004002b,0x00000006, +0x0000010f,0xbf075e30,0x0004002b,0x00000006, +0x00000110,0x3f13e798,0x0004002b,0x00000006, +0x00000111,0x3db45395,0x0004002b,0x00000006, +0x00000112,0xbf58621f,0x0007002c,0x0000000c, +0x00000113,0x0000010f,0x00000110,0x00000111, +0x00000112,0x0004002b,0x00000006,0x00000114, +0xbeadbe17,0x0004002b,0x00000006,0x00000115, +0xbe68cf93,0x0004002b,0x00000006,0x00000116, +0xbe04f81e,0x0004002b,0x00000006,0x00000117, +0x3eff80f9,0x0007002c,0x0000000c,0x00000118, +0x00000114,0x00000115,0x00000116,0x00000117, +0x0004002b,0x00000006,0x00000119,0x3fa1731a, +0x0004002b,0x00000006,0x0000011a,0xbf438002, +0x0004002b,0x00000006,0x0000011b,0x3fc8e2b6, +0x0004002b,0x00000006,0x0000011c,0xbed145e5, +0x0007002c,0x0000000c,0x0000011d,0x00000119, +0x0000011a,0x0000011b,0x0000011c,0x0004002b, +0x00000006,0x0000011e,0x3db31aa9,0x0004002b, +0x00000006,0x0000011f,0x3f34eb55,0x0004002b, +0x00000006,0x00000120,0xbeaf153c,0x0004002b, +0x00000006,0x00000121,0xbea731fb,0x0007002c, +0x0000000c,0x00000122,0x0000011e,0x0000011f, +0x00000120,0x00000121,0x0007002c,0x00000035, +0x00000123,0x00000113,0x00000118,0x0000011d, +0x00000122,0x0004002b,0x00000006,0x0000012a, +0x3f52afd9,0x0004002b,0x00000006,0x0000012b, +0xbdfd2d51,0x0004002b,0x00000006,0x0000012c, +0xbe3e6334,0x0004002b,0x00000006,0x0000012d, +0x3fd590e3,0x0007002c,0x0000000c,0x0000012e, +0x0000012a,0x0000012b,0x0000012c,0x0000012d, +0x0004002b,0x00000006,0x0000012f,0x3e4ce130, +0x0004002b,0x00000006,0x00000130,0xbdfdc436, +0x0004002b,0x00000006,0x00000131,0x3fc7fae2, +0x0004002b,0x00000006,0x00000132,0x3e364533, +0x0007002c,0x0000000c,0x00000133,0x0000012f, +0x00000130,0x00000131,0x00000132,0x0004002b, +0x00000006,0x00000134,0x3dd0767b,0x0004002b, +0x00000006,0x00000135,0xbebdd1b1,0x0004002b, +0x00000006,0x00000136,0x3f880580,0x0004002b, +0x00000006,0x00000137,0xbe9ff347,0x0007002c, +0x0000000c,0x00000138,0x00000134,0x00000135, +0x00000136,0x00000137,0x0004002b,0x00000006, +0x00000139,0x3d86f9a6,0x0004002b,0x00000006, +0x0000013a,0xbeb79367,0x0004002b,0x00000006, +0x0000013b,0xbe3f1ea1,0x0004002b,0x00000006, +0x0000013c,0x3f2c604f,0x0007002c,0x0000000c, +0x0000013d,0x00000139,0x0000013a,0x0000013b, +0x0000013c,0x0007002c,0x00000035,0x0000013e, +0x0000012e,0x00000133,0x00000138,0x0000013d, +0x0004002b,0x00000006,0x00000144,0xbf0dedeb, +0x0004002b,0x00000006,0x00000145,0xbe41d613, +0x0004002b,0x00000006,0x00000146,0x3e7bfad1, +0x0004002b,0x00000006,0x00000147,0xbdd84efb, +0x0007002c,0x0000000c,0x00000148,0x00000144, +0x00000145,0x00000146,0x00000147,0x0004002b, +0x00000006,0x00000149,0xbedd15f9,0x0004002b, +0x00000006,0x0000014a,0x3e00cfe8,0x0004002b, +0x00000006,0x0000014b,0xbe88d83d,0x0004002b, +0x00000006,0x0000014c,0xbe2d1482,0x0007002c, +0x0000000c,0x0000014d,0x00000149,0x0000014a, +0x0000014b,0x0000014c,0x0004002b,0x00000006, +0x0000014e,0x3aeed6e1,0x0004002b,0x00000006, +0x0000014f,0xbee1278b,0x0004002b,0x00000006, +0x00000150,0xbe99ffdc,0x0004002b,0x00000006, +0x00000151,0x3ddad2b9,0x0007002c,0x0000000c, +0x00000152,0x0000014e,0x0000014f,0x00000150, +0x00000151,0x0004002b,0x00000006,0x00000153, +0x3eb38a71,0x0004002b,0x00000006,0x00000154, +0x3dea41de,0x0004002b,0x00000006,0x00000155, +0x3e0ba87e,0x0004002b,0x00000006,0x00000156, +0xbe1123d3,0x0007002c,0x0000000c,0x00000157, +0x00000153,0x00000154,0x00000155,0x00000156, +0x0007002c,0x00000035,0x00000158,0x00000148, +0x0000014d,0x00000152,0x00000157,0x0004002b, +0x00000006,0x0000015f,0xbd4f1f36,0x0004002b, +0x00000006,0x00000160,0x3e3b8ac1,0x0004002b, +0x00000006,0x00000161,0x3eca9db2,0x0004002b, +0x00000006,0x00000162,0xbe6b0ce6,0x0007002c, +0x0000000c,0x00000163,0x0000015f,0x00000160, +0x00000161,0x00000162,0x0004002b,0x00000006, +0x00000164,0xbec74fc1,0x0004002b,0x00000006, +0x00000165,0x3f0b2f9b,0x0004002b,0x00000006, +0x00000166,0x3df96643,0x0004002b,0x00000006, +0x00000167,0x3cb6ec86,0x0007002c,0x0000000c, +0x00000168,0x00000164,0x00000165,0x00000166, +0x00000167,0x0004002b,0x00000006,0x00000169, +0xbee47fae,0x0004002b,0x00000006,0x0000016a, +0xbecfaa92,0x0004002b,0x00000006,0x0000016b, +0xbec116ea,0x0004002b,0x00000006,0x0000016c, +0x3da549a0,0x0007002c,0x0000000c,0x0000016d, +0x00000169,0x0000016a,0x0000016b,0x0000016c, +0x0004002b,0x00000006,0x0000016e,0x3e58c0cc, +0x0004002b,0x00000006,0x0000016f,0x3ce63786, +0x0004002b,0x00000006,0x00000170,0xbcbbd076, +0x0004002b,0x00000006,0x00000171,0x3e92df62, +0x0007002c,0x0000000c,0x00000172,0x0000016e, +0x0000016f,0x00000170,0x00000171,0x0007002c, +0x00000035,0x00000173,0x00000163,0x00000168, +0x0000016d,0x00000172,0x0004002b,0x00000006, +0x00000179,0x3e48fb52,0x0004002b,0x00000006, +0x0000017a,0xbe73078d,0x0004002b,0x00000006, +0x0000017b,0xc0215581,0x0004002b,0x00000006, +0x0000017c,0xbe4ba064,0x0007002c,0x0000000c, +0x0000017d,0x00000179,0x0000017a,0x0000017b, +0x0000017c,0x0004002b,0x00000006,0x0000017e, +0x3e63cb9f,0x0004002b,0x00000006,0x0000017f, +0xbe369955,0x0004002b,0x00000006,0x00000180, +0xbecadef0,0x0004002b,0x00000006,0x00000181, +0xbe2ca4f7,0x0007002c,0x0000000c,0x00000182, +0x0000017e,0x0000017f,0x00000180,0x00000181, +0x0004002b,0x00000006,0x00000183,0x3e439fbc, +0x0004002b,0x00000006,0x00000184,0x3e82c8eb, +0x0004002b,0x00000006,0x00000185,0x3eead314, +0x0004002b,0x00000006,0x00000186,0x3e8e4a9d, +0x0007002c,0x0000000c,0x00000187,0x00000183, +0x00000184,0x00000185,0x00000186,0x0004002b, +0x00000006,0x00000188,0xbe4d0d21,0x0004002b, +0x00000006,0x00000189,0xbbc82f90,0x0004002b, +0x00000006,0x0000018a,0x3fb0be7c,0x0004002b, +0x00000006,0x0000018b,0x3d32235c,0x0007002c, +0x0000000c,0x0000018c,0x00000188,0x00000189, +0x0000018a,0x0000018b,0x0007002c,0x00000035, +0x0000018d,0x0000017d,0x00000182,0x00000187, +0x0000018c,0x0004002b,0x00000006,0x00000194, +0xbcfbfebe,0x0004002b,0x00000006,0x00000195, +0xbd56d2b9,0x0004002b,0x00000006,0x00000196, +0xbf16f9f0,0x0004002b,0x00000006,0x00000197, +0xbda74149,0x0007002c,0x0000000c,0x00000198, +0x00000194,0x00000195,0x00000196,0x00000197, +0x0004002b,0x00000006,0x00000199,0x3ecf8243, +0x0004002b,0x00000006,0x0000019a,0x3e822944, +0x0004002b,0x00000006,0x0000019b,0xbff3b98f, +0x0004002b,0x00000006,0x0000019c,0x3dab1a4a, +0x0007002c,0x0000000c,0x0000019d,0x00000199, +0x0000019a,0x0000019b,0x0000019c,0x0004002b, +0x00000006,0x0000019e,0xbe7e68a5,0x0004002b, +0x00000006,0x0000019f,0xbc9756a2,0x0004002b, +0x00000006,0x000001a0,0x3ee6eac3,0x0004002b, +0x00000006,0x000001a1,0x3e847c72,0x0007002c, +0x0000000c,0x000001a2,0x0000019e,0x0000019f, +0x000001a0,0x000001a1,0x0004002b,0x00000006, +0x000001a3,0x3e1d65be,0x0004002b,0x00000006, +0x000001a4,0x3e19ebb0,0x0004002b,0x00000006, +0x000001a5,0xbd9827f4,0x0004002b,0x00000006, +0x000001a6,0x3d7b2c5c,0x0007002c,0x0000000c, +0x000001a7,0x000001a3,0x000001a4,0x000001a5, +0x000001a6,0x0007002c,0x00000035,0x000001a8, +0x00000198,0x0000019d,0x000001a2,0x000001a7, +0x0004002b,0x00000006,0x000001ae,0x3e3584a6, +0x0004002b,0x00000006,0x000001af,0x3dc25477, +0x0004002b,0x00000006,0x000001b0,0x3c0960a1, +0x0004002b,0x00000006,0x000001b1,0xbe957d84, +0x0007002c,0x0000000c,0x000001b2,0x000001ae, +0x000001af,0x000001b0,0x000001b1,0x0004002b, +0x00000006,0x000001b3,0x3e836d88,0x0004002b, +0x00000006,0x000001b4,0x3cec8b81,0x0004002b, +0x00000006,0x000001b5,0xbeeccb04,0x0004002b, +0x00000006,0x000001b6,0xbd795bf0,0x0007002c, +0x0000000c,0x000001b7,0x000001b3,0x000001b4, +0x000001b5,0x000001b6,0x0004002b,0x00000006, +0x000001b8,0x3ea985e5,0x0004002b,0x00000006, +0x000001b9,0xbc2adc0c,0x0004002b,0x00000006, +0x000001ba,0x3f222bdd,0x0004002b,0x00000006, +0x000001bb,0xbb3244cd,0x0007002c,0x0000000c, +0x000001bc,0x000001b8,0x000001b9,0x000001ba, +0x000001bb,0x0004002b,0x00000006,0x000001bd, +0xbd0c3a10,0x0004002b,0x00000006,0x000001be, +0x3e4688a3,0x0004002b,0x00000006,0x000001bf, +0xbe7c5830,0x0004002b,0x00000006,0x000001c0, +0x3c4e3f67,0x0007002c,0x0000000c,0x000001c1, +0x000001bd,0x000001be,0x000001bf,0x000001c0, +0x0007002c,0x00000035,0x000001c2,0x000001b2, +0x000001b7,0x000001bc,0x000001c1,0x0004002b, +0x00000006,0x000001c9,0x3ef7c76c,0x0004002b, +0x00000006,0x000001ca,0xbd4daf44,0x0004002b, +0x00000006,0x000001cb,0xbf8e42e4,0x0004002b, +0x00000006,0x000001cc,0xbecb0c01,0x0007002c, +0x0000000c,0x000001cd,0x000001c9,0x000001ca, +0x000001cb,0x000001cc,0x0004002b,0x00000006, +0x000001ce,0x3e58cf63,0x0004002b,0x00000006, +0x000001cf,0x3d29c587,0x0004002b,0x00000006, +0x000001d0,0xbe086ffd,0x0004002b,0x00000006, +0x000001d1,0xbd613b7e,0x0007002c,0x0000000c, +0x000001d2,0x000001ce,0x000001cf,0x000001d0, +0x000001d1,0x0004002b,0x00000006,0x000001d3, +0xbe028f8d,0x0004002b,0x00000006,0x000001d4, +0x3f48d06c,0x0004002b,0x00000006,0x000001d5, +0xbc1bea72,0x0004002b,0x00000006,0x000001d6, +0x3dc4d23e,0x0007002c,0x0000000c,0x000001d7, +0x000001d3,0x000001d4,0x000001d5,0x000001d6, +0x0004002b,0x00000006,0x000001d8,0xbef3aaef, +0x0004002b,0x00000006,0x000001d9,0xbedb5793, +0x0004002b,0x00000006,0x000001da,0xbe5436b5, +0x0004002b,0x00000006,0x000001db,0xbeca6c5c, +0x0007002c,0x0000000c,0x000001dc,0x000001d8, +0x000001d9,0x000001da,0x000001db,0x0007002c, +0x00000035,0x000001dd,0x000001cd,0x000001d2, +0x000001d7,0x000001dc,0x0004002b,0x00000006, +0x000001e3,0x3e2470e8,0x0004002b,0x00000006, +0x000001e4,0xbe2fb515,0x0004002b,0x00000006, +0x000001e5,0x3db14773,0x0004002b,0x00000006, +0x000001e6,0xbd3e37ed,0x0007002c,0x0000000c, +0x000001e7,0x000001e3,0x000001e4,0x000001e5, +0x000001e6,0x0004002b,0x00000006,0x000001e8, +0xbe89a759,0x0004002b,0x00000006,0x000001e9, +0x3e3062af,0x0004002b,0x00000006,0x000001ea, +0x3c894eda,0x0004002b,0x00000006,0x000001eb, +0xbb583ace,0x0007002c,0x0000000c,0x000001ec, +0x000001e8,0x000001e9,0x000001ea,0x000001eb, +0x0004002b,0x00000006,0x000001ed,0xbeb0b188, +0x0004002b,0x00000006,0x000001ee,0xbe6980b3, +0x0004002b,0x00000006,0x000001ef,0xbb434653, +0x0004002b,0x00000006,0x000001f0,0xbe239980, +0x0007002c,0x0000000c,0x000001f1,0x000001ed, +0x000001ee,0x000001ef,0x000001f0,0x0004002b, +0x00000006,0x000001f2,0x3d4cdb41,0x0004002b, +0x00000006,0x000001f3,0x3dd18666,0x0004002b, +0x00000006,0x000001f4,0xbd26b801,0x0004002b, +0x00000006,0x000001f5,0x3e643611,0x0007002c, +0x0000000c,0x000001f6,0x000001f2,0x000001f3, +0x000001f4,0x000001f5,0x0007002c,0x00000035, +0x000001f7,0x000001e7,0x000001ec,0x000001f1, +0x000001f6,0x0004002b,0x00000006,0x000001fe, +0x3f3332ad,0x0004002b,0x00000006,0x000001ff, +0x3dabeaef,0x0004002b,0x00000006,0x00000200, +0x3da70217,0x0004002b,0x00000006,0x00000201, +0xbe1a8a25,0x0007002c,0x0000000c,0x00000202, +0x000001fe,0x000001ff,0x00000200,0x00000201, +0x0004002b,0x00000006,0x00000203,0xbd8d7c99, +0x0004002b,0x00000006,0x00000204,0xbea3e276, +0x0004002b,0x00000006,0x00000205,0x3d9fc6ff, +0x0004002b,0x00000006,0x00000206,0xbe147170, +0x0007002c,0x0000000c,0x00000207,0x00000203, +0x00000204,0x00000205,0x00000206,0x0004002b, +0x00000006,0x00000208,0x3e92e222,0x0004002b, +0x00000006,0x00000209,0x3ecae0a0,0x0004002b, +0x00000006,0x0000020a,0xbeb01526,0x0004002b, +0x00000006,0x0000020b,0x3e880f63,0x0007002c, +0x0000000c,0x0000020c,0x00000208,0x00000209, +0x0000020a,0x0000020b,0x0004002b,0x00000006, +0x0000020d,0x3dca5ee2,0x0004002b,0x00000006, +0x0000020e,0x3eb1bb03,0x0004002b,0x00000006, +0x0000020f,0xbe5fe33c,0x0004002b,0x00000006, +0x00000210,0xbd84b6c2,0x0007002c,0x0000000c, +0x00000211,0x0000020d,0x0000020e,0x0000020f, +0x00000210,0x0007002c,0x00000035,0x00000212, +0x00000202,0x00000207,0x0000020c,0x00000211, +0x0007002c,0x0000000c,0x00000219,0x00000083, +0x00000083,0x00000083,0x00000083,0x0004002b, +0x00000006,0x0000021b,0x3f83fb46,0x0004002b, +0x00000006,0x0000021c,0x3dd7499f,0x0004002b, +0x00000006,0x0000021d,0x3ded5072,0x0004002b, +0x00000006,0x0000021e,0x3d3f223c,0x0007002c, +0x0000000c,0x0000021f,0x0000021b,0x0000021c, +0x0000021d,0x0000021e,0x00040015,0x00000227, +0x00000020,0x00000000,0x00040017,0x00000228, +0x00000227,0x00000003,0x00040020,0x00000229, +0x00000001,0x00000228,0x0004003b,0x00000229, +0x0000022a,0x00000001,0x00040017,0x0000022b, +0x00000227,0x00000002,0x00020014,0x0000022f, +0x0004002b,0x00000227,0x00000230,0x00000000, +0x00040020,0x00000234,0x00000009,0x00000016, +0x0004002b,0x00000227,0x0000023b,0x00000001, +0x00090019,0x00000245,0x00000006,0x00000001, +0x00000000,0x00000000,0x00000000,0x00000002, +0x00000002,0x00040020,0x00000246,0x00000000, +0x00000245,0x0004003b,0x00000246,0x00000247, +0x00000000,0x0004002b,0x00000227,0x0000024b, +0x00000010,0x0006002c,0x00000228,0x0000024c, +0x0000024b,0x0000024b,0x0000023b,0x0004002b, +0x00000016,0x000003b8,0xffffffff,0x0005002c, +0x00000017,0x000003b9,0x000003b8,0x000003b8, +0x0005002c,0x00000017,0x000003ba,0x00000026, +0x00000026,0x0005002c,0x00000017,0x000003bb, +0x000003b8,0x0000001e,0x0005002c,0x00000017, +0x000003bc,0x000003b8,0x00000026,0x0005002c, +0x00000017,0x000003bd,0x0000001e,0x000003b8, +0x0005002c,0x00000017,0x000003be,0x0000001e, +0x00000026,0x0005002c,0x00000017,0x000003bf, +0x00000026,0x000003b8,0x0005002c,0x00000017, +0x000003c0,0x00000026,0x0000001e,0x00050036, +0x00000002,0x00000004,0x00000000,0x00000003, +0x000200f8,0x00000005,0x000300f7,0x0000024e, +0x00000000,0x000300fb,0x00000230,0x0000024f, +0x000200f8,0x0000024f,0x0004003d,0x00000228, +0x0000022c,0x0000022a,0x0007004f,0x0000022b, +0x0000022d,0x0000022c,0x0000022c,0x00000000, +0x00000001,0x0004007c,0x00000017,0x0000022e, +0x0000022d,0x00050051,0x00000016,0x00000233, +0x0000022e,0x00000000,0x00060041,0x00000234, +0x00000235,0x00000022,0x0000001e,0x00000230, +0x0004003d,0x00000016,0x00000236,0x00000235, +0x000500af,0x0000022f,0x00000237,0x00000233, +0x00000236,0x000400a8,0x0000022f,0x00000238, +0x00000237,0x000300f7,0x0000023a,0x00000000, +0x000400fa,0x00000238,0x00000239,0x0000023a, +0x000200f8,0x00000239,0x00050051,0x00000016, +0x0000023d,0x0000022e,0x00000001,0x00060041, +0x00000234,0x0000023e,0x00000022,0x0000001e, +0x0000023b,0x0004003d,0x00000016,0x0000023f, +0x0000023e,0x000500af,0x0000022f,0x00000240, +0x0000023d,0x0000023f,0x000200f9,0x0000023a, +0x000200f8,0x0000023a,0x000700f5,0x0000022f, +0x00000241,0x00000237,0x0000024f,0x00000240, +0x00000239,0x000300f7,0x00000243,0x00000000, +0x000400fa,0x00000241,0x00000242,0x00000243, +0x000200f8,0x00000242,0x000200f9,0x0000024e, +0x000200f8,0x00000243,0x0004003d,0x00000245, +0x00000248,0x00000247,0x0004003d,0x00000008, +0x000002ba,0x0000004b,0x00050080,0x00000017, +0x000002be,0x0000022e,0x000003b9,0x00050041, +0x00000023,0x000002bf,0x00000022,0x0000001e, +0x0004003d,0x00000017,0x000002c0,0x000002bf, +0x00050082,0x00000017,0x000002c2,0x000002c0, +0x000003ba,0x0008000c,0x00000017,0x000002c3, +0x00000001,0x0000002d,0x000002be,0x0000001f, +0x000002c2,0x00040064,0x00000007,0x000002c4, +0x000002ba,0x0007005f,0x0000000c,0x000002c5, +0x000002c4,0x000002c3,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x0000026a,0x0000004a, +0x000002c5,0x00050081,0x0000000c,0x0000026c, +0x00000034,0x0000026a,0x0004003d,0x00000008, +0x000002c8,0x00000068,0x00040064,0x00000007, +0x000002d2,0x000002c8,0x0007005f,0x0000000c, +0x000002d3,0x000002d2,0x000002c3,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x0000026e, +0x00000067,0x000002d3,0x00050081,0x0000000c, +0x00000270,0x0000026c,0x0000026e,0x0004003d, +0x00000008,0x000002d6,0x0000004b,0x00050080, +0x00000017,0x000002da,0x0000022e,0x000003bb, +0x0008000c,0x00000017,0x000002df,0x00000001, +0x0000002d,0x000002da,0x0000001f,0x000002c2, +0x00040064,0x00000007,0x000002e0,0x000002d6, +0x0007005f,0x0000000c,0x000002e1,0x000002e0, +0x000002df,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x00000272,0x00000082,0x000002e1, +0x00050081,0x0000000c,0x00000274,0x00000270, +0x00000272,0x0004003d,0x00000008,0x000002e4, +0x00000068,0x00040064,0x00000007,0x000002ee, +0x000002e4,0x0007005f,0x0000000c,0x000002ef, +0x000002ee,0x000002df,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x00000276,0x0000009e, +0x000002ef,0x00050081,0x0000000c,0x00000278, +0x00000274,0x00000276,0x0004003d,0x00000008, +0x000002f2,0x0000004b,0x00050080,0x00000017, +0x000002f6,0x0000022e,0x000003bc,0x0008000c, +0x00000017,0x000002fb,0x00000001,0x0000002d, +0x000002f6,0x0000001f,0x000002c2,0x00040064, +0x00000007,0x000002fc,0x000002f2,0x0007005f, +0x0000000c,0x000002fd,0x000002fc,0x000002fb, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x0000027a,0x000000b8,0x000002fd,0x00050081, +0x0000000c,0x0000027c,0x00000278,0x0000027a, +0x0004003d,0x00000008,0x00000300,0x00000068, +0x00040064,0x00000007,0x0000030a,0x00000300, +0x0007005f,0x0000000c,0x0000030b,0x0000030a, +0x000002fb,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x0000027e,0x000000d4,0x0000030b, +0x00050081,0x0000000c,0x00000280,0x0000027c, +0x0000027e,0x0004003d,0x00000008,0x0000030e, +0x0000004b,0x00050080,0x00000017,0x00000312, +0x0000022e,0x000003bd,0x0008000c,0x00000017, +0x00000317,0x00000001,0x0000002d,0x00000312, +0x0000001f,0x000002c2,0x00040064,0x00000007, +0x00000318,0x0000030e,0x0007005f,0x0000000c, +0x00000319,0x00000318,0x00000317,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x00000282, +0x000000ee,0x00000319,0x00050081,0x0000000c, +0x00000284,0x00000280,0x00000282,0x0004003d, +0x00000008,0x0000031c,0x00000068,0x00040064, +0x00000007,0x00000326,0x0000031c,0x0007005f, +0x0000000c,0x00000327,0x00000326,0x00000317, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x00000286,0x00000109,0x00000327,0x00050081, +0x0000000c,0x00000288,0x00000284,0x00000286, +0x0004003d,0x00000008,0x0000032a,0x0000004b, +0x0008000c,0x00000017,0x00000333,0x00000001, +0x0000002d,0x0000022e,0x0000001f,0x000002c2, +0x00040064,0x00000007,0x00000334,0x0000032a, +0x0007005f,0x0000000c,0x00000335,0x00000334, +0x00000333,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x0000028a,0x00000123,0x00000335, +0x00050081,0x0000000c,0x0000028c,0x00000288, +0x0000028a,0x0004003d,0x00000008,0x00000338, +0x00000068,0x00040064,0x00000007,0x00000342, +0x00000338,0x0007005f,0x0000000c,0x00000343, +0x00000342,0x00000333,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x0000028e,0x0000013e, +0x00000343,0x00050081,0x0000000c,0x00000290, +0x0000028c,0x0000028e,0x0004003d,0x00000008, +0x00000346,0x0000004b,0x00050080,0x00000017, +0x0000034a,0x0000022e,0x000003be,0x0008000c, +0x00000017,0x0000034f,0x00000001,0x0000002d, +0x0000034a,0x0000001f,0x000002c2,0x00040064, +0x00000007,0x00000350,0x00000346,0x0007005f, +0x0000000c,0x00000351,0x00000350,0x0000034f, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x00000292,0x00000158,0x00000351,0x00050081, +0x0000000c,0x00000294,0x00000290,0x00000292, +0x0004003d,0x00000008,0x00000354,0x00000068, +0x00040064,0x00000007,0x0000035e,0x00000354, +0x0007005f,0x0000000c,0x0000035f,0x0000035e, +0x0000034f,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x00000296,0x00000173,0x0000035f, +0x00050081,0x0000000c,0x00000298,0x00000294, +0x00000296,0x0004003d,0x00000008,0x00000362, +0x0000004b,0x00050080,0x00000017,0x00000366, +0x0000022e,0x000003bf,0x0008000c,0x00000017, +0x0000036b,0x00000001,0x0000002d,0x00000366, +0x0000001f,0x000002c2,0x00040064,0x00000007, +0x0000036c,0x00000362,0x0007005f,0x0000000c, +0x0000036d,0x0000036c,0x0000036b,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x0000029a, +0x0000018d,0x0000036d,0x00050081,0x0000000c, +0x0000029c,0x00000298,0x0000029a,0x0004003d, +0x00000008,0x00000370,0x00000068,0x00040064, +0x00000007,0x0000037a,0x00000370,0x0007005f, +0x0000000c,0x0000037b,0x0000037a,0x0000036b, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x0000029e,0x000001a8,0x0000037b,0x00050081, +0x0000000c,0x000002a0,0x0000029c,0x0000029e, +0x0004003d,0x00000008,0x0000037e,0x0000004b, +0x00050080,0x00000017,0x00000382,0x0000022e, +0x000003c0,0x0008000c,0x00000017,0x00000387, +0x00000001,0x0000002d,0x00000382,0x0000001f, +0x000002c2,0x00040064,0x00000007,0x00000388, +0x0000037e,0x0007005f,0x0000000c,0x00000389, +0x00000388,0x00000387,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x000002a2,0x000001c2, +0x00000389,0x00050081,0x0000000c,0x000002a4, +0x000002a0,0x000002a2,0x0004003d,0x00000008, +0x0000038c,0x00000068,0x00040064,0x00000007, +0x00000396,0x0000038c,0x0007005f,0x0000000c, +0x00000397,0x00000396,0x00000387,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x000002a6, +0x000001dd,0x00000397,0x00050081,0x0000000c, +0x000002a8,0x000002a4,0x000002a6,0x0004003d, +0x00000008,0x0000039a,0x0000004b,0x00050080, +0x00000017,0x0000039e,0x0000022e,0x000003ba, +0x0008000c,0x00000017,0x000003a3,0x00000001, +0x0000002d,0x0000039e,0x0000001f,0x000002c2, +0x00040064,0x00000007,0x000003a4,0x0000039a, +0x0007005f,0x0000000c,0x000003a5,0x000003a4, +0x000003a3,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x000002aa,0x000001f7,0x000003a5, +0x00050081,0x0000000c,0x000002ac,0x000002a8, +0x000002aa,0x0004003d,0x00000008,0x000003a8, +0x00000068,0x00040064,0x00000007,0x000003b2, +0x000003a8,0x0007005f,0x0000000c,0x000003b3, +0x000003b2,0x000003a3,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x000002ae,0x00000212, +0x000003b3,0x00050081,0x0000000c,0x000002b0, +0x000002ac,0x000002ae,0x0007000c,0x0000000c, +0x000002b2,0x00000001,0x00000028,0x000002b0, +0x00000219,0x0007000c,0x0000000c,0x000002b4, +0x00000001,0x00000025,0x000002b0,0x00000219, +0x00050085,0x0000000c,0x000002b5,0x0000021f, +0x000002b4,0x00050081,0x0000000c,0x000002b6, +0x000002b2,0x000002b5,0x00040063,0x00000248, +0x0000022e,0x000002b6,0x000200f9,0x0000024e, +0x000200f8,0x0000024e,0x000100fd,0x00010038} diff --git a/app/src/shaders/fsrcnnx/pass_04.comp b/app/src/shaders/fsrcnnx/pass_04.comp new file mode 100644 index 0000000..067aa5a --- /dev/null +++ b/app/src/shaders/fsrcnnx/pass_04.comp @@ -0,0 +1,46 @@ +#version 450 +// Generated by tools/gen_fsrcnnx.js from third_party/FSRCNNX_x2_8-0-4-1.glsl +// (FSRCNNX by igv, LGPL-3.0). Layer: mapping 1_2. Do not edit. +layout(local_size_x = 16, local_size_y = 16) in; +layout(binding = 0, rgba16f) uniform writeonly image2D dst; +layout(binding = 1) uniform sampler2D in0; +layout(binding = 2) uniform sampler2D in1; +layout(binding = 3) uniform sampler2D in2; +layout(push_constant) uniform Params { ivec2 size; } p; + +ivec2 at_; +vec4 fetch_(sampler2D s, vec2 o) { return texelFetch(s, clamp(at_ + ivec2(o), ivec2(0), p.size - 1), 0); } +#define FEATURE1_texOff(o) fetch_(in0, vec2(o)) +#define FEATURE2_texOff(o) fetch_(in1, vec2(o)) + +vec4 hook() +{ +vec4 res = vec4(0.0713458731770515,-0.1403961777687073,-0.0019562745001167,0.0153338573873043); +res += mat4(-0.0950641855597496,-0.1496641039848328,-0.0653550028800964,0.0655386000871658,-0.0118882004171610,0.2012491524219513,-0.2844599783420563,-0.4794720113277435,0.1128025799989700,-0.0173030979931355,-0.0558849945664406,-0.2957552075386047,0.0128202112391591,0.0199047476053238,-0.0091027505695820,-0.0789640173316002) * FEATURE1_texOff(vec2(-1,-1)); +res += mat4(0.1597457975149155,-0.0476507246494293,0.1466529071331024,0.0859163030982018,0.0797316282987595,-0.3380981683731079,0.2370245009660721,-0.1145931258797646,-0.0352988094091415,-0.0444888733327389,-0.2100716233253479,0.1305520236492157,-0.1359029710292816,0.1097442805767059,0.0449938289821148,-0.1155664771795273) * FEATURE2_texOff(vec2(-1,-1)); +res += mat4(-0.0333916284143925,0.2415594160556793,0.0520512908697128,0.1228107511997223,-0.0491011217236519,0.4408806562423706,0.4631956815719604,0.2014560103416443,-0.3688595592975616,0.0367180295288563,0.2484581321477890,-0.1113442853093147,0.1283355057239532,0.0418004281818867,-0.0171243026852608,-0.1231943219900131) * FEATURE1_texOff(vec2(-1,0)); +res += mat4(0.3493446409702301,0.4550022482872009,0.0368724688887596,0.0748724937438965,0.5001406073570251,0.0145555436611176,0.1236629858613014,0.3143120706081390,-0.1951988488435745,-0.0157914645969868,0.0937998965382576,-0.2233840376138687,0.5033411383628845,-0.3183194100856781,-0.2259195148944855,0.3639536798000336) * FEATURE2_texOff(vec2(-1,0)); +res += mat4(-0.0742707476019859,-0.1287801116704941,-0.2533137500286102,0.0666435658931732,-0.0185621567070484,0.1427449285984039,-0.0724751204252243,-0.0781485065817833,-0.2270648330450058,-0.2314778864383698,0.3814929425716400,-0.1655400246381760,0.0408568829298019,-0.1139645278453827,0.1797397136688232,-0.0245632305741310) * FEATURE1_texOff(vec2(-1,1)); +res += mat4(0.1184135973453522,0.0439366139471531,0.0225226897746325,-0.0038526873104274,0.1292685419321060,0.0629177838563919,0.3455114960670471,-0.1857204884290695,-0.4921502172946930,-0.1171003505587578,0.0188624169677496,-0.1101682260632515,0.0676844567060471,0.5154085755348206,-0.0898379907011986,0.3413280248641968) * FEATURE2_texOff(vec2(-1,1)); +res += mat4(-0.2631838321685791,0.0215514600276947,0.3092688918113708,-0.0200904365628958,0.0678770467638969,0.1769931465387344,-0.3653681278228760,-0.3274513185024261,0.4608019888401031,-0.1544784456491470,0.1189439669251442,0.7015876173973083,0.2732816934585571,-0.0545057803392410,-0.3474545478820801,-0.0253226496279240) * FEATURE1_texOff(vec2(0,-1)); +res += mat4(0.0994316861033440,0.0642566010355949,0.2031503319740295,0.2276959568262100,-0.1094077304005623,0.4463521838188171,0.0921792611479759,-0.3033096492290497,-0.0953373983502388,-0.1331395804882050,0.2615413069725037,-0.2874414622783661,-0.0389687754213810,0.0338272154331207,0.2804331183433533,-0.3443813025951385) * FEATURE2_texOff(vec2(0,-1)); +res += mat4(-0.1806042939424515,-0.4840798676013947,0.4222546219825745,0.1238701492547989,0.0117481639608741,-0.5986865758895874,0.3057619929313660,0.1934896260499954,-0.7086342573165894,-0.8567376136779785,0.6944998502731323,-1.4599204063415527,0.0886754393577576,-0.4293498098850250,-0.1524195969104767,0.2418079674243927) * FEATURE1_texOff(vec2(0,0)); +res += mat4(2.1706113815307617,0.3525652289390564,-0.7008359432220459,-0.4825965166091919,-0.3203429281711578,0.8500943183898926,-0.7993509769439697,0.4329842329025269,0.2106771767139435,1.1103280782699585,1.2092385292053223,1.4814503192901611,-0.4147390127182007,-0.7046836614608765,-0.1443170011043549,-0.6811133027076721) * FEATURE2_texOff(vec2(0,0)); +res += mat4(-0.1489356607198715,0.1400019824504852,0.2425604313611984,-0.2098473459482193,-0.1580564379692078,0.1463224738836288,-0.2187854647636414,0.5174596905708313,-0.0143817225471139,-0.0362622961401939,-0.0068237944506109,0.4749472737312317,0.2914732992649078,-0.3306328952312469,-0.2444777786731720,-0.1171946674585342) * FEATURE1_texOff(vec2(0,1)); +res += mat4(0.0455239675939083,0.3496046066284180,0.1297491937875748,-0.2541095912456512,0.3605501055717468,0.2339573651552200,-0.0188565086573362,-0.0526181310415268,0.1471424549818039,0.8212822079658508,0.0819099843502045,-0.0851665437221527,0.3739568293094635,0.1304695755243301,0.1481167376041412,-0.2134698331356049) * FEATURE2_texOff(vec2(0,1)); +res += mat4(-0.2076720446348190,-0.0932599306106567,0.0648527294397354,-0.2374770641326904,-0.0927826911211014,0.1848200261592865,0.4131188094615936,0.3280069231987000,-0.2099185734987259,0.2130926996469498,-0.0362745784223080,0.0191331822425127,0.1590368449687958,0.0303016249090433,0.1207325309514999,0.2451425045728683) * FEATURE1_texOff(vec2(1,-1)); +res += mat4(-0.0135009605437517,-0.0101303057745099,0.0752487555146217,0.0533373840153217,-0.0253537259995937,0.1318614929914474,-0.1263181120157242,0.0249524712562561,-0.1477261483669281,0.3236559033393860,0.0773291289806366,-0.1439673304557800,-0.2005890905857086,0.0892757251858711,0.0398719944059849,0.3675192892551422) * FEATURE2_texOff(vec2(1,-1)); +res += mat4(-0.0193535499274731,-0.2256918102502823,0.0341436080634594,0.0795947611331940,0.1496857404708862,-0.2784725725650787,-0.0582313314080238,-0.2786065340042114,-0.1666128039360046,-0.6534121036529541,0.2695854306221008,-0.0179719906300306,0.0015976354479790,0.0139929885044694,-0.1706486046314240,-0.3274765610694885) * FEATURE1_texOff(vec2(1,0)); +res += mat4(-0.7170836329460144,0.0868831276893616,0.1829078495502472,-0.0076045366004109,0.1525912433862686,-0.2558896839618683,0.0893209800124168,-0.3426039516925812,-0.2871107757091522,-0.2445062994956970,0.1676304638385773,0.2116415053606033,0.0883995518088341,-0.3880331516265869,0.2636835277080536,-0.2514505982398987) * FEATURE2_texOff(vec2(1,0)); +res += mat4(-0.1861270815134048,0.2000686377286911,-0.1501186788082123,0.1525203883647919,0.1969228833913803,0.1174068301916122,-0.1281060427427292,-0.0854888409376144,0.0290613435208797,-0.0538076497614384,-0.0251582786440849,0.0692845508456230,0.0384319014847279,0.2888138592243195,0.1151804402470589,0.0990421250462532) * FEATURE1_texOff(vec2(1,1)); +res += mat4(-0.0344385802745819,0.1270371377468109,0.0922426953911781,-0.0426749102771282,-0.1656492203474045,-0.3273328542709351,-0.0282224025577307,0.1099396124482155,-0.1113230437040329,0.2943290174007416,-0.2181112915277481,-0.3177657723426819,-0.1096536740660667,-0.0508293099701405,-0.0256164856255054,-0.0388228967785835) * FEATURE2_texOff(vec2(1,1)); +res = max(res, vec4(0.0)) + vec4(0.7142407894134521,0.0686190053820610,0.3999933302402496,-1.0247212648391724) * min(res, vec4(0.0)); +return res; +} + +void main() +{ + at_ = ivec2(gl_GlobalInvocationID.xy); + if (at_.x >= p.size.x || at_.y >= p.size.y) return; + imageStore(dst, at_, hook()); +} diff --git a/app/src/shaders/fsrcnnx/pass_04.spv.inc b/app/src/shaders/fsrcnnx/pass_04.spv.inc new file mode 100644 index 0000000..a6899db --- /dev/null +++ b/app/src/shaders/fsrcnnx/pass_04.spv.inc @@ -0,0 +1,703 @@ +{0x07230203,0x00010000,0x000d000b,0x000003c1, +0x00000000,0x00020011,0x00000001,0x0006000b, +0x00000001,0x4c534c47,0x6474732e,0x3035342e, +0x00000000,0x0003000e,0x00000000,0x00000001, +0x0006000f,0x00000005,0x00000004,0x6e69616d, +0x00000000,0x0000022a,0x00060010,0x00000004, +0x00000011,0x00000010,0x00000010,0x00000001, +0x00030047,0x00000020,0x00000002,0x00050048, +0x00000020,0x00000000,0x00000023,0x00000000, +0x00040047,0x0000004b,0x00000021,0x00000001, +0x00040047,0x0000004b,0x00000022,0x00000000, +0x00040047,0x00000068,0x00000021,0x00000002, +0x00040047,0x00000068,0x00000022,0x00000000, +0x00040047,0x0000022a,0x0000000b,0x0000001c, +0x00030047,0x00000247,0x00000019,0x00040047, +0x00000247,0x00000021,0x00000000,0x00040047, +0x00000247,0x00000022,0x00000000,0x00040047, +0x0000024c,0x0000000b,0x00000019,0x00020013, +0x00000002,0x00030021,0x00000003,0x00000002, +0x00030016,0x00000006,0x00000020,0x00090019, +0x00000007,0x00000006,0x00000001,0x00000000, +0x00000000,0x00000000,0x00000001,0x00000000, +0x0003001b,0x00000008,0x00000007,0x00040020, +0x00000009,0x00000000,0x00000008,0x00040017, +0x0000000c,0x00000006,0x00000004,0x00040015, +0x00000016,0x00000020,0x00000001,0x00040017, +0x00000017,0x00000016,0x00000002,0x0004002b, +0x00000016,0x0000001e,0x00000000,0x0005002c, +0x00000017,0x0000001f,0x0000001e,0x0000001e, +0x0003001e,0x00000020,0x00000017,0x00040020, +0x00000021,0x00000009,0x00000020,0x0004003b, +0x00000021,0x00000022,0x00000009,0x00040020, +0x00000023,0x00000009,0x00000017,0x0004002b, +0x00000016,0x00000026,0x00000001,0x0004002b, +0x00000006,0x00000030,0x3d921dc9,0x0004002b, +0x00000006,0x00000031,0xbe0fc404,0x0004002b, +0x00000006,0x00000032,0xbb0034d7,0x0004002b, +0x00000006,0x00000033,0x3c7b3adc,0x0007002c, +0x0000000c,0x00000034,0x00000030,0x00000031, +0x00000032,0x00000033,0x00040018,0x00000035, +0x0000000c,0x00000004,0x0004002b,0x00000006, +0x00000036,0xbdc2b103,0x0004002b,0x00000006, +0x00000037,0xbe19418c,0x0004002b,0x00000006, +0x00000038,0xbd85d8d8,0x0004002b,0x00000006, +0x00000039,0x3d86391a,0x0007002c,0x0000000c, +0x0000003a,0x00000036,0x00000037,0x00000038, +0x00000039,0x0004002b,0x00000006,0x0000003b, +0xbc42c6ba,0x0004002b,0x00000006,0x0000003c, +0x3e4e1442,0x0004002b,0x00000006,0x0000003d, +0xbe91a4bd,0x0004002b,0x00000006,0x0000003e, +0xbef57d5b,0x0007002c,0x0000000c,0x0000003f, +0x0000003b,0x0000003c,0x0000003d,0x0000003e, +0x0004002b,0x00000006,0x00000040,0x3de7050a, +0x0004002b,0x00000006,0x00000041,0xbc8dbf3a, +0x0004002b,0x00000006,0x00000042,0xbd64e7aa, +0x0004002b,0x00000006,0x00000043,0xbe976d3a, +0x0007002c,0x0000000c,0x00000044,0x00000040, +0x00000041,0x00000042,0x00000043,0x0004002b, +0x00000006,0x00000045,0x3c520bdd,0x0004002b, +0x00000006,0x00000046,0x3ca30f48,0x0004002b, +0x00000006,0x00000047,0xbc1523b4,0x0004002b, +0x00000006,0x00000048,0xbda1b7e3,0x0007002c, +0x0000000c,0x00000049,0x00000045,0x00000046, +0x00000047,0x00000048,0x0007002c,0x00000035, +0x0000004a,0x0000003a,0x0000003f,0x00000044, +0x00000049,0x0004003b,0x00000009,0x0000004b, +0x00000000,0x0004002b,0x00000006,0x00000053, +0x3e239467,0x0004002b,0x00000006,0x00000054, +0xbd432d68,0x0004002b,0x00000006,0x00000055, +0x3e162c2e,0x0004002b,0x00000006,0x00000056, +0x3daff4e3,0x0007002c,0x0000000c,0x00000057, +0x00000053,0x00000054,0x00000055,0x00000056, +0x0004002b,0x00000006,0x00000058,0x3da34a56, +0x0004002b,0x00000006,0x00000059,0xbead1b34, +0x0004002b,0x00000006,0x0000005a,0x3e72b68d, +0x0004002b,0x00000006,0x0000005b,0xbdeaafcd, +0x0007002c,0x0000000c,0x0000005c,0x00000058, +0x00000059,0x0000005a,0x0000005b,0x0004002b, +0x00000006,0x0000005d,0xbd10957c,0x0004002b, +0x00000006,0x0000005e,0xbd3639f7,0x0004002b, +0x00000006,0x0000005f,0xbe571d04,0x0004002b, +0x00000006,0x00000060,0x3e05af6e,0x0007002c, +0x0000000c,0x00000061,0x0000005d,0x0000005e, +0x0000005f,0x00000060,0x0004002b,0x00000006, +0x00000062,0xbe0b2a26,0x0004002b,0x00000006, +0x00000063,0x3de0c19c,0x0004002b,0x00000006, +0x00000064,0x3d384b73,0x0004002b,0x00000006, +0x00000065,0xbdecae1e,0x0007002c,0x0000000c, +0x00000066,0x00000062,0x00000063,0x00000064, +0x00000065,0x0007002c,0x00000035,0x00000067, +0x00000057,0x0000005c,0x00000061,0x00000066, +0x0004003b,0x00000009,0x00000068,0x00000000, +0x0004002b,0x00000006,0x0000006e,0xbd08c5a9, +0x0004002b,0x00000006,0x0000006f,0x3e775b5a, +0x0004002b,0x00000006,0x00000070,0x3d5533bc, +0x0004002b,0x00000006,0x00000071,0x3dfb8434, +0x0007002c,0x0000000c,0x00000072,0x0000006e, +0x0000006f,0x00000070,0x00000071,0x0004002b, +0x00000006,0x00000073,0xbd491e42,0x0004002b, +0x00000006,0x00000074,0x3ee1bb1c,0x0004002b, +0x00000006,0x00000075,0x3eed27fc,0x0004002b, +0x00000006,0x00000076,0x3e4e4a7c,0x0007002c, +0x0000000c,0x00000077,0x00000073,0x00000074, +0x00000075,0x00000076,0x0004002b,0x00000006, +0x00000078,0xbebcdb29,0x0004002b,0x00000006, +0x00000079,0x3d1665a5,0x0004002b,0x00000006, +0x0000007a,0x3e7e6bcf,0x0004002b,0x00000006, +0x0000007b,0xbde40879,0x0007002c,0x0000000c, +0x0000007c,0x00000078,0x00000079,0x0000007a, +0x0000007b,0x0004002b,0x00000006,0x0000007d, +0x3e036a62,0x0004002b,0x00000006,0x0000007e, +0x3d2b36ed,0x0004002b,0x00000006,0x0000007f, +0xbc8c4844,0x0004002b,0x00000006,0x00000080, +0xbdfc4d4e,0x0007002c,0x0000000c,0x00000081, +0x0000007d,0x0000007e,0x0000007f,0x00000080, +0x0007002c,0x00000035,0x00000082,0x00000072, +0x00000077,0x0000007c,0x00000081,0x0004002b, +0x00000006,0x00000083,0x00000000,0x0004002b, +0x00000006,0x0000008a,0x3eb2dd4d,0x0004002b, +0x00000006,0x0000008b,0x3ee8f60e,0x0004002b, +0x00000006,0x0000008c,0x3d170796,0x0004002b, +0x00000006,0x0000008d,0x3d9956c0,0x0007002c, +0x0000000c,0x0000008e,0x0000008a,0x0000008b, +0x0000008c,0x0000008d,0x0004002b,0x00000006, +0x0000008f,0x3f000937,0x0004002b,0x00000006, +0x00000090,0x3c6e7a60,0x0004002b,0x00000006, +0x00000091,0x3dfd4305,0x0004002b,0x00000006, +0x00000092,0x3ea0ed83,0x0007002c,0x0000000c, +0x00000093,0x0000008f,0x00000090,0x00000091, +0x00000092,0x0004002b,0x00000006,0x00000094, +0xbe47e235,0x0004002b,0x00000006,0x00000095, +0xbc815d1a,0x0004002b,0x00000006,0x00000096, +0x3dc01a29,0x0004002b,0x00000006,0x00000097, +0xbe64bec9,0x0007002c,0x0000000c,0x00000098, +0x00000094,0x00000095,0x00000096,0x00000097, +0x0004002b,0x00000006,0x00000099,0x3f00daf7, +0x0004002b,0x00000006,0x0000009a,0xbea2fac3, +0x0004002b,0x00000006,0x0000009b,0xbe675772, +0x0004002b,0x00000006,0x0000009c,0x3eba5823, +0x0007002c,0x0000000c,0x0000009d,0x00000099, +0x0000009a,0x0000009b,0x0000009c,0x0007002c, +0x00000035,0x0000009e,0x0000008e,0x00000093, +0x00000098,0x0000009d,0x0004002b,0x00000006, +0x000000a4,0xbd981b43,0x0004002b,0x00000006, +0x000000a5,0xbe03deef,0x0004002b,0x00000006, +0x000000a6,0xbe81b257,0x0004002b,0x00000006, +0x000000a7,0x3d887c6c,0x0007002c,0x0000000c, +0x000000a8,0x000000a4,0x000000a5,0x000000a6, +0x000000a7,0x0004002b,0x00000006,0x000000a9, +0xbc980faa,0x0004002b,0x00000006,0x000000aa, +0x3e122bba,0x0004002b,0x00000006,0x000000ab, +0xbd946dd6,0x0004002b,0x00000006,0x000000ac, +0xbda00c53,0x0007002c,0x0000000c,0x000000ad, +0x000000a9,0x000000aa,0x000000ab,0x000000ac, +0x0004002b,0x00000006,0x000000ae,0xbe6883af, +0x0004002b,0x00000006,0x000000af,0xbe6d088a, +0x0004002b,0x00000006,0x000000b0,0x3ec3530b, +0x0004002b,0x00000006,0x000000b1,0xbe298353, +0x0007002c,0x0000000c,0x000000b2,0x000000ae, +0x000000af,0x000000b0,0x000000b1,0x0004002b, +0x00000006,0x000000b3,0x3d27598c,0x0004002b, +0x00000006,0x000000b4,0xbde9663c,0x0004002b, +0x00000006,0x000000b5,0x3e380db0,0x0004002b, +0x00000006,0x000000b6,0xbcc938d4,0x0007002c, +0x0000000c,0x000000b7,0x000000b3,0x000000b4, +0x000000b5,0x000000b6,0x0007002c,0x00000035, +0x000000b8,0x000000a8,0x000000ad,0x000000b2, +0x000000b7,0x0004002b,0x00000006,0x000000c0, +0x3df282d4,0x0004002b,0x00000006,0x000000c1, +0x3d33f6e1,0x0004002b,0x00000006,0x000000c2, +0x3cb88181,0x0004002b,0x00000006,0x000000c3, +0xbb7c7d5e,0x0007002c,0x0000000c,0x000000c4, +0x000000c0,0x000000c1,0x000000c2,0x000000c3, +0x0004002b,0x00000006,0x000000c5,0x3e045ef9, +0x0004002b,0x00000006,0x000000c6,0x3d80db0a, +0x0004002b,0x00000006,0x000000c7,0x3eb0e6e2, +0x0004002b,0x00000006,0x000000c8,0xbe3e2d83, +0x0007002c,0x0000000c,0x000000c9,0x000000c5, +0x000000c6,0x000000c7,0x000000c8,0x0004002b, +0x00000006,0x000000ca,0xbefbfb1d,0x0004002b, +0x00000006,0x000000cb,0xbdefd24f,0x0004002b, +0x00000006,0x000000cc,0x3c9a855b,0x0004002b, +0x00000006,0x000000cd,0xbde19fe1,0x0007002c, +0x0000000c,0x000000ce,0x000000ca,0x000000cb, +0x000000cc,0x000000cd,0x0004002b,0x00000006, +0x000000cf,0x3d8a9e26,0x0004002b,0x00000006, +0x000000d0,0x3f03f1d1,0x0004002b,0x00000006, +0x000000d1,0xbdb7fcfb,0x0004002b,0x00000006, +0x000000d2,0x3eaec28c,0x0007002c,0x0000000c, +0x000000d3,0x000000cf,0x000000d0,0x000000d1, +0x000000d2,0x0007002c,0x00000035,0x000000d4, +0x000000c4,0x000000c9,0x000000ce,0x000000d3, +0x0004002b,0x00000006,0x000000da,0xbe86c008, +0x0004002b,0x00000006,0x000000db,0x3cb08cb0, +0x0004002b,0x00000006,0x000000dc,0x3e9e587e, +0x0004002b,0x00000006,0x000000dd,0xbca494b3, +0x0007002c,0x0000000c,0x000000de,0x000000da, +0x000000db,0x000000dc,0x000000dd,0x0004002b, +0x00000006,0x000000df,0x3d8b031f,0x0004002b, +0x00000006,0x000000e0,0x3e353db1,0x0004002b, +0x00000006,0x000000e1,0xbebb1188,0x0004002b, +0x00000006,0x000000e2,0xbea7a7b3,0x0007002c, +0x0000000c,0x000000e3,0x000000df,0x000000e0, +0x000000e1,0x000000e2,0x0004002b,0x00000006, +0x000000e4,0x3eebee3d,0x0004002b,0x00000006, +0x000000e5,0xbe1e2f99,0x0004002b,0x00000006, +0x000000e6,0x3df398e5,0x0004002b,0x00000006, +0x000000e7,0x3f339b3f,0x0007002c,0x0000000c, +0x000000e8,0x000000e4,0x000000e5,0x000000e6, +0x000000e7,0x0004002b,0x00000006,0x000000e9, +0x3e8beb94,0x0004002b,0x00000006,0x000000ea, +0xbd5f4174,0x0004002b,0x00000006,0x000000eb, +0xbeb1e590,0x0004002b,0x00000006,0x000000ec, +0xbccf7172,0x0007002c,0x0000000c,0x000000ed, +0x000000e9,0x000000ea,0x000000eb,0x000000ec, +0x0007002c,0x00000035,0x000000ee,0x000000de, +0x000000e3,0x000000e8,0x000000ed,0x0004002b, +0x00000006,0x000000f5,0x3dcba2d7,0x0004002b, +0x00000006,0x000000f6,0x3d8398f7,0x0004002b, +0x00000006,0x000000f7,0x3e5006a4,0x0004002b, +0x00000006,0x000000f8,0x3e692921,0x0007002c, +0x0000000c,0x000000f9,0x000000f5,0x000000f6, +0x000000f7,0x000000f8,0x0004002b,0x00000006, +0x000000fa,0xbde01129,0x0004002b,0x00000006, +0x000000fb,0x3ee48846,0x0004002b,0x00000006, +0x000000fc,0x3dbcc87b,0x0004002b,0x00000006, +0x000000fd,0xbe9b4b67,0x0007002c,0x0000000c, +0x000000fe,0x000000fa,0x000000fb,0x000000fc, +0x000000fd,0x0004002b,0x00000006,0x000000ff, +0xbdc34041,0x0004002b,0x00000006,0x00000100, +0xbe0855be,0x0004002b,0x00000006,0x00000101, +0x3e85e8be,0x0004002b,0x00000006,0x00000102, +0xbe932b87,0x0007002c,0x0000000c,0x00000103, +0x000000ff,0x00000100,0x00000101,0x00000102, +0x0004002b,0x00000006,0x00000104,0xbd1f9db9, +0x0004002b,0x00000006,0x00000105,0x3d0a8e68, +0x0004002b,0x00000006,0x00000106,0x3e8f94ee, +0x0004002b,0x00000006,0x00000107,0xbeb052bf, +0x0007002c,0x0000000c,0x00000108,0x00000104, +0x00000105,0x00000106,0x00000107,0x0007002c, +0x00000035,0x00000109,0x000000f9,0x000000fe, +0x00000103,0x00000108,0x0004002b,0x00000006, +0x0000010f,0xbe38f055,0x0004002b,0x00000006, +0x00000110,0xbef7d951,0x0004002b,0x00000006, +0x00000111,0x3ed831c2,0x0004002b,0x00000006, +0x00000112,0x3dfdafa2,0x0007002c,0x0000000c, +0x00000113,0x0000010f,0x00000110,0x00000111, +0x00000112,0x0004002b,0x00000006,0x00000114, +0x3c407b5f,0x0004002b,0x00000006,0x00000115, +0xbf194386,0x0004002b,0x00000006,0x00000116, +0x3e9c8cd6,0x0004002b,0x00000006,0x00000117, +0x3e462225,0x0007002c,0x0000000c,0x00000118, +0x00000114,0x00000115,0x00000116,0x00000117, +0x0004002b,0x00000006,0x00000119,0xbf35690e, +0x0004002b,0x00000006,0x0000011a,0xbf5b5328, +0x0004002b,0x00000006,0x0000011b,0x3f31cabe, +0x0004002b,0x00000006,0x0000011c,0xbfbadeac, +0x0007002c,0x0000000c,0x0000011d,0x00000119, +0x0000011a,0x0000011b,0x0000011c,0x0004002b, +0x00000006,0x0000011e,0x3db59b78,0x0004002b, +0x00000006,0x0000011f,0xbedbd3bd,0x0004002b, +0x00000006,0x00000120,0xbe1c13e2,0x0004002b, +0x00000006,0x00000121,0x3e779c82,0x0007002c, +0x0000000c,0x00000122,0x0000011e,0x0000011f, +0x00000120,0x00000121,0x0007002c,0x00000035, +0x00000123,0x00000113,0x00000118,0x0000011d, +0x00000122,0x0004002b,0x00000006,0x0000012a, +0x400aeb4c,0x0004002b,0x00000006,0x0000012b, +0x3eb4836e,0x0004002b,0x00000006,0x0000012c, +0xbf3369fc,0x0004002b,0x00000006,0x0000012d, +0xbef716e4,0x0007002c,0x0000000c,0x0000012e, +0x0000012a,0x0000012b,0x0000012c,0x0000012d, +0x0004002b,0x00000006,0x0000012f,0xbea403fd, +0x0004002b,0x00000006,0x00000130,0x3f599fc8, +0x0004002b,0x00000006,0x00000131,0xbf4ca244, +0x0004002b,0x00000006,0x00000132,0x3eddb01c, +0x0007002c,0x0000000c,0x00000133,0x0000012f, +0x00000130,0x00000131,0x00000132,0x0004002b, +0x00000006,0x00000134,0x3e57bbc2,0x0004002b, +0x00000006,0x00000135,0x3f8e1f3b,0x0004002b, +0x00000006,0x00000136,0x3f9ac854,0x0004002b, +0x00000006,0x00000137,0x3fbda02a,0x0007002c, +0x0000000c,0x00000138,0x00000134,0x00000135, +0x00000136,0x00000137,0x0004002b,0x00000006, +0x00000139,0xbed458ac,0x0004002b,0x00000006, +0x0000013a,0xbf346626,0x0004002b,0x00000006, +0x0000013b,0xbe13c7d6,0x0004002b,0x00000006, +0x0000013c,0xbf2e5d71,0x0007002c,0x0000000c, +0x0000013d,0x00000139,0x0000013a,0x0000013b, +0x0000013c,0x0007002c,0x00000035,0x0000013e, +0x0000012e,0x00000133,0x00000138,0x0000013d, +0x0004002b,0x00000006,0x00000144,0xbe188297, +0x0004002b,0x00000006,0x00000145,0x3e0f5cae, +0x0004002b,0x00000006,0x00000146,0x3e7861c3, +0x0004002b,0x00000006,0x00000147,0xbe56e239, +0x0007002c,0x0000000c,0x00000148,0x00000144, +0x00000145,0x00000146,0x00000147,0x0004002b, +0x00000006,0x00000149,0xbe21d98c,0x0004002b, +0x00000006,0x0000014a,0x3e15d58f,0x0004002b, +0x00000006,0x0000014b,0xbe60094c,0x0004002b, +0x00000006,0x0000014c,0x3f04783d,0x0007002c, +0x0000000c,0x0000014d,0x00000149,0x0000014a, +0x0000014b,0x0000014c,0x0004002b,0x00000006, +0x0000014e,0xbc6ba151,0x0004002b,0x00000006, +0x0000014f,0xbd1487c6,0x0004002b,0x00000006, +0x00000150,0xbbdf9a23,0x0004002b,0x00000006, +0x00000151,0x3ef32c4a,0x0007002c,0x0000000c, +0x00000152,0x0000014e,0x0000014f,0x00000150, +0x00000151,0x0004002b,0x00000006,0x00000153, +0x3e953bfd,0x0004002b,0x00000006,0x00000154, +0xbea948b7,0x0004002b,0x00000006,0x00000155, +0xbe7a5862,0x0004002b,0x00000006,0x00000156, +0xbdf003c2,0x0007002c,0x0000000c,0x00000157, +0x00000153,0x00000154,0x00000155,0x00000156, +0x0007002c,0x00000035,0x00000158,0x00000148, +0x0000014d,0x00000152,0x00000157,0x0004002b, +0x00000006,0x0000015f,0x3d3a7757,0x0004002b, +0x00000006,0x00000160,0x3eb2ff60,0x0004002b, +0x00000006,0x00000161,0x3e04dcf9,0x0004002b, +0x00000006,0x00000162,0xbe821aa7,0x0007002c, +0x0000000c,0x00000163,0x0000015f,0x00000160, +0x00000161,0x00000162,0x0004002b,0x00000006, +0x00000164,0x3eb89a06,0x0004002b,0x00000006, +0x00000165,0x3e6f9285,0x0004002b,0x00000006, +0x00000166,0xbc9a78f7,0x0004002b,0x00000006, +0x00000167,0xbd57861c,0x0007002c,0x0000000c, +0x00000168,0x00000164,0x00000165,0x00000166, +0x00000167,0x0004002b,0x00000006,0x00000169, +0x3e16ac83,0x0004002b,0x00000006,0x0000016a, +0x3f523f8d,0x0004002b,0x00000006,0x0000016b, +0x3da7c06c,0x0004002b,0x00000006,0x0000016c, +0xbdae6bcc,0x0007002c,0x0000000c,0x0000016d, +0x00000169,0x0000016a,0x0000016b,0x0000016c, +0x0004002b,0x00000006,0x0000016e,0x3ebf7745, +0x0004002b,0x00000006,0x0000016f,0x3e0599d1, +0x0004002b,0x00000006,0x00000170,0x3e17abea, +0x0004002b,0x00000006,0x00000171,0xbe5a97d6, +0x0007002c,0x0000000c,0x00000172,0x0000016e, +0x0000016f,0x00000170,0x00000171,0x0007002c, +0x00000035,0x00000173,0x00000163,0x00000168, +0x0000016d,0x00000172,0x0004002b,0x00000006, +0x00000179,0xbe54a7fb,0x0004002b,0x00000006, +0x0000017a,0xbdbeff10,0x0004002b,0x00000006, +0x0000017b,0x3d84d182,0x0004002b,0x00000006, +0x0000017c,0xbe732d30,0x0007002c,0x0000000c, +0x0000017d,0x00000179,0x0000017a,0x0000017b, +0x0000017c,0x0004002b,0x00000006,0x0000017e, +0xbdbe04da,0x0004002b,0x00000006,0x0000017f, +0x3e3d4176,0x0004002b,0x00000006,0x00000180, +0x3ed3844f,0x0004002b,0x00000006,0x00000181, +0x3ea7f086,0x0007002c,0x0000000c,0x00000182, +0x0000017e,0x0000017f,0x00000180,0x00000181, +0x0004002b,0x00000006,0x00000183,0xbe56f4e5, +0x0004002b,0x00000006,0x00000184,0x3e5a34f9, +0x0004002b,0x00000006,0x00000185,0xbd1494a7, +0x0004002b,0x00000006,0x00000186,0x3c9cbd31, +0x0007002c,0x0000000c,0x00000187,0x00000183, +0x00000184,0x00000185,0x00000186,0x0004002b, +0x00000006,0x00000188,0x3e22da8e,0x0004002b, +0x00000006,0x00000189,0x3cf83b1d,0x0004002b, +0x00000006,0x0000018a,0x3df7429e,0x0004002b, +0x00000006,0x0000018b,0x3e7b06a3,0x0007002c, +0x0000000c,0x0000018c,0x00000188,0x00000189, +0x0000018a,0x0000018b,0x0007002c,0x00000035, +0x0000018d,0x0000017d,0x00000182,0x00000187, +0x0000018c,0x0004002b,0x00000006,0x00000194, +0xbc5d3322,0x0004002b,0x00000006,0x00000195, +0xbc25f995,0x0004002b,0x00000006,0x00000196, +0x3d9a1c05,0x0004002b,0x00000006,0x00000197, +0x3d5a784d,0x0007002c,0x0000000c,0x00000198, +0x00000194,0x00000195,0x00000196,0x00000197, +0x0004002b,0x00000006,0x00000199,0xbccfb29e, +0x0004002b,0x00000006,0x0000019a,0x3e0706b3, +0x0004002b,0x00000006,0x0000019b,0xbe015989, +0x0004002b,0x00000006,0x0000019c,0x3ccc6920, +0x0007002c,0x0000000c,0x0000019d,0x00000199, +0x0000019a,0x0000019b,0x0000019c,0x0004002b, +0x00000006,0x0000019e,0xbe174586,0x0004002b, +0x00000006,0x0000019f,0x3ea5b63a,0x0004002b, +0x00000006,0x000001a0,0x3d9e5ebc,0x0004002b, +0x00000006,0x000001a1,0xbe136c2c,0x0007002c, +0x0000000c,0x000001a2,0x0000019e,0x0000019f, +0x000001a0,0x000001a1,0x0004002b,0x00000006, +0x000001a3,0xbe4d673a,0x0004002b,0x00000006, +0x000001a4,0x3db6d631,0x0004002b,0x00000006, +0x000001a5,0x3d2350d1,0x0004002b,0x00000006, +0x000001a6,0x3ebc2b7d,0x0007002c,0x0000000c, +0x000001a7,0x000001a3,0x000001a4,0x000001a5, +0x000001a6,0x0007002c,0x00000035,0x000001a8, +0x00000198,0x0000019d,0x000001a2,0x000001a7, +0x0004002b,0x00000006,0x000001ae,0xbc9e8b56, +0x0004002b,0x00000006,0x000001af,0xbe671bc1, +0x0004002b,0x00000006,0x000001b0,0x3d0bda2b, +0x0004002b,0x00000006,0x000001b1,0x3da30294, +0x0007002c,0x0000000c,0x000001b2,0x000001ae, +0x000001af,0x000001b0,0x000001b1,0x0004002b, +0x00000006,0x000001b3,0x3e194738,0x0004002b, +0x00000006,0x000001b4,0xbe8e93f5,0x0004002b, +0x00000006,0x000001b5,0xbd6e83fa,0x0004002b, +0x00000006,0x000001b6,0xbe8ea584,0x0007002c, +0x0000000c,0x000001b7,0x000001b3,0x000001b4, +0x000001b5,0x000001b6,0x0004002b,0x00000006, +0x000001b8,0xbe2a9c8c,0x0004002b,0x00000006, +0x000001b9,0xbf274604,0x0004002b,0x00000006, +0x000001ba,0x3e8a071a,0x0004002b,0x00000006, +0x000001bb,0xbc9339ff,0x0007002c,0x0000000c, +0x000001bc,0x000001b8,0x000001b9,0x000001ba, +0x000001bb,0x0004002b,0x00000006,0x000001bd, +0x3ad167c0,0x0004002b,0x00000006,0x000001be, +0x3c6542d9,0x0004002b,0x00000006,0x000001bf, +0xbe2ebe82,0x0004002b,0x00000006,0x000001c0, +0xbea7ab02,0x0007002c,0x0000000c,0x000001c1, +0x000001bd,0x000001be,0x000001bf,0x000001c0, +0x0007002c,0x00000035,0x000001c2,0x000001b2, +0x000001b7,0x000001bc,0x000001c1,0x0004002b, +0x00000006,0x000001c9,0xbf3792cb,0x0004002b, +0x00000006,0x000001ca,0x3db1efc8,0x0004002b, +0x00000006,0x000001cb,0x3e3b4c32,0x0004002b, +0x00000006,0x000001cc,0xbbf92f7a,0x0007002c, +0x0000000c,0x000001cd,0x000001c9,0x000001ca, +0x000001cb,0x000001cc,0x0004002b,0x00000006, +0x000001ce,0x3e1c40e1,0x0004002b,0x00000006, +0x000001cf,0xbe8303f9,0x0004002b,0x00000006, +0x000001d0,0x3db6edeb,0x0004002b,0x00000006, +0x000001d1,0xbeaf69c9,0x0007002c,0x0000000c, +0x000001d2,0x000001ce,0x000001cf,0x000001d0, +0x000001d1,0x0004002b,0x00000006,0x000001d3, +0xbe93002f,0x0004002b,0x00000006,0x000001d4, +0xbe7a5fdc,0x0004002b,0x00000006,0x000001d5, +0x3e2ba752,0x0004002b,0x00000006,0x000001d6, +0x3e58b88d,0x0007002c,0x0000000c,0x000001d7, +0x000001d3,0x000001d4,0x000001d5,0x000001d6, +0x0004002b,0x00000006,0x000001d8,0x3db50ad3, +0x0004002b,0x00000006,0x000001d9,0xbec6ac48, +0x0004002b,0x00000006,0x000001da,0x3e870187, +0x0004002b,0x00000006,0x000001db,0xbe80be22, +0x0007002c,0x0000000c,0x000001dc,0x000001d8, +0x000001d9,0x000001da,0x000001db,0x0007002c, +0x00000035,0x000001dd,0x000001cd,0x000001d2, +0x000001d7,0x000001dc,0x0004002b,0x00000006, +0x000001e3,0xbe3e9819,0x0004002b,0x00000006, +0x000001e4,0x3e4cdecb,0x0004002b,0x00000006, +0x000001e5,0xbe19b8b6,0x0004002b,0x00000006, +0x000001e6,0x3e1c2e4e,0x0007002c,0x0000000c, +0x000001e7,0x000001e3,0x000001e4,0x000001e5, +0x000001e6,0x0004002b,0x00000006,0x000001e8, +0x3e49a627,0x0004002b,0x00000006,0x000001e9, +0x3df072fe,0x0004002b,0x00000006,0x000001ea, +0xbe032e3b,0x0004002b,0x00000006,0x000001eb, +0xbdaf14c6,0x0007002c,0x0000000c,0x000001ec, +0x000001e8,0x000001e9,0x000001ea,0x000001eb, +0x0004002b,0x00000006,0x000001ed,0x3cee120e, +0x0004002b,0x00000006,0x000001ee,0xbd5c6569, +0x0004002b,0x00000006,0x000001ef,0xbcce18bc, +0x0004002b,0x00000006,0x000001f0,0x3d8de50f, +0x0007002c,0x0000000c,0x000001f1,0x000001ed, +0x000001ee,0x000001ef,0x000001f0,0x0004002b, +0x00000006,0x000001f2,0x3d1d6ac5,0x0004002b, +0x00000006,0x000001f3,0x3e93df69,0x0004002b, +0x00000006,0x000001f4,0x3debe3b9,0x0004002b, +0x00000006,0x000001f5,0x3dcad699,0x0007002c, +0x0000000c,0x000001f6,0x000001f2,0x000001f3, +0x000001f4,0x000001f5,0x0007002c,0x00000035, +0x000001f7,0x000001e7,0x000001ec,0x000001f1, +0x000001f6,0x0004002b,0x00000006,0x000001fe, +0xbd0d0f78,0x0004002b,0x00000006,0x000001ff, +0x3e021606,0x0004002b,0x00000006,0x00000200, +0x3dbce9bd,0x0004002b,0x00000006,0x00000201, +0xbd2ecbe3,0x0007002c,0x0000000c,0x00000202, +0x000001fe,0x000001ff,0x00000200,0x00000201, +0x0004002b,0x00000006,0x00000203,0xbe299ff3, +0x0004002b,0x00000006,0x00000204,0xbea7982c, +0x0004002b,0x00000006,0x00000205,0xbce732ab, +0x0004002b,0x00000006,0x00000206,0x3de12805, +0x0007002c,0x0000000c,0x00000207,0x00000203, +0x00000204,0x00000205,0x00000206,0x0004002b, +0x00000006,0x00000208,0xbde3fd56,0x0004002b, +0x00000006,0x00000209,0x3e96b24b,0x0004002b, +0x00000006,0x0000020a,0xbe5f5891,0x0004002b, +0x00000006,0x0000020b,0xbea2b232,0x0007002c, +0x0000000c,0x0000020c,0x00000208,0x00000209, +0x0000020a,0x0000020b,0x0004002b,0x00000006, +0x0000020d,0xbde0921b,0x0004002b,0x00000006, +0x0000020e,0xbd503265,0x0004002b,0x00000006, +0x0000020f,0xbcd1d9aa,0x0004002b,0x00000006, +0x00000210,0xbd1f04c2,0x0007002c,0x0000000c, +0x00000211,0x0000020d,0x0000020e,0x0000020f, +0x00000210,0x0007002c,0x00000035,0x00000212, +0x00000202,0x00000207,0x0000020c,0x00000211, +0x0007002c,0x0000000c,0x00000219,0x00000083, +0x00000083,0x00000083,0x00000083,0x0004002b, +0x00000006,0x0000021b,0x3f36d87c,0x0004002b, +0x00000006,0x0000021c,0x3d8c881f,0x0004002b, +0x00000006,0x0000021d,0x3ecccbed,0x0004002b, +0x00000006,0x0000021e,0xbf832a11,0x0007002c, +0x0000000c,0x0000021f,0x0000021b,0x0000021c, +0x0000021d,0x0000021e,0x00040015,0x00000227, +0x00000020,0x00000000,0x00040017,0x00000228, +0x00000227,0x00000003,0x00040020,0x00000229, +0x00000001,0x00000228,0x0004003b,0x00000229, +0x0000022a,0x00000001,0x00040017,0x0000022b, +0x00000227,0x00000002,0x00020014,0x0000022f, +0x0004002b,0x00000227,0x00000230,0x00000000, +0x00040020,0x00000234,0x00000009,0x00000016, +0x0004002b,0x00000227,0x0000023b,0x00000001, +0x00090019,0x00000245,0x00000006,0x00000001, +0x00000000,0x00000000,0x00000000,0x00000002, +0x00000002,0x00040020,0x00000246,0x00000000, +0x00000245,0x0004003b,0x00000246,0x00000247, +0x00000000,0x0004002b,0x00000227,0x0000024b, +0x00000010,0x0006002c,0x00000228,0x0000024c, +0x0000024b,0x0000024b,0x0000023b,0x0004002b, +0x00000016,0x000003b8,0xffffffff,0x0005002c, +0x00000017,0x000003b9,0x000003b8,0x000003b8, +0x0005002c,0x00000017,0x000003ba,0x00000026, +0x00000026,0x0005002c,0x00000017,0x000003bb, +0x000003b8,0x0000001e,0x0005002c,0x00000017, +0x000003bc,0x000003b8,0x00000026,0x0005002c, +0x00000017,0x000003bd,0x0000001e,0x000003b8, +0x0005002c,0x00000017,0x000003be,0x0000001e, +0x00000026,0x0005002c,0x00000017,0x000003bf, +0x00000026,0x000003b8,0x0005002c,0x00000017, +0x000003c0,0x00000026,0x0000001e,0x00050036, +0x00000002,0x00000004,0x00000000,0x00000003, +0x000200f8,0x00000005,0x000300f7,0x0000024e, +0x00000000,0x000300fb,0x00000230,0x0000024f, +0x000200f8,0x0000024f,0x0004003d,0x00000228, +0x0000022c,0x0000022a,0x0007004f,0x0000022b, +0x0000022d,0x0000022c,0x0000022c,0x00000000, +0x00000001,0x0004007c,0x00000017,0x0000022e, +0x0000022d,0x00050051,0x00000016,0x00000233, +0x0000022e,0x00000000,0x00060041,0x00000234, +0x00000235,0x00000022,0x0000001e,0x00000230, +0x0004003d,0x00000016,0x00000236,0x00000235, +0x000500af,0x0000022f,0x00000237,0x00000233, +0x00000236,0x000400a8,0x0000022f,0x00000238, +0x00000237,0x000300f7,0x0000023a,0x00000000, +0x000400fa,0x00000238,0x00000239,0x0000023a, +0x000200f8,0x00000239,0x00050051,0x00000016, +0x0000023d,0x0000022e,0x00000001,0x00060041, +0x00000234,0x0000023e,0x00000022,0x0000001e, +0x0000023b,0x0004003d,0x00000016,0x0000023f, +0x0000023e,0x000500af,0x0000022f,0x00000240, +0x0000023d,0x0000023f,0x000200f9,0x0000023a, +0x000200f8,0x0000023a,0x000700f5,0x0000022f, +0x00000241,0x00000237,0x0000024f,0x00000240, +0x00000239,0x000300f7,0x00000243,0x00000000, +0x000400fa,0x00000241,0x00000242,0x00000243, +0x000200f8,0x00000242,0x000200f9,0x0000024e, +0x000200f8,0x00000243,0x0004003d,0x00000245, +0x00000248,0x00000247,0x0004003d,0x00000008, +0x000002ba,0x0000004b,0x00050080,0x00000017, +0x000002be,0x0000022e,0x000003b9,0x00050041, +0x00000023,0x000002bf,0x00000022,0x0000001e, +0x0004003d,0x00000017,0x000002c0,0x000002bf, +0x00050082,0x00000017,0x000002c2,0x000002c0, +0x000003ba,0x0008000c,0x00000017,0x000002c3, +0x00000001,0x0000002d,0x000002be,0x0000001f, +0x000002c2,0x00040064,0x00000007,0x000002c4, +0x000002ba,0x0007005f,0x0000000c,0x000002c5, +0x000002c4,0x000002c3,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x0000026a,0x0000004a, +0x000002c5,0x00050081,0x0000000c,0x0000026c, +0x00000034,0x0000026a,0x0004003d,0x00000008, +0x000002c8,0x00000068,0x00040064,0x00000007, +0x000002d2,0x000002c8,0x0007005f,0x0000000c, +0x000002d3,0x000002d2,0x000002c3,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x0000026e, +0x00000067,0x000002d3,0x00050081,0x0000000c, +0x00000270,0x0000026c,0x0000026e,0x0004003d, +0x00000008,0x000002d6,0x0000004b,0x00050080, +0x00000017,0x000002da,0x0000022e,0x000003bb, +0x0008000c,0x00000017,0x000002df,0x00000001, +0x0000002d,0x000002da,0x0000001f,0x000002c2, +0x00040064,0x00000007,0x000002e0,0x000002d6, +0x0007005f,0x0000000c,0x000002e1,0x000002e0, +0x000002df,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x00000272,0x00000082,0x000002e1, +0x00050081,0x0000000c,0x00000274,0x00000270, +0x00000272,0x0004003d,0x00000008,0x000002e4, +0x00000068,0x00040064,0x00000007,0x000002ee, +0x000002e4,0x0007005f,0x0000000c,0x000002ef, +0x000002ee,0x000002df,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x00000276,0x0000009e, +0x000002ef,0x00050081,0x0000000c,0x00000278, +0x00000274,0x00000276,0x0004003d,0x00000008, +0x000002f2,0x0000004b,0x00050080,0x00000017, +0x000002f6,0x0000022e,0x000003bc,0x0008000c, +0x00000017,0x000002fb,0x00000001,0x0000002d, +0x000002f6,0x0000001f,0x000002c2,0x00040064, +0x00000007,0x000002fc,0x000002f2,0x0007005f, +0x0000000c,0x000002fd,0x000002fc,0x000002fb, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x0000027a,0x000000b8,0x000002fd,0x00050081, +0x0000000c,0x0000027c,0x00000278,0x0000027a, +0x0004003d,0x00000008,0x00000300,0x00000068, +0x00040064,0x00000007,0x0000030a,0x00000300, +0x0007005f,0x0000000c,0x0000030b,0x0000030a, +0x000002fb,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x0000027e,0x000000d4,0x0000030b, +0x00050081,0x0000000c,0x00000280,0x0000027c, +0x0000027e,0x0004003d,0x00000008,0x0000030e, +0x0000004b,0x00050080,0x00000017,0x00000312, +0x0000022e,0x000003bd,0x0008000c,0x00000017, +0x00000317,0x00000001,0x0000002d,0x00000312, +0x0000001f,0x000002c2,0x00040064,0x00000007, +0x00000318,0x0000030e,0x0007005f,0x0000000c, +0x00000319,0x00000318,0x00000317,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x00000282, +0x000000ee,0x00000319,0x00050081,0x0000000c, +0x00000284,0x00000280,0x00000282,0x0004003d, +0x00000008,0x0000031c,0x00000068,0x00040064, +0x00000007,0x00000326,0x0000031c,0x0007005f, +0x0000000c,0x00000327,0x00000326,0x00000317, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x00000286,0x00000109,0x00000327,0x00050081, +0x0000000c,0x00000288,0x00000284,0x00000286, +0x0004003d,0x00000008,0x0000032a,0x0000004b, +0x0008000c,0x00000017,0x00000333,0x00000001, +0x0000002d,0x0000022e,0x0000001f,0x000002c2, +0x00040064,0x00000007,0x00000334,0x0000032a, +0x0007005f,0x0000000c,0x00000335,0x00000334, +0x00000333,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x0000028a,0x00000123,0x00000335, +0x00050081,0x0000000c,0x0000028c,0x00000288, +0x0000028a,0x0004003d,0x00000008,0x00000338, +0x00000068,0x00040064,0x00000007,0x00000342, +0x00000338,0x0007005f,0x0000000c,0x00000343, +0x00000342,0x00000333,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x0000028e,0x0000013e, +0x00000343,0x00050081,0x0000000c,0x00000290, +0x0000028c,0x0000028e,0x0004003d,0x00000008, +0x00000346,0x0000004b,0x00050080,0x00000017, +0x0000034a,0x0000022e,0x000003be,0x0008000c, +0x00000017,0x0000034f,0x00000001,0x0000002d, +0x0000034a,0x0000001f,0x000002c2,0x00040064, +0x00000007,0x00000350,0x00000346,0x0007005f, +0x0000000c,0x00000351,0x00000350,0x0000034f, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x00000292,0x00000158,0x00000351,0x00050081, +0x0000000c,0x00000294,0x00000290,0x00000292, +0x0004003d,0x00000008,0x00000354,0x00000068, +0x00040064,0x00000007,0x0000035e,0x00000354, +0x0007005f,0x0000000c,0x0000035f,0x0000035e, +0x0000034f,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x00000296,0x00000173,0x0000035f, +0x00050081,0x0000000c,0x00000298,0x00000294, +0x00000296,0x0004003d,0x00000008,0x00000362, +0x0000004b,0x00050080,0x00000017,0x00000366, +0x0000022e,0x000003bf,0x0008000c,0x00000017, +0x0000036b,0x00000001,0x0000002d,0x00000366, +0x0000001f,0x000002c2,0x00040064,0x00000007, +0x0000036c,0x00000362,0x0007005f,0x0000000c, +0x0000036d,0x0000036c,0x0000036b,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x0000029a, +0x0000018d,0x0000036d,0x00050081,0x0000000c, +0x0000029c,0x00000298,0x0000029a,0x0004003d, +0x00000008,0x00000370,0x00000068,0x00040064, +0x00000007,0x0000037a,0x00000370,0x0007005f, +0x0000000c,0x0000037b,0x0000037a,0x0000036b, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x0000029e,0x000001a8,0x0000037b,0x00050081, +0x0000000c,0x000002a0,0x0000029c,0x0000029e, +0x0004003d,0x00000008,0x0000037e,0x0000004b, +0x00050080,0x00000017,0x00000382,0x0000022e, +0x000003c0,0x0008000c,0x00000017,0x00000387, +0x00000001,0x0000002d,0x00000382,0x0000001f, +0x000002c2,0x00040064,0x00000007,0x00000388, +0x0000037e,0x0007005f,0x0000000c,0x00000389, +0x00000388,0x00000387,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x000002a2,0x000001c2, +0x00000389,0x00050081,0x0000000c,0x000002a4, +0x000002a0,0x000002a2,0x0004003d,0x00000008, +0x0000038c,0x00000068,0x00040064,0x00000007, +0x00000396,0x0000038c,0x0007005f,0x0000000c, +0x00000397,0x00000396,0x00000387,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x000002a6, +0x000001dd,0x00000397,0x00050081,0x0000000c, +0x000002a8,0x000002a4,0x000002a6,0x0004003d, +0x00000008,0x0000039a,0x0000004b,0x00050080, +0x00000017,0x0000039e,0x0000022e,0x000003ba, +0x0008000c,0x00000017,0x000003a3,0x00000001, +0x0000002d,0x0000039e,0x0000001f,0x000002c2, +0x00040064,0x00000007,0x000003a4,0x0000039a, +0x0007005f,0x0000000c,0x000003a5,0x000003a4, +0x000003a3,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x000002aa,0x000001f7,0x000003a5, +0x00050081,0x0000000c,0x000002ac,0x000002a8, +0x000002aa,0x0004003d,0x00000008,0x000003a8, +0x00000068,0x00040064,0x00000007,0x000003b2, +0x000003a8,0x0007005f,0x0000000c,0x000003b3, +0x000003b2,0x000003a3,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x000002ae,0x00000212, +0x000003b3,0x00050081,0x0000000c,0x000002b0, +0x000002ac,0x000002ae,0x0007000c,0x0000000c, +0x000002b2,0x00000001,0x00000028,0x000002b0, +0x00000219,0x0007000c,0x0000000c,0x000002b4, +0x00000001,0x00000025,0x000002b0,0x00000219, +0x00050085,0x0000000c,0x000002b5,0x0000021f, +0x000002b4,0x00050081,0x0000000c,0x000002b6, +0x000002b2,0x000002b5,0x00040063,0x00000248, +0x0000022e,0x000002b6,0x000200f9,0x0000024e, +0x000200f8,0x0000024e,0x000100fd,0x00010038} diff --git a/app/src/shaders/fsrcnnx/pass_05.comp b/app/src/shaders/fsrcnnx/pass_05.comp new file mode 100644 index 0000000..949bc3c --- /dev/null +++ b/app/src/shaders/fsrcnnx/pass_05.comp @@ -0,0 +1,46 @@ +#version 450 +// Generated by tools/gen_fsrcnnx.js from third_party/FSRCNNX_x2_8-0-4-1.glsl +// (FSRCNNX by igv, LGPL-3.0). Layer: mapping 2_1. Do not edit. +layout(local_size_x = 16, local_size_y = 16) in; +layout(binding = 0, rgba16f) uniform writeonly image2D dst; +layout(binding = 1) uniform sampler2D in0; +layout(binding = 2) uniform sampler2D in1; +layout(binding = 3) uniform sampler2D in2; +layout(push_constant) uniform Params { ivec2 size; } p; + +ivec2 at_; +vec4 fetch_(sampler2D s, vec2 o) { return texelFetch(s, clamp(at_ + ivec2(o), ivec2(0), p.size - 1), 0); } +#define MODEL21_texOff(o) fetch_(in0, vec2(o)) +#define MODEL22_texOff(o) fetch_(in1, vec2(o)) + +vec4 hook() +{ +vec4 res = vec4(0.0203563515096903,0.1902436912059784,-0.0757935121655464,0.0393617525696754); +res += mat4(-0.1080558672547340,-0.0400269515812397,0.1042881682515144,-0.1994346678256989,0.0172465778887272,-0.0829331055283546,-0.1278677284717560,-0.0762506872415543,-0.0593080408871174,-0.0305212251842022,0.1326192617416382,-0.3380933105945587,-0.0722763314843178,-0.1975518912076950,-0.0223602931946516,0.2251029163599014) * MODEL21_texOff(vec2(-1,-1)); +res += mat4(0.1747678220272064,0.0297168865799904,0.1054855734109879,0.0803295820951462,-0.0338115766644478,-0.3885377943515778,-0.3540246784687042,-0.0719623491168022,-0.0656022280454636,-0.0469004511833191,0.1379419565200806,0.0319863893091679,0.0799935683608055,-0.0099127553403378,0.1698455959558487,-0.0108015276491642) * MODEL22_texOff(vec2(-1,-1)); +res += mat4(0.1587898135185242,0.3995443880558014,-0.0333226583898067,0.2373267263174057,-0.1616930961608887,0.0659186244010925,0.0141129801049829,-0.0541022196412086,-0.5743742585182190,0.1121487766504288,0.4259817600250244,0.0280795227736235,-0.3721714317798615,-0.3496374189853668,0.0997273251414299,-0.0079920450225472) * MODEL21_texOff(vec2(-1,0)); +res += mat4(0.0928084030747414,0.3107658624649048,0.1375299990177155,0.1550617516040802,-0.0780353918671608,-0.0102957757189870,-0.2056752145290375,-0.3927979469299316,-1.2112152576446533,0.0213295854628086,0.1396545022726059,0.0492016039788723,-0.0569122135639191,-0.1691886335611343,-0.1535325646400452,0.2800904810428619) * MODEL22_texOff(vec2(-1,0)); +res += mat4(0.2494744062423706,-0.0363066755235195,0.0959179550409317,-0.0048101749271154,-0.0195793900638819,0.0451166369020939,0.1470773071050644,-0.0050059854984283,0.2886958122253418,-0.3221147954463959,-0.7062104344367981,0.1646659970283508,-0.0092520527541637,-0.1254461258649826,0.0217506736516953,-0.0678806379437447) * MODEL21_texOff(vec2(-1,1)); +res += mat4(-0.0686557441949844,-0.0414490625262260,-0.1855954080820084,0.0264346338808537,-0.0296857114881277,-0.0431593284010887,0.0669397041201591,-0.0946076661348343,-0.2036914378404617,-0.1336101740598679,-0.2099903970956802,-0.1327936947345734,-0.1002155169844627,-0.0368575826287270,-0.1660962998867035,0.0728288888931274) * MODEL22_texOff(vec2(-1,1)); +res += mat4(0.5504320859909058,0.2939232587814331,0.4704743027687073,0.2129514217376709,0.0843106731772423,-0.1978624463081360,-0.3298224806785583,0.1919094175100327,0.1980742365121841,-0.0644423812627792,0.0091170109808445,-0.2124856859445572,0.0804558470845222,-0.1130188927054405,-0.6276652812957764,0.1861163526773453) * MODEL21_texOff(vec2(0,-1)); +res += mat4(-0.3357668519020081,0.2093413323163986,0.4355416595935822,0.1550502777099609,-0.6510964035987854,-0.1751857399940491,-0.2060168534517288,-0.1710205078125000,-0.1202360317111015,-0.2500316798686981,0.1074745431542397,-0.2418434321880341,0.0133954072371125,-0.0555886104702950,0.1514673978090286,0.2739115655422211) * MODEL22_texOff(vec2(0,-1)); +res += mat4(-0.3006273508071899,-0.2699472010135651,-0.1982013583183289,-0.0032952548936009,0.0307833012193441,0.3671586215496063,-0.0966020002961159,-0.2836556434631348,0.4297264218330383,0.6171903610229492,0.6723483800888062,0.2705117464065552,-0.1438141316175461,-0.0873940736055374,-0.7001031041145325,-0.2052250355482101) * MODEL21_texOff(vec2(0,0)); +res += mat4(-0.2875024676322937,-1.6230558156967163,-0.6733398437500000,-0.9642448425292969,-0.1964960694313049,0.2485812455415726,0.1236900389194489,-1.1423941850662231,-0.0412602946162224,0.3412002623081207,0.3962794244289398,-0.2490761876106262,-0.0058065578341484,-0.4578708708286285,-0.2418260127305984,0.5357795953750610) * MODEL22_texOff(vec2(0,0)); +res += mat4(0.0062361713498831,0.1925230026245117,0.0824977159500122,0.0561275146901608,0.0929671525955200,0.0698546022176743,0.3816939592361450,0.0395248420536518,-0.0719512030482292,0.0564917400479317,-0.1297784000635147,0.1245511695742607,0.0012355837970972,-0.0990515723824501,0.4213519692420959,-0.1645816713571548) * MODEL21_texOff(vec2(0,1)); +res += mat4(-0.0611936338245869,-0.0220258161425591,-0.0040935277938843,-0.1060328409075737,-0.0583154149353504,-0.0171997752040625,0.1058546081185341,0.2793170809745789,-0.2339317053556442,-0.1972009539604187,-0.0600687190890312,-0.0684379041194916,0.0243016034364700,-0.2111079394817352,-0.2042971849441528,0.0724857896566391) * MODEL22_texOff(vec2(0,1)); +res += mat4(-0.0833447948098183,-0.0533220991492271,0.0767802372574806,0.1182348504662514,-0.0223299078643322,-0.0479344800114632,-0.0119727496057749,0.0524821877479553,-0.0334780365228653,0.0719002187252045,0.0439689308404922,0.0475181229412556,0.0764308497309685,0.0086713796481490,-0.1700707823038101,0.0657354295253754) * MODEL21_texOff(vec2(1,-1)); +res += mat4(0.1391696482896805,0.0739523395895958,0.0565792545676231,-0.0430364646017551,0.0943084582686424,0.0102064209058881,0.0120795257389545,-0.0841303989291191,0.1573246121406555,0.0164279472082853,0.0988841354846954,-0.1430613398551941,-0.0572808869183064,-0.0844292491674423,0.0621565617620945,0.0923799052834511) * MODEL22_texOff(vec2(1,-1)); +res += mat4(-0.1223107874393463,-0.2441930323839188,-0.2410650849342346,-0.0162935722619295,0.0695567727088928,-0.0028583710081875,-0.0059417244046926,0.0715164169669151,-0.0668491795659065,-0.1499572396278381,0.0869924053549767,0.0553652904927731,0.2729566097259521,0.1370039582252502,-0.1282183527946472,-0.1451860070228577) * MODEL21_texOff(vec2(1,0)); +res += mat4(0.1331952214241028,0.0021079662255943,-0.1116734445095062,-0.4168601930141449,0.0534659475088120,0.0037860786542296,-0.0366065911948681,0.1047701835632324,0.1491260826587677,0.0782341659069061,0.0949895009398460,-0.1160908639431000,-0.1057133302092552,-0.2699718773365021,-0.1193305626511574,0.2142304331064224) * MODEL22_texOff(vec2(1,0)); +res += mat4(0.0041565205901861,-0.1065499857068062,-0.0629659667611122,-0.1144768893718719,0.0318886637687683,-0.0562519319355488,0.0043422472663224,0.0226082988083363,-0.1456198990345001,-0.2398656159639359,-0.2625046670436859,-0.0710547044873238,0.0067904205061495,0.0018544088816270,0.1019348874688148,-0.0186133962124586) * MODEL21_texOff(vec2(1,1)); +res += mat4(0.0732532218098640,0.1516859829425812,0.0580205544829369,0.1968977004289627,-0.0066619524732232,-0.1597842127084732,-0.0990600511431694,-0.1059188917279243,0.0718481168150902,-0.2222738713026047,-0.1675696671009064,-0.1500017195940018,-0.0568779110908508,-0.0582777932286263,-0.0844587534666061,-0.0263266414403915) * MODEL22_texOff(vec2(1,1)); +res = max(res, vec4(0.0)) + vec4(-0.2459529191255569,0.7563464641571045,-0.0705636814236641,-0.0094820559024811) * min(res, vec4(0.0)); +return res; +} + +void main() +{ + at_ = ivec2(gl_GlobalInvocationID.xy); + if (at_.x >= p.size.x || at_.y >= p.size.y) return; + imageStore(dst, at_, hook()); +} diff --git a/app/src/shaders/fsrcnnx/pass_05.spv.inc b/app/src/shaders/fsrcnnx/pass_05.spv.inc new file mode 100644 index 0000000..87ece3c --- /dev/null +++ b/app/src/shaders/fsrcnnx/pass_05.spv.inc @@ -0,0 +1,703 @@ +{0x07230203,0x00010000,0x000d000b,0x000003c1, +0x00000000,0x00020011,0x00000001,0x0006000b, +0x00000001,0x4c534c47,0x6474732e,0x3035342e, +0x00000000,0x0003000e,0x00000000,0x00000001, +0x0006000f,0x00000005,0x00000004,0x6e69616d, +0x00000000,0x0000022a,0x00060010,0x00000004, +0x00000011,0x00000010,0x00000010,0x00000001, +0x00030047,0x00000020,0x00000002,0x00050048, +0x00000020,0x00000000,0x00000023,0x00000000, +0x00040047,0x0000004b,0x00000021,0x00000001, +0x00040047,0x0000004b,0x00000022,0x00000000, +0x00040047,0x00000068,0x00000021,0x00000002, +0x00040047,0x00000068,0x00000022,0x00000000, +0x00040047,0x0000022a,0x0000000b,0x0000001c, +0x00030047,0x00000247,0x00000019,0x00040047, +0x00000247,0x00000021,0x00000000,0x00040047, +0x00000247,0x00000022,0x00000000,0x00040047, +0x0000024c,0x0000000b,0x00000019,0x00020013, +0x00000002,0x00030021,0x00000003,0x00000002, +0x00030016,0x00000006,0x00000020,0x00090019, +0x00000007,0x00000006,0x00000001,0x00000000, +0x00000000,0x00000000,0x00000001,0x00000000, +0x0003001b,0x00000008,0x00000007,0x00040020, +0x00000009,0x00000000,0x00000008,0x00040017, +0x0000000c,0x00000006,0x00000004,0x00040015, +0x00000016,0x00000020,0x00000001,0x00040017, +0x00000017,0x00000016,0x00000002,0x0004002b, +0x00000016,0x0000001e,0x00000000,0x0005002c, +0x00000017,0x0000001f,0x0000001e,0x0000001e, +0x0003001e,0x00000020,0x00000017,0x00040020, +0x00000021,0x00000009,0x00000020,0x0004003b, +0x00000021,0x00000022,0x00000009,0x00040020, +0x00000023,0x00000009,0x00000017,0x0004002b, +0x00000016,0x00000026,0x00000001,0x0004002b, +0x00000006,0x00000030,0x3ca6c25d,0x0004002b, +0x00000006,0x00000031,0x3e42cf3e,0x0004002b, +0x00000006,0x00000032,0xbd9b39a1,0x0004002b, +0x00000006,0x00000033,0x3d2139ca,0x0007002c, +0x0000000c,0x00000034,0x00000030,0x00000031, +0x00000032,0x00000033,0x00040018,0x00000035, +0x0000000c,0x00000004,0x0004002b,0x00000006, +0x00000036,0xbddd4c65,0x0004002b,0x00000006, +0x00000037,0xbd23f34d,0x0004002b,0x00000006, +0x00000038,0x3dd59509,0x0004002b,0x00000006, +0x00000039,0xbe4c389a,0x0007002c,0x0000000c, +0x0000003a,0x00000036,0x00000037,0x00000038, +0x00000039,0x0004002b,0x00000006,0x0000003b, +0x3c8d48b2,0x0004002b,0x00000006,0x0000003c, +0xbda9d8d5,0x0004002b,0x00000006,0x0000003d, +0xbe02efc2,0x0004002b,0x00000006,0x0000003e, +0xbd9c2952,0x0007002c,0x0000000c,0x0000003f, +0x0000003b,0x0000003c,0x0000003d,0x0000003e, +0x0004002b,0x00000006,0x00000040,0xbd72ecfd, +0x0004002b,0x00000006,0x00000041,0xbcfa07a6, +0x0004002b,0x00000006,0x00000042,0x3e07cd58, +0x0004002b,0x00000006,0x00000043,0xbead1a91, +0x0007002c,0x0000000c,0x00000044,0x00000040, +0x00000041,0x00000042,0x00000043,0x0004002b, +0x00000006,0x00000045,0xbd94059d,0x0004002b, +0x00000006,0x00000046,0xbe4a4b0b,0x0004002b, +0x00000006,0x00000047,0xbcb72cef,0x0004002b, +0x00000006,0x00000048,0x3e668161,0x0007002c, +0x0000000c,0x00000049,0x00000045,0x00000046, +0x00000047,0x00000048,0x0007002c,0x00000035, +0x0000004a,0x0000003a,0x0000003f,0x00000044, +0x00000049,0x0004003b,0x00000009,0x0000004b, +0x00000000,0x0004002b,0x00000006,0x00000053, +0x3e32f656,0x0004002b,0x00000006,0x00000054, +0x3cf370d4,0x0004002b,0x00000006,0x00000055, +0x3dd808d2,0x0004002b,0x00000006,0x00000056, +0x3da483d6,0x0007002c,0x0000000c,0x00000057, +0x00000053,0x00000054,0x00000055,0x00000056, +0x0004002b,0x00000006,0x00000058,0xbd0a7e02, +0x0004002b,0x00000006,0x00000059,0xbec6ee6d, +0x0004002b,0x00000006,0x0000005a,0xbeb542b9, +0x0004002b,0x00000006,0x0000005b,0xbd9360ff, +0x0007002c,0x0000000c,0x0000005c,0x00000058, +0x00000059,0x0000005a,0x0000005b,0x0004002b, +0x00000006,0x0000005d,0xbd865a76,0x0004002b, +0x00000006,0x0000005e,0xbd401ab0,0x0004002b, +0x00000006,0x0000005f,0x3e0d40a8,0x0004002b, +0x00000006,0x00000060,0x3d030429,0x0007002c, +0x0000000c,0x00000061,0x0000005d,0x0000005e, +0x0000005f,0x00000060,0x0004002b,0x00000006, +0x00000062,0x3da3d3ab,0x0004002b,0x00000006, +0x00000063,0xbc22691c,0x0004002b,0x00000006, +0x00000064,0x3e2dec01,0x0004002b,0x00000006, +0x00000065,0xbc30f8e4,0x0007002c,0x0000000c, +0x00000066,0x00000062,0x00000063,0x00000064, +0x00000065,0x0007002c,0x00000035,0x00000067, +0x00000057,0x0000005c,0x00000061,0x00000066, +0x0004003b,0x00000009,0x00000068,0x00000000, +0x0004002b,0x00000006,0x0000006e,0x3e2299cc, +0x0004002b,0x00000006,0x0000006f,0x3ecc9115, +0x0004002b,0x00000006,0x00000070,0xbd087d57, +0x0004002b,0x00000006,0x00000071,0x3e7305c7, +0x0007002c,0x0000000c,0x00000072,0x0000006e, +0x0000006f,0x00000070,0x00000071,0x0004002b, +0x00000006,0x00000073,0xbe2592e0,0x0004002b, +0x00000006,0x00000074,0x3d870058,0x0004002b, +0x00000006,0x00000075,0x3c673a21,0x0004002b, +0x00000006,0x00000076,0xbd5d9a4a,0x0007002c, +0x0000000c,0x00000077,0x00000073,0x00000074, +0x00000075,0x00000076,0x0004002b,0x00000006, +0x00000078,0xbf130a31,0x0004002b,0x00000006, +0x00000079,0x3de5ae42,0x0004002b,0x00000006, +0x0000007a,0x3eda1a48,0x0004002b,0x00000006, +0x0000007b,0x3ce60707,0x0007002c,0x0000000c, +0x0000007c,0x00000078,0x00000079,0x0000007a, +0x0000007b,0x0004002b,0x00000006,0x0000007d, +0xbebe8d41,0x0004002b,0x00000006,0x0000007e, +0xbeb303ad,0x0004002b,0x00000006,0x0000007f, +0x3dcc3dd7,0x0004002b,0x00000006,0x00000080, +0xbc02f111,0x0007002c,0x0000000c,0x00000081, +0x0000007d,0x0000007e,0x0000007f,0x00000080, +0x0007002c,0x00000035,0x00000082,0x00000072, +0x00000077,0x0000007c,0x00000081,0x0004002b, +0x00000006,0x00000083,0x00000000,0x0004002b, +0x00000006,0x0000008a,0x3dbe1255,0x0004002b, +0x00000006,0x0000008b,0x3e9f1cb4,0x0004002b, +0x00000006,0x0000008c,0x3e0cd4aa,0x0004002b, +0x00000006,0x0000008d,0x3e1ec882,0x0007002c, +0x0000000c,0x0000008e,0x0000008a,0x0000008b, +0x0000008c,0x0000008d,0x0004002b,0x00000006, +0x0000008f,0xbd9fd105,0x0004002b,0x00000006, +0x00000090,0xbc28af9d,0x0004002b,0x00000006, +0x00000091,0xbe529c86,0x0004002b,0x00000006, +0x00000092,0xbec91cd0,0x0007002c,0x0000000c, +0x00000093,0x0000008f,0x00000090,0x00000091, +0x00000092,0x0004002b,0x00000006,0x00000094, +0xbf9b091a,0x0004002b,0x00000006,0x00000095, +0x3caebb62,0x0004002b,0x00000006,0x00000096, +0x3e0f0197,0x0004002b,0x00000006,0x00000097, +0x3d49879f,0x0007002c,0x0000000c,0x00000098, +0x00000094,0x00000095,0x00000096,0x00000097, +0x0004002b,0x00000006,0x00000099,0xbd691cc8, +0x0004002b,0x00000006,0x0000009a,0xbe2d3fc9, +0x0004002b,0x00000006,0x0000009b,0xbe1d37a4, +0x0004002b,0x00000006,0x0000009c,0x3e8f6805, +0x0007002c,0x0000000c,0x0000009d,0x00000099, +0x0000009a,0x0000009b,0x0000009c,0x0007002c, +0x00000035,0x0000009e,0x0000008e,0x00000093, +0x00000098,0x0000009d,0x0004002b,0x00000006, +0x000000a4,0x3e7f7638,0x0004002b,0x00000006, +0x000000a5,0xbd14b64f,0x0004002b,0x00000006, +0x000000a6,0x3dc470a2,0x0004002b,0x00000006, +0x000000a7,0xbb9d9eac,0x0007002c,0x0000000c, +0x000000a8,0x000000a4,0x000000a5,0x000000a6, +0x000000a7,0x0004002b,0x00000006,0x000000a9, +0xbca064f5,0x0004002b,0x00000006,0x000000aa, +0x3d38cc39,0x0004002b,0x00000006,0x000000ab, +0x3e169b6f,0x0004002b,0x00000006,0x000000ac, +0xbba40940,0x0007002c,0x0000000c,0x000000ad, +0x000000a9,0x000000aa,0x000000ab,0x000000ac, +0x0004002b,0x00000006,0x000000ae,0x3e93cff0, +0x0004002b,0x00000006,0x000000af,0xbea4ec3b, +0x0004002b,0x00000006,0x000000b0,0xbf34ca35, +0x0004002b,0x00000006,0x000000b1,0x3e289e34, +0x0007002c,0x0000000c,0x000000b2,0x000000ae, +0x000000af,0x000000b0,0x000000b1,0x0004002b, +0x00000006,0x000000b3,0xbc1795ec,0x0004002b, +0x00000006,0x000000b4,0xbe0074f3,0x0004002b, +0x00000006,0x000000b5,0x3cb22e78,0x0004002b, +0x00000006,0x000000b6,0xbd8b0501,0x0007002c, +0x0000000c,0x000000b7,0x000000b3,0x000000b4, +0x000000b5,0x000000b6,0x0007002c,0x00000035, +0x000000b8,0x000000a8,0x000000ad,0x000000b2, +0x000000b7,0x0004002b,0x00000006,0x000000c0, +0xbd8c9b62,0x0004002b,0x00000006,0x000000c1, +0xbd29c67e,0x0004002b,0x00000006,0x000000c2, +0xbe3e0cb9,0x0004002b,0x00000006,0x000000c3, +0x3cd88d72,0x0007002c,0x0000000c,0x000000c4, +0x000000c0,0x000000c1,0x000000c2,0x000000c3, +0x0004002b,0x00000006,0x000000c5,0xbcf32f73, +0x0004002b,0x00000006,0x000000c6,0xbd30c7d6, +0x0004002b,0x00000006,0x000000c7,0x3d8917af, +0x0004002b,0x00000006,0x000000c8,0xbdc1c1aa, +0x0007002c,0x0000000c,0x000000c9,0x000000c5, +0x000000c6,0x000000c7,0x000000c8,0x0004002b, +0x00000006,0x000000ca,0xbe50947d,0x0004002b, +0x00000006,0x000000cb,0xbe08d11b,0x0004002b, +0x00000006,0x000000cc,0xbe5707b9,0x0004002b, +0x00000006,0x000000cd,0xbe07fb12,0x0007002c, +0x0000000c,0x000000ce,0x000000ca,0x000000cb, +0x000000cc,0x000000cd,0x0004002b,0x00000006, +0x000000cf,0xbdcd3dcb,0x0004002b,0x00000006, +0x000000d0,0xbd16f7fa,0x0004002b,0x00000006, +0x000000d1,0xbe2a1526,0x0004002b,0x00000006, +0x000000d2,0x3d952750,0x0007002c,0x0000000c, +0x000000d3,0x000000cf,0x000000d0,0x000000d1, +0x000000d2,0x0007002c,0x00000035,0x000000d4, +0x000000c4,0x000000c9,0x000000ce,0x000000d3, +0x0004002b,0x00000006,0x000000da,0x3f0ce91e, +0x0004002b,0x00000006,0x000000db,0x3e967d1c, +0x0004002b,0x00000006,0x000000dc,0x3ef0e202, +0x0004002b,0x00000006,0x000000dd,0x3e5a0ff0, +0x0007002c,0x0000000c,0x000000de,0x000000da, +0x000000db,0x000000dc,0x000000dd,0x0004002b, +0x00000006,0x000000df,0x3dacab13,0x0004002b, +0x00000006,0x000000e0,0xbe4a9c74,0x0004002b, +0x00000006,0x000000e1,0xbea8de7e,0x0004002b, +0x00000006,0x000000e2,0x3e4483e7,0x0007002c, +0x0000000c,0x000000e3,0x000000df,0x000000e0, +0x000000e1,0x000000e2,0x0004002b,0x00000006, +0x000000e4,0x3e4ad3f9,0x0004002b,0x00000006, +0x000000e5,0xbd83fa5e,0x0004002b,0x00000006, +0x000000e6,0x3c155f84,0x0004002b,0x00000006, +0x000000e7,0xbe5995d9,0x0007002c,0x0000000c, +0x000000e8,0x000000e4,0x000000e5,0x000000e6, +0x000000e7,0x0004002b,0x00000006,0x000000e9, +0x3da4c609,0x0004002b,0x00000006,0x000000ea, +0xbde77673,0x0004002b,0x00000006,0x000000eb, +0xbf20aeac,0x0004002b,0x00000006,0x000000ec, +0x3e3e9549,0x0007002c,0x0000000c,0x000000ed, +0x000000e9,0x000000ea,0x000000eb,0x000000ec, +0x0007002c,0x00000035,0x000000ee,0x000000de, +0x000000e3,0x000000e8,0x000000ed,0x0004002b, +0x00000006,0x000000f5,0xbeabe9a2,0x0004002b, +0x00000006,0x000000f6,0x3e565d93,0x0004002b, +0x00000006,0x000000f7,0x3edeff51,0x0004002b, +0x00000006,0x000000f8,0x3e1ec580,0x0007002c, +0x0000000c,0x000000f9,0x000000f5,0x000000f6, +0x000000f7,0x000000f8,0x0004002b,0x00000006, +0x000000fa,0xbf26ae41,0x0004002b,0x00000006, +0x000000fb,0xbe3363e4,0x0004002b,0x00000006, +0x000000fc,0xbe52f615,0x0004002b,0x00000006, +0x000000fd,0xbe2f2000,0x0007002c,0x0000000c, +0x000000fe,0x000000fa,0x000000fb,0x000000fc, +0x000000fd,0x0004002b,0x00000006,0x000000ff, +0xbdf63e4f,0x0004002b,0x00000006,0x00000100, +0xbe800427,0x0004002b,0x00000006,0x00000101, +0x3ddc1b9d,0x0004002b,0x00000006,0x00000102, +0xbe77a5ce,0x0007002c,0x0000000c,0x00000103, +0x000000ff,0x00000100,0x00000101,0x00000102, +0x0004002b,0x00000006,0x00000104,0x3c5b7869, +0x0004002b,0x00000006,0x00000105,0xbd63b0e2, +0x0004002b,0x00000006,0x00000106,0x3e1b1a45, +0x0004002b,0x00000006,0x00000107,0x3e8c3e23, +0x0007002c,0x0000000c,0x00000108,0x00000104, +0x00000105,0x00000106,0x00000107,0x0007002c, +0x00000035,0x00000109,0x000000f9,0x000000fe, +0x00000103,0x00000108,0x0004002b,0x00000006, +0x0000010f,0xbe99ebd4,0x0004002b,0x00000006, +0x00000110,0xbe8a3685,0x0004002b,0x00000006, +0x00000111,0xbe4af54c,0x0004002b,0x00000006, +0x00000112,0xbb57f534,0x0007002c,0x0000000c, +0x00000113,0x0000010f,0x00000110,0x00000111, +0x00000112,0x0004002b,0x00000006,0x00000114, +0x3cfc2d43,0x0004002b,0x00000006,0x00000115, +0x3ebbfc37,0x0004002b,0x00000006,0x00000116, +0xbdc5d745,0x0004002b,0x00000006,0x00000117, +0xbe913b50,0x0007002c,0x0000000c,0x00000118, +0x00000114,0x00000115,0x00000116,0x00000117, +0x0004002b,0x00000006,0x00000119,0x3edc051a, +0x0004002b,0x00000006,0x0000011a,0x3f1e0030, +0x0004002b,0x00000006,0x0000011b,0x3f2c1f06, +0x0004002b,0x00000006,0x0000011c,0x3e8a8084, +0x0007002c,0x0000000c,0x0000011d,0x00000119, +0x0000011a,0x0000011b,0x0000011c,0x0004002b, +0x00000006,0x0000011e,0xbe134403,0x0004002b, +0x00000006,0x0000011f,0xbdb2fbaa,0x0004002b, +0x00000006,0x00000120,0xbf3339f5,0x0004002b, +0x00000006,0x00000121,0xbe522683,0x0007002c, +0x0000000c,0x00000122,0x0000011e,0x0000011f, +0x00000120,0x00000121,0x0007002c,0x00000035, +0x00000123,0x00000113,0x00000118,0x0000011d, +0x00000122,0x0004002b,0x00000006,0x0000012a, +0xbe933386,0x0004002b,0x00000006,0x0000012b, +0xbfcfc04b,0x0004002b,0x00000006,0x0000012c, +0xbf2c6000,0x0004002b,0x00000006,0x0000012d, +0xbf76d8c0,0x0007002c,0x0000000c,0x0000012e, +0x0000012a,0x0000012b,0x0000012c,0x0000012d, +0x0004002b,0x00000006,0x0000012f,0xbe493644, +0x0004002b,0x00000006,0x00000130,0x3e7e8c15, +0x0004002b,0x00000006,0x00000131,0x3dfd5134, +0x0004002b,0x00000006,0x00000132,0xbf9239f9, +0x0007002c,0x0000000c,0x00000133,0x0000012f, +0x00000130,0x00000131,0x00000132,0x0004002b, +0x00000006,0x00000134,0xbd29008e,0x0004002b, +0x00000006,0x00000135,0x3eaeb1cd,0x0004002b, +0x00000006,0x00000136,0x3ecae523,0x0004002b, +0x00000006,0x00000137,0xbe7f0dd4,0x0007002c, +0x0000000c,0x00000138,0x00000134,0x00000135, +0x00000136,0x00000137,0x0004002b,0x00000006, +0x00000139,0xbbbe44f0,0x0004002b,0x00000006, +0x0000013a,0xbeea6e0d,0x0004002b,0x00000006, +0x0000013b,0xbe77a13d,0x0004002b,0x00000006, +0x0000013c,0x3f0928da,0x0007002c,0x0000000c, +0x0000013d,0x00000139,0x0000013a,0x0000013b, +0x0000013c,0x0007002c,0x00000035,0x0000013e, +0x0000012e,0x00000133,0x00000138,0x0000013d, +0x0004002b,0x00000006,0x00000144,0x3bcc58cc, +0x0004002b,0x00000006,0x00000145,0x3e4524c0, +0x0004002b,0x00000006,0x00000146,0x3da8f490, +0x0004002b,0x00000006,0x00000147,0x3d65e5f7, +0x0007002c,0x0000000c,0x00000148,0x00000144, +0x00000145,0x00000146,0x00000147,0x0004002b, +0x00000006,0x00000149,0x3dbe6590,0x0004002b, +0x00000006,0x0000014a,0x3d8f0fee,0x0004002b, +0x00000006,0x0000014b,0x3ec36d64,0x0004002b, +0x00000006,0x0000014c,0x3d21e4cd,0x0007002c, +0x0000000c,0x0000014d,0x00000149,0x0000014a, +0x0000014b,0x0000014c,0x0004002b,0x00000006, +0x0000014e,0xbd935b27,0x0004002b,0x00000006, +0x0000014f,0x3d6763e2,0x0004002b,0x00000006, +0x00000150,0xbe04e4a1,0x0004002b,0x00000006, +0x00000151,0x3dff14af,0x0007002c,0x0000000c, +0x00000152,0x0000014e,0x0000014f,0x00000150, +0x00000151,0x0004002b,0x00000006,0x00000153, +0x3aa1f350,0x0004002b,0x00000006,0x00000154, +0xbdcadb8d,0x0004002b,0x00000006,0x00000155, +0x3ed7bb72,0x0004002b,0x00000006,0x00000156, +0xbe288819,0x0007002c,0x0000000c,0x00000157, +0x00000153,0x00000154,0x00000155,0x00000156, +0x0007002c,0x00000035,0x00000158,0x00000148, +0x0000014d,0x00000152,0x00000157,0x0004002b, +0x00000006,0x0000015f,0xbd7aa62d,0x0004002b, +0x00000006,0x00000160,0xbcb46f7c,0x0004002b, +0x00000006,0x00000161,0xbb862300,0x0004002b, +0x00000006,0x00000162,0xbdd927bf,0x0007002c, +0x0000000c,0x00000163,0x0000015f,0x00000160, +0x00000161,0x00000162,0x0004002b,0x00000006, +0x00000164,0xbd6edc25,0x0004002b,0x00000006, +0x00000165,0xbc8ce68b,0x0004002b,0x00000006, +0x00000166,0x3dd8ca4d,0x0004002b,0x00000006, +0x00000167,0x3e8f02a6,0x0007002c,0x0000000c, +0x00000168,0x00000164,0x00000165,0x00000166, +0x00000167,0x0004002b,0x00000006,0x00000169, +0xbe6f8bcb,0x0004002b,0x00000006,0x0000016a, +0xbe49ef0c,0x0004002b,0x00000006,0x0000016b, +0xbd760a9e,0x0004002b,0x00000006,0x0000016c, +0xbd8c292c,0x0007002c,0x0000000c,0x0000016d, +0x00000169,0x0000016a,0x0000016b,0x0000016c, +0x0004002b,0x00000006,0x0000016e,0x3cc71428, +0x0004002b,0x00000006,0x0000016f,0xbe582cae, +0x0004002b,0x00000006,0x00000170,0xbe513348, +0x0004002b,0x00000006,0x00000171,0x3d94736e, +0x0007002c,0x0000000c,0x00000172,0x0000016e, +0x0000016f,0x00000170,0x00000171,0x0007002c, +0x00000035,0x00000173,0x00000163,0x00000168, +0x0000016d,0x00000172,0x0004002b,0x00000006, +0x00000179,0xbdaab0ad,0x0004002b,0x00000006, +0x0000017a,0xbd5a6846,0x0004002b,0x00000006, +0x0000017b,0x3d9d3ef5,0x0004002b,0x00000006, +0x0000017c,0x3df2251d,0x0007002c,0x0000000c, +0x0000017d,0x00000179,0x0000017a,0x0000017b, +0x0000017c,0x0004002b,0x00000006,0x0000017e, +0xbcb6ed36,0x0004002b,0x00000006,0x0000017f, +0xbd4456f2,0x0004002b,0x00000006,0x00000180, +0xbc44295a,0x0004002b,0x00000006,0x00000181, +0x3d56f790,0x0007002c,0x0000000c,0x00000182, +0x0000017e,0x0000017f,0x00000180,0x00000181, +0x0004002b,0x00000006,0x00000183,0xbd092044, +0x0004002b,0x00000006,0x00000184,0x3d93406c, +0x0004002b,0x00000006,0x00000185,0x3d3418c4, +0x0004002b,0x00000006,0x00000186,0x3d42a25d, +0x0007002c,0x0000000c,0x00000187,0x00000183, +0x00000184,0x00000185,0x00000186,0x0004002b, +0x00000006,0x00000188,0x3d9c87c7,0x0004002b, +0x00000006,0x00000189,0x3c0e1267,0x0004002b, +0x00000006,0x0000018a,0xbe2e2709,0x0004002b, +0x00000006,0x0000018b,0x3d86a04c,0x0007002c, +0x0000000c,0x0000018c,0x00000188,0x00000189, +0x0000018a,0x0000018b,0x0007002c,0x00000035, +0x0000018d,0x0000017d,0x00000182,0x00000187, +0x0000018c,0x0004002b,0x00000006,0x00000194, +0x3e0e827d,0x0004002b,0x00000006,0x00000195, +0x3d977453,0x0004002b,0x00000006,0x00000196, +0x3d67bfa6,0x0004002b,0x00000006,0x00000197, +0xbd304701,0x0007002c,0x0000000c,0x00000198, +0x00000194,0x00000195,0x00000196,0x00000197, +0x0004002b,0x00000006,0x00000199,0x3dc124cb, +0x0004002b,0x00000006,0x0000019a,0x3c2738d5, +0x0004002b,0x00000006,0x0000019b,0x3c45e934, +0x0004002b,0x00000006,0x0000019c,0xbdac4c8f, +0x0007002c,0x0000000c,0x0000019d,0x00000199, +0x0000019a,0x0000019b,0x0000019c,0x0004002b, +0x00000006,0x0000019e,0x3e2119b4,0x0004002b, +0x00000006,0x0000019f,0x3c8693e7,0x0004002b, +0x00000006,0x000001a0,0x3dca83c4,0x0004002b, +0x00000006,0x000001a1,0xbe127eac,0x0007002c, +0x0000000c,0x000001a2,0x0000019e,0x0000019f, +0x000001a0,0x000001a1,0x0004002b,0x00000006, +0x000001a3,0xbd6a9f5d,0x0004002b,0x00000006, +0x000001a4,0xbdace93e,0x0004002b,0x00000006, +0x000001a5,0x3d7e97e1,0x0004002b,0x00000006, +0x000001a6,0x3dbd31ad,0x0007002c,0x0000000c, +0x000001a7,0x000001a3,0x000001a4,0x000001a5, +0x000001a6,0x0007002c,0x00000035,0x000001a8, +0x00000198,0x0000019d,0x000001a2,0x000001a7, +0x0004002b,0x00000006,0x000001ae,0xbdfa7e14, +0x0004002b,0x00000006,0x000001af,0xbe7a0dbd, +0x0004002b,0x00000006,0x000001b0,0xbe76d9c4, +0x0004002b,0x00000006,0x000001b1,0xbc857a19, +0x0007002c,0x0000000c,0x000001b2,0x000001ae, +0x000001af,0x000001b0,0x000001b1,0x0004002b, +0x00000006,0x000001b3,0x3d8e73c8,0x0004002b, +0x00000006,0x000001b4,0xbb3b5382,0x0004002b, +0x00000006,0x000001b5,0xbbc2b2cc,0x0004002b, +0x00000006,0x000001b6,0x3d927733,0x0007002c, +0x0000000c,0x000001b7,0x000001b3,0x000001b4, +0x000001b5,0x000001b6,0x0004002b,0x00000006, +0x000001b8,0xbd88e839,0x0004002b,0x00000006, +0x000001b9,0xbe198e64,0x0004002b,0x00000006, +0x000001ba,0x3db22913,0x0004002b,0x00000006, +0x000001bb,0x3d62c6b7,0x0007002c,0x0000000c, +0x000001bc,0x000001b8,0x000001b9,0x000001ba, +0x000001bb,0x0004002b,0x00000006,0x000001bd, +0x3e8bc0f8,0x0004002b,0x00000006,0x000001be, +0x3e0c4ac4,0x0004002b,0x00000006,0x000001bf, +0xbe034bac,0x0004002b,0x00000006,0x000001c0, +0xbe14aba4,0x0007002c,0x0000000c,0x000001c1, +0x000001bd,0x000001be,0x000001bf,0x000001c0, +0x0007002c,0x00000035,0x000001c2,0x000001b2, +0x000001b7,0x000001bc,0x000001c1,0x0004002b, +0x00000006,0x000001c9,0x3e086454,0x0004002b, +0x00000006,0x000001ca,0x3b0a25ce,0x0004002b, +0x00000006,0x000001cb,0xbde4b50c,0x0004002b, +0x00000006,0x000001cc,0xbed56eb3,0x0007002c, +0x0000000c,0x000001cd,0x000001c9,0x000001ca, +0x000001cb,0x000001cc,0x0004002b,0x00000006, +0x000001ce,0x3d5aff1c,0x0004002b,0x00000006, +0x000001cf,0x3b781fdc,0x0004002b,0x00000006, +0x000001d0,0xbd15f0cb,0x0004002b,0x00000006, +0x000001d1,0x3dd691c0,0x0007002c,0x0000000c, +0x000001d2,0x000001ce,0x000001cf,0x000001d0, +0x000001d1,0x0004002b,0x00000006,0x000001d3, +0x3e18b482,0x0004002b,0x00000006,0x000001d4, +0x3da0393c,0x0004002b,0x00000006,0x000001d5, +0x3dc289db,0x0004002b,0x00000006,0x000001d6, +0xbdedc10c,0x0007002c,0x0000000c,0x000001d7, +0x000001d3,0x000001d4,0x000001d5,0x000001d6, +0x0004002b,0x00000006,0x000001d8,0xbdd8803b, +0x0004002b,0x00000006,0x000001d9,0xbe8a39c1, +0x0004002b,0x00000006,0x000001da,0xbdf46395, +0x0004002b,0x00000006,0x000001db,0x3e5b5f39, +0x0007002c,0x0000000c,0x000001dc,0x000001d8, +0x000001d9,0x000001da,0x000001db,0x0007002c, +0x00000035,0x000001dd,0x000001cd,0x000001d2, +0x000001d7,0x000001dc,0x0004002b,0x00000006, +0x000001e3,0x3b88336c,0x0004002b,0x00000006, +0x000001e4,0xbdda36e1,0x0004002b,0x00000006, +0x000001e5,0xbd80f44d,0x0004002b,0x00000006, +0x000001e6,0xbdea72dc,0x0007002c,0x0000000c, +0x000001e7,0x000001e3,0x000001e4,0x000001e5, +0x000001e6,0x0004002b,0x00000006,0x000001e8, +0x3d029db0,0x0004002b,0x00000006,0x000001e9, +0xbd66686d,0x0004002b,0x00000006,0x000001ea, +0x3b8e4969,0x0004002b,0x00000006,0x000001eb, +0x3cb9350a,0x0007002c,0x0000000c,0x000001ec, +0x000001e8,0x000001e9,0x000001ea,0x000001eb, +0x0004002b,0x00000006,0x000001ed,0xbe151d62, +0x0004002b,0x00000006,0x000001ee,0xbe759f55, +0x0004002b,0x00000006,0x000001ef,0xbe866703, +0x0004002b,0x00000006,0x000001f0,0xbd918521, +0x0007002c,0x0000000c,0x000001f1,0x000001ed, +0x000001ee,0x000001ef,0x000001f0,0x0004002b, +0x00000006,0x000001f2,0x3bde822d,0x0004002b, +0x00000006,0x000001f3,0x3af30fa3,0x0004002b, +0x00000006,0x000001f4,0x3dd0c33d,0x0004002b, +0x00000006,0x000001f5,0xbc987b1f,0x0007002c, +0x0000000c,0x000001f6,0x000001f2,0x000001f3, +0x000001f4,0x000001f5,0x0007002c,0x00000035, +0x000001f7,0x000001e7,0x000001ec,0x000001f1, +0x000001f6,0x0004002b,0x00000006,0x000001fe, +0x3d9605c9,0x0004002b,0x00000006,0x000001ff, +0x3e1b5392,0x0004002b,0x00000006,0x00000200, +0x3d6da6f6,0x0004002b,0x00000006,0x00000201, +0x3e499f8d,0x0007002c,0x0000000c,0x00000202, +0x000001fe,0x000001ff,0x00000200,0x00000201, +0x0004002b,0x00000006,0x00000203,0xbbda4c82, +0x0004002b,0x00000006,0x00000204,0xbe239e79, +0x0004002b,0x00000006,0x00000205,0xbdcadfff, +0x0004002b,0x00000006,0x00000206,0xbdd8ec01, +0x0007002c,0x0000000c,0x00000207,0x00000203, +0x00000204,0x00000205,0x00000206,0x0004002b, +0x00000006,0x00000208,0x3d93251b,0x0004002b, +0x00000006,0x00000209,0xbe639bc3,0x0004002b, +0x00000006,0x0000020a,0xbe2b9762,0x0004002b, +0x00000006,0x0000020b,0xbe199a0d,0x0007002c, +0x0000000c,0x0000020c,0x00000208,0x00000209, +0x0000020a,0x0000020b,0x0004002b,0x00000006, +0x0000020d,0xbd68f8d0,0x0004002b,0x00000006, +0x0000020e,0xbd6eb4b2,0x0004002b,0x00000006, +0x0000020f,0xbdacf8b6,0x0004002b,0x00000006, +0x00000210,0xbcd7aaf8,0x0007002c,0x0000000c, +0x00000211,0x0000020d,0x0000020e,0x0000020f, +0x00000210,0x0007002c,0x00000035,0x00000212, +0x00000202,0x00000207,0x0000020c,0x00000211, +0x0007002c,0x0000000c,0x00000219,0x00000083, +0x00000083,0x00000083,0x00000083,0x0004002b, +0x00000006,0x0000021b,0xbe7bdb15,0x0004002b, +0x00000006,0x0000021c,0x3f419fec,0x0004002b, +0x00000006,0x0000021d,0xbd9083b1,0x0004002b, +0x00000006,0x0000021e,0xbc1b5aa0,0x0007002c, +0x0000000c,0x0000021f,0x0000021b,0x0000021c, +0x0000021d,0x0000021e,0x00040015,0x00000227, +0x00000020,0x00000000,0x00040017,0x00000228, +0x00000227,0x00000003,0x00040020,0x00000229, +0x00000001,0x00000228,0x0004003b,0x00000229, +0x0000022a,0x00000001,0x00040017,0x0000022b, +0x00000227,0x00000002,0x00020014,0x0000022f, +0x0004002b,0x00000227,0x00000230,0x00000000, +0x00040020,0x00000234,0x00000009,0x00000016, +0x0004002b,0x00000227,0x0000023b,0x00000001, +0x00090019,0x00000245,0x00000006,0x00000001, +0x00000000,0x00000000,0x00000000,0x00000002, +0x00000002,0x00040020,0x00000246,0x00000000, +0x00000245,0x0004003b,0x00000246,0x00000247, +0x00000000,0x0004002b,0x00000227,0x0000024b, +0x00000010,0x0006002c,0x00000228,0x0000024c, +0x0000024b,0x0000024b,0x0000023b,0x0004002b, +0x00000016,0x000003b8,0xffffffff,0x0005002c, +0x00000017,0x000003b9,0x000003b8,0x000003b8, +0x0005002c,0x00000017,0x000003ba,0x00000026, +0x00000026,0x0005002c,0x00000017,0x000003bb, +0x000003b8,0x0000001e,0x0005002c,0x00000017, +0x000003bc,0x000003b8,0x00000026,0x0005002c, +0x00000017,0x000003bd,0x0000001e,0x000003b8, +0x0005002c,0x00000017,0x000003be,0x0000001e, +0x00000026,0x0005002c,0x00000017,0x000003bf, +0x00000026,0x000003b8,0x0005002c,0x00000017, +0x000003c0,0x00000026,0x0000001e,0x00050036, +0x00000002,0x00000004,0x00000000,0x00000003, +0x000200f8,0x00000005,0x000300f7,0x0000024e, +0x00000000,0x000300fb,0x00000230,0x0000024f, +0x000200f8,0x0000024f,0x0004003d,0x00000228, +0x0000022c,0x0000022a,0x0007004f,0x0000022b, +0x0000022d,0x0000022c,0x0000022c,0x00000000, +0x00000001,0x0004007c,0x00000017,0x0000022e, +0x0000022d,0x00050051,0x00000016,0x00000233, +0x0000022e,0x00000000,0x00060041,0x00000234, +0x00000235,0x00000022,0x0000001e,0x00000230, +0x0004003d,0x00000016,0x00000236,0x00000235, +0x000500af,0x0000022f,0x00000237,0x00000233, +0x00000236,0x000400a8,0x0000022f,0x00000238, +0x00000237,0x000300f7,0x0000023a,0x00000000, +0x000400fa,0x00000238,0x00000239,0x0000023a, +0x000200f8,0x00000239,0x00050051,0x00000016, +0x0000023d,0x0000022e,0x00000001,0x00060041, +0x00000234,0x0000023e,0x00000022,0x0000001e, +0x0000023b,0x0004003d,0x00000016,0x0000023f, +0x0000023e,0x000500af,0x0000022f,0x00000240, +0x0000023d,0x0000023f,0x000200f9,0x0000023a, +0x000200f8,0x0000023a,0x000700f5,0x0000022f, +0x00000241,0x00000237,0x0000024f,0x00000240, +0x00000239,0x000300f7,0x00000243,0x00000000, +0x000400fa,0x00000241,0x00000242,0x00000243, +0x000200f8,0x00000242,0x000200f9,0x0000024e, +0x000200f8,0x00000243,0x0004003d,0x00000245, +0x00000248,0x00000247,0x0004003d,0x00000008, +0x000002ba,0x0000004b,0x00050080,0x00000017, +0x000002be,0x0000022e,0x000003b9,0x00050041, +0x00000023,0x000002bf,0x00000022,0x0000001e, +0x0004003d,0x00000017,0x000002c0,0x000002bf, +0x00050082,0x00000017,0x000002c2,0x000002c0, +0x000003ba,0x0008000c,0x00000017,0x000002c3, +0x00000001,0x0000002d,0x000002be,0x0000001f, +0x000002c2,0x00040064,0x00000007,0x000002c4, +0x000002ba,0x0007005f,0x0000000c,0x000002c5, +0x000002c4,0x000002c3,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x0000026a,0x0000004a, +0x000002c5,0x00050081,0x0000000c,0x0000026c, +0x00000034,0x0000026a,0x0004003d,0x00000008, +0x000002c8,0x00000068,0x00040064,0x00000007, +0x000002d2,0x000002c8,0x0007005f,0x0000000c, +0x000002d3,0x000002d2,0x000002c3,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x0000026e, +0x00000067,0x000002d3,0x00050081,0x0000000c, +0x00000270,0x0000026c,0x0000026e,0x0004003d, +0x00000008,0x000002d6,0x0000004b,0x00050080, +0x00000017,0x000002da,0x0000022e,0x000003bb, +0x0008000c,0x00000017,0x000002df,0x00000001, +0x0000002d,0x000002da,0x0000001f,0x000002c2, +0x00040064,0x00000007,0x000002e0,0x000002d6, +0x0007005f,0x0000000c,0x000002e1,0x000002e0, +0x000002df,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x00000272,0x00000082,0x000002e1, +0x00050081,0x0000000c,0x00000274,0x00000270, +0x00000272,0x0004003d,0x00000008,0x000002e4, +0x00000068,0x00040064,0x00000007,0x000002ee, +0x000002e4,0x0007005f,0x0000000c,0x000002ef, +0x000002ee,0x000002df,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x00000276,0x0000009e, +0x000002ef,0x00050081,0x0000000c,0x00000278, +0x00000274,0x00000276,0x0004003d,0x00000008, +0x000002f2,0x0000004b,0x00050080,0x00000017, +0x000002f6,0x0000022e,0x000003bc,0x0008000c, +0x00000017,0x000002fb,0x00000001,0x0000002d, +0x000002f6,0x0000001f,0x000002c2,0x00040064, +0x00000007,0x000002fc,0x000002f2,0x0007005f, +0x0000000c,0x000002fd,0x000002fc,0x000002fb, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x0000027a,0x000000b8,0x000002fd,0x00050081, +0x0000000c,0x0000027c,0x00000278,0x0000027a, +0x0004003d,0x00000008,0x00000300,0x00000068, +0x00040064,0x00000007,0x0000030a,0x00000300, +0x0007005f,0x0000000c,0x0000030b,0x0000030a, +0x000002fb,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x0000027e,0x000000d4,0x0000030b, +0x00050081,0x0000000c,0x00000280,0x0000027c, +0x0000027e,0x0004003d,0x00000008,0x0000030e, +0x0000004b,0x00050080,0x00000017,0x00000312, +0x0000022e,0x000003bd,0x0008000c,0x00000017, +0x00000317,0x00000001,0x0000002d,0x00000312, +0x0000001f,0x000002c2,0x00040064,0x00000007, +0x00000318,0x0000030e,0x0007005f,0x0000000c, +0x00000319,0x00000318,0x00000317,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x00000282, +0x000000ee,0x00000319,0x00050081,0x0000000c, +0x00000284,0x00000280,0x00000282,0x0004003d, +0x00000008,0x0000031c,0x00000068,0x00040064, +0x00000007,0x00000326,0x0000031c,0x0007005f, +0x0000000c,0x00000327,0x00000326,0x00000317, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x00000286,0x00000109,0x00000327,0x00050081, +0x0000000c,0x00000288,0x00000284,0x00000286, +0x0004003d,0x00000008,0x0000032a,0x0000004b, +0x0008000c,0x00000017,0x00000333,0x00000001, +0x0000002d,0x0000022e,0x0000001f,0x000002c2, +0x00040064,0x00000007,0x00000334,0x0000032a, +0x0007005f,0x0000000c,0x00000335,0x00000334, +0x00000333,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x0000028a,0x00000123,0x00000335, +0x00050081,0x0000000c,0x0000028c,0x00000288, +0x0000028a,0x0004003d,0x00000008,0x00000338, +0x00000068,0x00040064,0x00000007,0x00000342, +0x00000338,0x0007005f,0x0000000c,0x00000343, +0x00000342,0x00000333,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x0000028e,0x0000013e, +0x00000343,0x00050081,0x0000000c,0x00000290, +0x0000028c,0x0000028e,0x0004003d,0x00000008, +0x00000346,0x0000004b,0x00050080,0x00000017, +0x0000034a,0x0000022e,0x000003be,0x0008000c, +0x00000017,0x0000034f,0x00000001,0x0000002d, +0x0000034a,0x0000001f,0x000002c2,0x00040064, +0x00000007,0x00000350,0x00000346,0x0007005f, +0x0000000c,0x00000351,0x00000350,0x0000034f, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x00000292,0x00000158,0x00000351,0x00050081, +0x0000000c,0x00000294,0x00000290,0x00000292, +0x0004003d,0x00000008,0x00000354,0x00000068, +0x00040064,0x00000007,0x0000035e,0x00000354, +0x0007005f,0x0000000c,0x0000035f,0x0000035e, +0x0000034f,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x00000296,0x00000173,0x0000035f, +0x00050081,0x0000000c,0x00000298,0x00000294, +0x00000296,0x0004003d,0x00000008,0x00000362, +0x0000004b,0x00050080,0x00000017,0x00000366, +0x0000022e,0x000003bf,0x0008000c,0x00000017, +0x0000036b,0x00000001,0x0000002d,0x00000366, +0x0000001f,0x000002c2,0x00040064,0x00000007, +0x0000036c,0x00000362,0x0007005f,0x0000000c, +0x0000036d,0x0000036c,0x0000036b,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x0000029a, +0x0000018d,0x0000036d,0x00050081,0x0000000c, +0x0000029c,0x00000298,0x0000029a,0x0004003d, +0x00000008,0x00000370,0x00000068,0x00040064, +0x00000007,0x0000037a,0x00000370,0x0007005f, +0x0000000c,0x0000037b,0x0000037a,0x0000036b, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x0000029e,0x000001a8,0x0000037b,0x00050081, +0x0000000c,0x000002a0,0x0000029c,0x0000029e, +0x0004003d,0x00000008,0x0000037e,0x0000004b, +0x00050080,0x00000017,0x00000382,0x0000022e, +0x000003c0,0x0008000c,0x00000017,0x00000387, +0x00000001,0x0000002d,0x00000382,0x0000001f, +0x000002c2,0x00040064,0x00000007,0x00000388, +0x0000037e,0x0007005f,0x0000000c,0x00000389, +0x00000388,0x00000387,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x000002a2,0x000001c2, +0x00000389,0x00050081,0x0000000c,0x000002a4, +0x000002a0,0x000002a2,0x0004003d,0x00000008, +0x0000038c,0x00000068,0x00040064,0x00000007, +0x00000396,0x0000038c,0x0007005f,0x0000000c, +0x00000397,0x00000396,0x00000387,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x000002a6, +0x000001dd,0x00000397,0x00050081,0x0000000c, +0x000002a8,0x000002a4,0x000002a6,0x0004003d, +0x00000008,0x0000039a,0x0000004b,0x00050080, +0x00000017,0x0000039e,0x0000022e,0x000003ba, +0x0008000c,0x00000017,0x000003a3,0x00000001, +0x0000002d,0x0000039e,0x0000001f,0x000002c2, +0x00040064,0x00000007,0x000003a4,0x0000039a, +0x0007005f,0x0000000c,0x000003a5,0x000003a4, +0x000003a3,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x000002aa,0x000001f7,0x000003a5, +0x00050081,0x0000000c,0x000002ac,0x000002a8, +0x000002aa,0x0004003d,0x00000008,0x000003a8, +0x00000068,0x00040064,0x00000007,0x000003b2, +0x000003a8,0x0007005f,0x0000000c,0x000003b3, +0x000003b2,0x000003a3,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x000002ae,0x00000212, +0x000003b3,0x00050081,0x0000000c,0x000002b0, +0x000002ac,0x000002ae,0x0007000c,0x0000000c, +0x000002b2,0x00000001,0x00000028,0x000002b0, +0x00000219,0x0007000c,0x0000000c,0x000002b4, +0x00000001,0x00000025,0x000002b0,0x00000219, +0x00050085,0x0000000c,0x000002b5,0x0000021f, +0x000002b4,0x00050081,0x0000000c,0x000002b6, +0x000002b2,0x000002b5,0x00040063,0x00000248, +0x0000022e,0x000002b6,0x000200f9,0x0000024e, +0x000200f8,0x0000024e,0x000100fd,0x00010038} diff --git a/app/src/shaders/fsrcnnx/pass_06.comp b/app/src/shaders/fsrcnnx/pass_06.comp new file mode 100644 index 0000000..a0c623c --- /dev/null +++ b/app/src/shaders/fsrcnnx/pass_06.comp @@ -0,0 +1,46 @@ +#version 450 +// Generated by tools/gen_fsrcnnx.js from third_party/FSRCNNX_x2_8-0-4-1.glsl +// (FSRCNNX by igv, LGPL-3.0). Layer: mapping 2_2. Do not edit. +layout(local_size_x = 16, local_size_y = 16) in; +layout(binding = 0, rgba16f) uniform writeonly image2D dst; +layout(binding = 1) uniform sampler2D in0; +layout(binding = 2) uniform sampler2D in1; +layout(binding = 3) uniform sampler2D in2; +layout(push_constant) uniform Params { ivec2 size; } p; + +ivec2 at_; +vec4 fetch_(sampler2D s, vec2 o) { return texelFetch(s, clamp(at_ + ivec2(o), ivec2(0), p.size - 1), 0); } +#define MODEL21_texOff(o) fetch_(in0, vec2(o)) +#define MODEL22_texOff(o) fetch_(in1, vec2(o)) + +vec4 hook() +{ +vec4 res = vec4(-0.0448397286236286,-0.1649267971515656,-0.1192543581128120,-0.0061073559336364); +res += mat4(0.0724840760231018,-0.0480341166257858,-0.1082391515374184,-0.1447021961212158,0.0723197236657143,0.0481830574572086,0.0009448126656935,0.0353565886616707,-0.0653375908732414,0.0029647622723132,-0.0016588598955423,-0.2075651884078979,0.0403469167649746,0.3929971158504486,0.0342363268136978,0.1427230089902878) * MODEL21_texOff(vec2(-1,-1)); +res += mat4(-0.0743464827537537,0.1844420731067657,0.0256296340376139,-0.2808582782745361,0.0351609662175179,0.3277008235454559,-0.0205841138958931,-0.5355809330940247,0.0681906566023827,0.2058052271604538,-0.0479847639799118,-0.3735262751579285,-0.0261550359427929,-0.1148884072899818,-0.2329017966985703,0.0728458985686302) * MODEL22_texOff(vec2(-1,-1)); +res += mat4(-0.1236097738146782,0.1251334398984909,-0.1339431256055832,0.0198749266564846,-0.1325920224189758,-2.2431972026824951,-0.0680834427475929,-0.5671764612197876,-0.3431925177574158,-0.0983135104179382,-0.2207138091325760,-0.2374879121780396,0.0127309206873178,1.3076044321060181,0.0848151743412018,-0.1928595900535583) * MODEL21_texOff(vec2(-1,0)); +res += mat4(-0.0471093133091927,-0.1513628512620926,-0.0134263765066862,-0.1519252359867096,-0.5260242223739624,0.2291621714830399,0.4088975787162781,-0.4315340518951416,0.0933236032724380,-1.0386694669723511,0.0015958193689585,-0.2737887501716614,-0.0246253963559866,-0.2722961604595184,-0.1770633459091187,-0.2291279733181000) * MODEL22_texOff(vec2(-1,0)); +res += mat4(-0.0017552347853780,0.1903935521841049,-0.0740704238414764,-0.0917679518461227,0.0323882810771465,-0.3029108047485352,0.0532565414905548,-0.0651542618870735,0.4868686199188232,0.8539272546768188,0.4151960313320160,0.2619662582874298,-0.0413270294666290,0.1404227763414383,0.1027320474386215,0.3274228572845459) * MODEL21_texOff(vec2(-1,1)); +res += mat4(0.1828346252441406,0.0274682324379683,-0.1169882863759995,0.0327291004359722,0.1786244213581085,-0.6569546461105347,-0.0609031207859516,-0.1676601022481918,-0.1481092721223831,0.2889067530632019,0.1246089115738869,0.2203597426414490,-0.0366856977343559,0.1539470851421356,0.0069492300972342,-0.1544002443552017) * MODEL22_texOff(vec2(-1,1)); +res += mat4(0.2073992937803268,-0.0717074573040009,-0.0196173377335072,-0.0956910699605942,0.0728898122906685,0.0484567955136299,0.3063069283962250,-0.3200540542602539,0.0291527546942234,-0.0265460256487131,0.1168476045131683,-0.2479970753192902,0.1224220171570778,0.0745823010802269,0.1868897676467896,-0.1958049237728119) * MODEL21_texOff(vec2(0,-1)); +res += mat4(0.0019954447634518,-0.0225235987454653,0.0812198966741562,0.0295672398060560,-0.2016931176185608,-0.2239151000976562,-0.2481262385845184,-0.2381946444511414,-0.0520484372973442,-0.1200495883822441,0.2121954560279846,-0.1573531329631805,-0.0198472067713737,0.1001087054610252,-0.1084884032607079,-0.3126969039440155) * MODEL22_texOff(vec2(0,-1)); +res += mat4(0.3838330209255219,0.1678779572248459,0.6496244072914124,0.3783606290817261,-0.2198582738637924,-0.2351343184709549,-0.2852248847484589,0.6310021877288818,0.8083020448684692,0.0039323624223471,-0.0901831910014153,0.0797894075512886,-0.2271467447280884,0.7082978487014771,0.1513756662607193,0.2188975960016251) * MODEL21_texOff(vec2(0,0)); +res += mat4(-0.2871031761169434,0.2316448241472244,0.4947948157787323,0.3308620452880859,-0.0623455122113228,-0.1314185708761215,-0.2664661705493927,0.8725078701972961,0.4541083276271820,0.1433589160442352,-1.1269453763961792,0.6427971124649048,-0.1016561388969421,0.3418317139148712,-0.0991155728697777,-1.0508837699890137) * MODEL22_texOff(vec2(0,0)); +res += mat4(-0.2179604172706604,0.1258949041366577,-0.1155700981616974,-0.0536149404942989,-0.0140614463016391,-0.0091438721865416,-0.0501774959266186,-0.3570724725723267,-0.5832386016845703,0.2004123181104660,0.2986239194869995,-0.8139168024063110,0.0142666567116976,0.0681498944759369,0.1293468028306961,-0.1001938357949257) * MODEL21_texOff(vec2(0,1)); +res += mat4(0.1952836811542511,-0.3092494010925293,0.3063779771327972,0.1934849917888641,0.0746696740388870,-0.3533902466297150,-0.1269576102495193,-0.2237875163555145,0.2470717132091522,-0.2640363574028015,-0.2862776815891266,0.1740108281373978,-0.0963631942868233,0.2631850540637970,0.0400718413293362,-0.3590607047080994) * MODEL22_texOff(vec2(0,1)); +res += mat4(-0.5299927592277527,0.0979989692568779,0.1666737496852875,-0.1547524333000183,-0.0043443185277283,0.1540203243494034,0.0594348423182964,-0.0167275425046682,-0.1043610796332359,0.0504250898957253,0.0456700921058655,0.2525034546852112,0.2241353541612625,-0.1678503304719925,0.1532667279243469,0.2901742458343506) * MODEL21_texOff(vec2(1,-1)); +res += mat4(0.0998796448111534,0.0385462641716003,-0.0762400180101395,-0.1255892217159271,0.0281430184841156,-0.0304958485066891,-0.1440480053424835,-0.1001605167984962,-0.2257689833641052,0.2056092917919159,0.0248535349965096,-0.1383949518203735,-0.0951708629727364,0.0997417271137238,0.0275330394506454,-0.5728432536125183) * MODEL22_texOff(vec2(1,-1)); +res += mat4(0.4256163835525513,0.1745115518569946,-0.2409395426511765,0.3139856457710266,-0.0036795330233872,0.1819283962249756,-0.0864531323313713,0.0102691333740950,-0.3397279977798462,0.1107075437903404,-0.0035228815395385,-0.2207705229520798,-0.1779139339923859,-0.2106117755174637,0.0352664291858673,0.3615589439868927) * MODEL21_texOff(vec2(1,0)); +res += mat4(-0.0345224253833294,-0.0669926702976227,0.0907212942838669,-0.3758732676506042,-0.0452554710209370,-0.1134464666247368,-0.0358871109783649,-0.1858227252960205,-0.0233245138078928,-0.0495684742927551,0.1976234614849091,-0.1165761798620224,-0.0340447537600994,0.1095624342560768,0.0110175255686045,-0.8269239664077759) * MODEL22_texOff(vec2(1,0)); +res += mat4(-0.1379280686378479,0.1004267781972885,0.0723998174071312,-0.1510958224534988,0.0610648579895496,0.0451720170676708,-0.0231927260756493,-0.0251553766429424,0.2306085377931595,0.1033207178115845,-0.1316205114126205,0.1130664870142937,-0.0458516106009483,-0.1152514070272446,-0.0088650323450565,-0.0214479379355907) * MODEL21_texOff(vec2(1,1)); +res += mat4(-0.0545783303678036,-0.0620098188519478,0.0347074456512928,0.1096799224615097,0.0036664425861090,-0.0413107499480247,0.1443250179290771,-0.1161036714911461,-0.0061624986119568,-0.0252977479249239,0.3230019211769104,-0.2536626160144806,-0.0565439648926258,0.0827583819627762,-0.0071726376190782,-0.1983329951763153) * MODEL22_texOff(vec2(1,1)); +res = max(res, vec4(0.0)) + vec4(-0.6312188506126404,-0.1215368881821632,0.2487443536520004,0.4051703512668610) * min(res, vec4(0.0)); +return res; +} + +void main() +{ + at_ = ivec2(gl_GlobalInvocationID.xy); + if (at_.x >= p.size.x || at_.y >= p.size.y) return; + imageStore(dst, at_, hook()); +} diff --git a/app/src/shaders/fsrcnnx/pass_06.spv.inc b/app/src/shaders/fsrcnnx/pass_06.spv.inc new file mode 100644 index 0000000..71ce4ea --- /dev/null +++ b/app/src/shaders/fsrcnnx/pass_06.spv.inc @@ -0,0 +1,703 @@ +{0x07230203,0x00010000,0x000d000b,0x000003c1, +0x00000000,0x00020011,0x00000001,0x0006000b, +0x00000001,0x4c534c47,0x6474732e,0x3035342e, +0x00000000,0x0003000e,0x00000000,0x00000001, +0x0006000f,0x00000005,0x00000004,0x6e69616d, +0x00000000,0x0000022a,0x00060010,0x00000004, +0x00000011,0x00000010,0x00000010,0x00000001, +0x00030047,0x00000020,0x00000002,0x00050048, +0x00000020,0x00000000,0x00000023,0x00000000, +0x00040047,0x0000004b,0x00000021,0x00000001, +0x00040047,0x0000004b,0x00000022,0x00000000, +0x00040047,0x00000068,0x00000021,0x00000002, +0x00040047,0x00000068,0x00000022,0x00000000, +0x00040047,0x0000022a,0x0000000b,0x0000001c, +0x00030047,0x00000247,0x00000019,0x00040047, +0x00000247,0x00000021,0x00000000,0x00040047, +0x00000247,0x00000022,0x00000000,0x00040047, +0x0000024c,0x0000000b,0x00000019,0x00020013, +0x00000002,0x00030021,0x00000003,0x00000002, +0x00030016,0x00000006,0x00000020,0x00090019, +0x00000007,0x00000006,0x00000001,0x00000000, +0x00000000,0x00000000,0x00000001,0x00000000, +0x0003001b,0x00000008,0x00000007,0x00040020, +0x00000009,0x00000000,0x00000008,0x00040017, +0x0000000c,0x00000006,0x00000004,0x00040015, +0x00000016,0x00000020,0x00000001,0x00040017, +0x00000017,0x00000016,0x00000002,0x0004002b, +0x00000016,0x0000001e,0x00000000,0x0005002c, +0x00000017,0x0000001f,0x0000001e,0x0000001e, +0x0003001e,0x00000020,0x00000017,0x00040020, +0x00000021,0x00000009,0x00000020,0x0004003b, +0x00000021,0x00000022,0x00000009,0x00040020, +0x00000023,0x00000009,0x00000017,0x0004002b, +0x00000016,0x00000026,0x00000001,0x0004002b, +0x00000006,0x00000030,0xbd37a9dd,0x0004002b, +0x00000006,0x00000031,0xbe28e292,0x0004002b, +0x00000006,0x00000032,0xbdf43ba1,0x0004002b, +0x00000006,0x00000033,0xbbc82037,0x0007002c, +0x0000000c,0x00000034,0x00000030,0x00000031, +0x00000032,0x00000033,0x00040018,0x00000035, +0x0000000c,0x00000004,0x0004002b,0x00000006, +0x00000036,0x3d947288,0x0004002b,0x00000006, +0x00000037,0xbd44bf6c,0x0004002b,0x00000006, +0x00000038,0xbdddac7d,0x0004002b,0x00000006, +0x00000039,0xbe142cd0,0x0007002c,0x0000000c, +0x0000003a,0x00000036,0x00000037,0x00000038, +0x00000039,0x0004002b,0x00000006,0x0000003b, +0x3d941c5d,0x0004002b,0x00000006,0x0000003c, +0x3d455b99,0x0004002b,0x00000006,0x0000003d, +0x3a77ad4e,0x0004002b,0x00000006,0x0000003e, +0x3d10d212,0x0007002c,0x0000000c,0x0000003f, +0x0000003b,0x0000003c,0x0000003d,0x0000003e, +0x0004002b,0x00000006,0x00000040,0xbd85cfb7, +0x0004002b,0x00000006,0x00000041,0x3b424c75, +0x0004002b,0x00000006,0x00000042,0xbad96e1a, +0x0004002b,0x00000006,0x00000043,0xbe548bf8, +0x0007002c,0x0000000c,0x00000044,0x00000040, +0x00000041,0x00000042,0x00000043,0x0004002b, +0x00000006,0x00000045,0x3d2542cf,0x0004002b, +0x00000006,0x00000046,0x3ec936eb,0x0004002b, +0x00000006,0x00000047,0x3d0c3b64,0x0004002b, +0x00000006,0x00000048,0x3e1225fb,0x0007002c, +0x0000000c,0x00000049,0x00000045,0x00000046, +0x00000047,0x00000048,0x0007002c,0x00000035, +0x0000004a,0x0000003a,0x0000003f,0x00000044, +0x00000049,0x0004003b,0x00000009,0x0000004b, +0x00000000,0x0004002b,0x00000006,0x00000053, +0xbd9842f8,0x0004002b,0x00000006,0x00000054, +0x3e3cde62,0x0004002b,0x00000006,0x00000055, +0x3cd1f53d,0x0004002b,0x00000006,0x00000056, +0xbe8fcca8,0x0007002c,0x0000000c,0x00000057, +0x00000053,0x00000054,0x00000055,0x00000056, +0x0004002b,0x00000006,0x00000058,0x3d1004f2, +0x0004002b,0x00000006,0x00000059,0x3ea7c867, +0x0004002b,0x00000006,0x0000005a,0xbca8a004, +0x0004002b,0x00000006,0x0000005b,0xbf091bd5, +0x0007002c,0x0000000c,0x0000005c,0x00000058, +0x00000059,0x0000005a,0x0000005b,0x0004002b, +0x00000006,0x0000005d,0x3d8ba78b,0x0004002b, +0x00000006,0x0000005e,0x3e52be9b,0x0004002b, +0x00000006,0x0000005f,0xbd448bac,0x0004002b, +0x00000006,0x00000060,0xbebf3ed6,0x0007002c, +0x0000000c,0x00000061,0x0000005d,0x0000005e, +0x0000005f,0x00000060,0x0004002b,0x00000006, +0x00000062,0xbcd64316,0x0004002b,0x00000006, +0x00000063,0xbdeb4a9d,0x0004002b,0x00000006, +0x00000064,0xbe6e7dcf,0x0004002b,0x00000006, +0x00000065,0x3d95303b,0x0007002c,0x0000000c, +0x00000066,0x00000062,0x00000063,0x00000064, +0x00000065,0x0007002c,0x00000035,0x00000067, +0x00000057,0x0000005c,0x00000061,0x00000066, +0x0004003b,0x00000009,0x00000068,0x00000000, +0x0004002b,0x00000006,0x0000006e,0xbdfd271f, +0x0004002b,0x00000006,0x0000006f,0x3e0022fb, +0x0004002b,0x00000006,0x00000070,0xbe092863, +0x0004002b,0x00000006,0x00000071,0x3ca2d0be, +0x0007002c,0x0000000c,0x00000072,0x0000006e, +0x0000006f,0x00000070,0x00000071,0x0004002b, +0x00000006,0x00000073,0xbe07c634,0x0004002b, +0x00000006,0x00000074,0xc00f908b,0x0004002b, +0x00000006,0x00000075,0xbd8b6f55,0x0004002b, +0x00000006,0x00000076,0xbf11327a,0x0007002c, +0x0000000c,0x00000077,0x00000073,0x00000074, +0x00000075,0x00000076,0x0004002b,0x00000006, +0x00000078,0xbeafb6ee,0x0004002b,0x00000006, +0x00000079,0xbdc95898,0x0004002b,0x00000006, +0x0000007a,0xbe6202cd,0x0004002b,0x00000006, +0x0000007b,0xbe733008,0x0007002c,0x0000000c, +0x0000007c,0x00000078,0x00000079,0x0000007a, +0x0000007b,0x0004002b,0x00000006,0x0000007d, +0x3c50955a,0x0004002b,0x00000006,0x0000007e, +0x3fa75f95,0x0004002b,0x00000006,0x0000007f, +0x3dadb394,0x0004002b,0x00000006,0x00000080, +0xbe457cfc,0x0007002c,0x0000000c,0x00000081, +0x0000007d,0x0000007e,0x0000007f,0x00000080, +0x0007002c,0x00000035,0x00000082,0x00000072, +0x00000077,0x0000007c,0x00000081,0x0004002b, +0x00000006,0x00000083,0x00000000,0x0004002b, +0x00000006,0x0000008a,0xbd40f5b2,0x0004002b, +0x00000006,0x0000008b,0xbe1afedd,0x0004002b, +0x00000006,0x0000008c,0xbc5bfa4e,0x0004002b, +0x00000006,0x0000008d,0xbe1b924a,0x0007002c, +0x0000000c,0x0000008e,0x0000008a,0x0000008b, +0x0000008c,0x0000008d,0x0004002b,0x00000006, +0x0000008f,0xbf06a986,0x0004002b,0x00000006, +0x00000090,0x3e6aa97d,0x0004002b,0x00000006, +0x00000091,0x3ed15b06,0x0004002b,0x00000006, +0x00000092,0xbedcf208,0x0007002c,0x0000000c, +0x00000093,0x0000008f,0x00000090,0x00000091, +0x00000092,0x0004002b,0x00000006,0x00000094, +0x3dbf2072,0x0004002b,0x00000006,0x00000095, +0xbf84f31f,0x0004002b,0x00000006,0x00000096, +0x3ad12ad0,0x0004002b,0x00000006,0x00000097, +0xbe8c2e0a,0x0007002c,0x0000000c,0x00000098, +0x00000094,0x00000095,0x00000096,0x00000097, +0x0004002b,0x00000006,0x00000099,0xbcc9bb33, +0x0004002b,0x00000006,0x0000009a,0xbe8b6a67, +0x0004002b,0x00000006,0x0000009b,0xbe355018, +0x0004002b,0x00000006,0x0000009c,0xbe6aa086, +0x0007002c,0x0000000c,0x0000009d,0x00000099, +0x0000009a,0x0000009b,0x0000009c,0x0007002c, +0x00000035,0x0000009e,0x0000008e,0x00000093, +0x00000098,0x0000009d,0x0004002b,0x00000006, +0x000000a4,0xbae60fe8,0x0004002b,0x00000006, +0x000000a5,0x3e42f687,0x0004002b,0x00000006, +0x000000a6,0xbd97b23c,0x0004002b,0x00000006, +0x000000a7,0xbdbbf0d6,0x0007002c,0x0000000c, +0x000000a8,0x000000a4,0x000000a5,0x000000a6, +0x000000a7,0x0004002b,0x00000006,0x000000a9, +0x3d04a993,0x0004002b,0x00000006,0x000000aa, +0xbe9b1720,0x0004002b,0x00000006,0x000000ab, +0x3d5a2388,0x0004002b,0x00000006,0x000000ac, +0xbd856f99,0x0007002c,0x0000000c,0x000000ad, +0x000000a9,0x000000aa,0x000000ab,0x000000ac, +0x0004002b,0x00000006,0x000000ae,0x3ef946d8, +0x0004002b,0x00000006,0x000000af,0x3f5a9afa, +0x0004002b,0x00000006,0x000000b0,0x3ed49493, +0x0004002b,0x00000006,0x000000b1,0x3e862071, +0x0007002c,0x0000000c,0x000000b2,0x000000ae, +0x000000af,0x000000b0,0x000000b1,0x0004002b, +0x00000006,0x000000b3,0xbd294688,0x0004002b, +0x00000006,0x000000b4,0x3e0fcafd,0x0004002b, +0x00000006,0x000000b5,0x3dd2652e,0x0004002b, +0x00000006,0x000000b6,0x3ea7a3f8,0x0007002c, +0x0000000c,0x000000b7,0x000000b3,0x000000b4, +0x000000b5,0x000000b6,0x0007002c,0x00000035, +0x000000b8,0x000000a8,0x000000ad,0x000000b2, +0x000000b7,0x0004002b,0x00000006,0x000000c0, +0x3e3b3900,0x0004002b,0x00000006,0x000000c1, +0x3ce1050f,0x0004002b,0x00000006,0x000000c2, +0xbdef978e,0x0004002b,0x00000006,0x000000c3, +0x3d060ef3,0x0007002c,0x0000000c,0x000000c4, +0x000000c0,0x000000c1,0x000000c2,0x000000c3, +0x0004002b,0x00000006,0x000000c5,0x3e36e952, +0x0004002b,0x00000006,0x000000c6,0xbf282e2e, +0x0004002b,0x00000006,0x000000c7,0xbd79758d, +0x0004002b,0x00000006,0x000000c8,0xbe2baf17, +0x0007002c,0x0000000c,0x000000c9,0x000000c5, +0x000000c6,0x000000c7,0x000000c8,0x0004002b, +0x00000006,0x000000ca,0xbe17a9f5,0x0004002b, +0x00000006,0x000000cb,0x3e93eb96,0x0004002b, +0x00000006,0x000000cc,0x3dff32f5,0x0004002b, +0x00000006,0x000000cd,0x3e61a5fc,0x0007002c, +0x0000000c,0x000000ce,0x000000ca,0x000000cb, +0x000000cc,0x000000cd,0x0004002b,0x00000006, +0x000000cf,0xbd1643be,0x0004002b,0x00000006, +0x000000d0,0x3e1da44e,0x0004002b,0x00000006, +0x000000d1,0x3be3b65e,0x0004002b,0x00000006, +0x000000d2,0xbe1e1b19,0x0007002c,0x0000000c, +0x000000d3,0x000000cf,0x000000d0,0x000000d1, +0x000000d2,0x0007002c,0x00000035,0x000000d4, +0x000000c4,0x000000c9,0x000000ce,0x000000d3, +0x0004002b,0x00000006,0x000000da,0x3e54607b, +0x0004002b,0x00000006,0x000000db,0xbd92db5c, +0x0004002b,0x00000006,0x000000dc,0xbca0b48a, +0x0004002b,0x00000006,0x000000dd,0xbdc3f9ae, +0x0007002c,0x0000000c,0x000000de,0x000000da, +0x000000db,0x000000dc,0x000000dd,0x0004002b, +0x00000006,0x000000df,0x3d954741,0x0004002b, +0x00000006,0x000000e0,0x3d467aa2,0x0004002b, +0x00000006,0x000000e1,0x3e9cd443,0x0004002b, +0x00000006,0x000000e2,0xbea3de20,0x0007002c, +0x0000000c,0x000000e3,0x000000df,0x000000e0, +0x000000e1,0x000000e2,0x0004002b,0x00000006, +0x000000e4,0x3ceed1c2,0x0004002b,0x00000006, +0x000000e5,0xbcd9770d,0x0004002b,0x00000006, +0x000000e6,0x3def4dcc,0x0004002b,0x00000006, +0x000000e7,0xbe7df2f2,0x0007002c,0x0000000c, +0x000000e8,0x000000e4,0x000000e5,0x000000e6, +0x000000e7,0x0004002b,0x00000006,0x000000e9, +0x3dfab865,0x0004002b,0x00000006,0x000000ea, +0x3d98be9b,0x0004002b,0x00000006,0x000000eb, +0x3e3f6008,0x0004002b,0x00000006,0x000000ec, +0xbe488116,0x0007002c,0x0000000c,0x000000ed, +0x000000e9,0x000000ea,0x000000eb,0x000000ec, +0x0007002c,0x00000035,0x000000ee,0x000000de, +0x000000e3,0x000000e8,0x000000ed,0x0004002b, +0x00000006,0x000000f5,0x3b02c602,0x0004002b, +0x00000006,0x000000f6,0xbcb88369,0x0004002b, +0x00000006,0x000000f7,0x3da6569e,0x0004002b, +0x00000006,0x000000f8,0x3cf236ff,0x0007002c, +0x0000000c,0x000000f9,0x000000f5,0x000000f6, +0x000000f7,0x000000f8,0x0004002b,0x00000006, +0x000000fa,0xbe4e88a4,0x0004002b,0x00000006, +0x000000fb,0xbe654a00,0x0004002b,0x00000006, +0x000000fc,0xbe7e14ce,0x0004002b,0x00000006, +0x000000fd,0xbe73e94c,0x0007002c,0x0000000c, +0x000000fe,0x000000fa,0x000000fb,0x000000fc, +0x000000fd,0x0004002b,0x00000006,0x000000ff, +0xbd5530be,0x0004002b,0x00000006,0x00000100, +0xbdf5dc8f,0x0004002b,0x00000006,0x00000101, +0x3e5949c4,0x0004002b,0x00000006,0x00000102, +0xbe21212e,0x0007002c,0x0000000c,0x00000103, +0x000000ff,0x00000100,0x00000101,0x00000102, +0x0004002b,0x00000006,0x00000104,0xbca2969c, +0x0004002b,0x00000006,0x00000105,0x3dcd05cb, +0x0004002b,0x00000006,0x00000106,0xbdde2f2b, +0x0004002b,0x00000006,0x00000107,0xbea019cf, +0x0007002c,0x0000000c,0x00000108,0x00000104, +0x00000105,0x00000106,0x00000107,0x0007002c, +0x00000035,0x00000109,0x000000f9,0x000000fe, +0x00000103,0x00000108,0x0004002b,0x00000006, +0x0000010f,0x3ec485c3,0x0004002b,0x00000006, +0x00000110,0x3e2be833,0x0004002b,0x00000006, +0x00000111,0x3f264dc9,0x0004002b,0x00000006, +0x00000112,0x3ec1b87c,0x0007002c,0x0000000c, +0x00000113,0x0000010f,0x00000110,0x00000111, +0x00000112,0x0004002b,0x00000006,0x00000114, +0xbe612287,0x0004002b,0x00000006,0x00000115, +0xbe70c70d,0x0004002b,0x00000006,0x00000116, +0xbe9208ff,0x0004002b,0x00000006,0x00000117, +0x3f21895c,0x0007002c,0x0000000c,0x00000118, +0x00000114,0x00000115,0x00000116,0x00000117, +0x0004002b,0x00000006,0x00000119,0x3f4eece2, +0x0004002b,0x00000006,0x0000011a,0x3b80db0c, +0x0004002b,0x00000006,0x0000011b,0xbdb8b1f7, +0x0004002b,0x00000006,0x0000011c,0x3da368a1, +0x0007002c,0x0000000c,0x0000011d,0x00000119, +0x0000011a,0x0000011b,0x0000011c,0x0004002b, +0x00000006,0x0000011e,0xbe689928,0x0004002b, +0x00000006,0x0000011f,0x3f355302,0x0004002b, +0x00000006,0x00000120,0x3e1b0239,0x0004002b, +0x00000006,0x00000121,0x3e6026b1,0x0007002c, +0x0000000c,0x00000122,0x0000011e,0x0000011f, +0x00000120,0x00000121,0x0007002c,0x00000035, +0x00000123,0x00000113,0x00000118,0x0000011d, +0x00000122,0x0004002b,0x00000006,0x0000012a, +0xbe92ff30,0x0004002b,0x00000006,0x0000012b, +0x3e6d344d,0x0004002b,0x00000006,0x0000012c, +0x3efd55bf,0x0004002b,0x00000006,0x0000012d, +0x3ea966c0,0x0007002c,0x0000000c,0x0000012e, +0x0000012a,0x0000012b,0x0000012c,0x0000012d, +0x0004002b,0x00000006,0x0000012f,0xbd7f5e02, +0x0004002b,0x00000006,0x00000130,0xbe069297, +0x0004002b,0x00000006,0x00000131,0xbe886e41, +0x0004002b,0x00000006,0x00000132,0x3f5f5cad, +0x0007002c,0x0000000c,0x00000133,0x0000012f, +0x00000130,0x00000131,0x00000132,0x0004002b, +0x00000006,0x00000134,0x3ee880e3,0x0004002b, +0x00000006,0x00000135,0x3e12ccae,0x0004002b, +0x00000006,0x00000136,0xbf903fbf,0x0004002b, +0x00000006,0x00000137,0x3f248e5a,0x0007002c, +0x0000000c,0x00000138,0x00000134,0x00000135, +0x00000136,0x00000137,0x0004002b,0x00000006, +0x00000139,0xbdd03118,0x0004002b,0x00000006, +0x0000013a,0x3eaf0491,0x0004002b,0x00000006, +0x0000013b,0xbdcafd1b,0x0004002b,0x00000006, +0x0000013c,0xbf86835c,0x0007002c,0x0000000c, +0x0000013d,0x00000139,0x0000013a,0x0000013b, +0x0000013c,0x0007002c,0x00000035,0x0000013e, +0x0000012e,0x00000133,0x00000138,0x0000013d, +0x0004002b,0x00000006,0x00000144,0xbe5f3104, +0x0004002b,0x00000006,0x00000145,0x3e00ea98, +0x0004002b,0x00000006,0x00000146,0xbdecb004, +0x0004002b,0x00000006,0x00000147,0xbd5b9b57, +0x0007002c,0x0000000c,0x00000148,0x00000144, +0x00000145,0x00000146,0x00000147,0x0004002b, +0x00000006,0x00000149,0xbc6661fb,0x0004002b, +0x00000006,0x0000014a,0xbc15d02e,0x0004002b, +0x00000006,0x0000014b,0xbd4d86eb,0x0004002b, +0x00000006,0x0000014c,0xbeb6d234,0x0007002c, +0x0000000c,0x0000014d,0x00000149,0x0000014a, +0x0000014b,0x0000014c,0x0004002b,0x00000006, +0x0000014e,0xbf154f20,0x0004002b,0x00000006, +0x0000014f,0x3e4d38e3,0x0004002b,0x00000006, +0x00000150,0x3e98e53c,0x0004002b,0x00000006, +0x00000151,0xbf505cda,0x0007002c,0x0000000c, +0x00000152,0x0000014e,0x0000014f,0x00000150, +0x00000151,0x0004002b,0x00000006,0x00000153, +0x3c69beb2,0x0004002b,0x00000006,0x00000154, +0x3d8b922c,0x0004002b,0x00000006,0x00000155, +0x3e04737d,0x0004002b,0x00000006,0x00000156, +0xbdcd326d,0x0007002c,0x0000000c,0x00000157, +0x00000153,0x00000154,0x00000155,0x00000156, +0x0007002c,0x00000035,0x00000158,0x00000148, +0x0000014d,0x00000152,0x00000157,0x0004002b, +0x00000006,0x0000015f,0x3e47f872,0x0004002b, +0x00000006,0x00000160,0xbe9e55f0,0x0004002b, +0x00000006,0x00000161,0x3e9cdd93,0x0004002b, +0x00000006,0x00000162,0x3e4620ee,0x0007002c, +0x0000000c,0x00000163,0x0000015f,0x00000160, +0x00000161,0x00000162,0x0004002b,0x00000006, +0x00000164,0x3d98ec6a,0x0004002b,0x00000006, +0x00000165,0xbeb4ef91,0x0004002b,0x00000006, +0x00000166,0xbe02012d,0x0004002b,0x00000006, +0x00000167,0xbe65288e,0x0007002c,0x0000000c, +0x00000168,0x00000164,0x00000165,0x00000166, +0x00000167,0x0004002b,0x00000006,0x00000169, +0x3e7d005e,0x0004002b,0x00000006,0x0000016a, +0xbe872fc6,0x0004002b,0x00000006,0x0000016b, +0xbe9292fd,0x0004002b,0x00000006,0x0000016c, +0x3e322fe5,0x0007002c,0x0000000c,0x0000016d, +0x00000169,0x0000016a,0x0000016b,0x0000016c, +0x0004002b,0x00000006,0x0000016e,0xbdc55a11, +0x0004002b,0x00000006,0x0000016f,0x3e86c031, +0x0004002b,0x00000006,0x00000170,0x3d24225f, +0x0004002b,0x00000006,0x00000171,0xbeb7d6ce, +0x0007002c,0x0000000c,0x00000172,0x0000016e, +0x0000016f,0x00000170,0x00000171,0x0007002c, +0x00000035,0x00000173,0x00000163,0x00000168, +0x0000016d,0x00000172,0x0004002b,0x00000006, +0x00000179,0xbf07ad9b,0x0004002b,0x00000006, +0x0000017a,0x3dc8b3af,0x0004002b,0x00000006, +0x0000017b,0x3e2aac86,0x0004002b,0x00000006, +0x0000017c,0xbe1e776c,0x0007002c,0x0000000c, +0x0000017d,0x00000179,0x0000017a,0x0000017b, +0x0000017c,0x0004002b,0x00000006,0x0000017e, +0xbb8e5ac9,0x0004002b,0x00000006,0x0000017f, +0x3e1db781,0x0004002b,0x00000006,0x00000180, +0x3d7371f3,0x0004002b,0x00000006,0x00000181, +0xbc890833,0x0007002c,0x0000000c,0x00000182, +0x0000017e,0x0000017f,0x00000180,0x00000181, +0x0004002b,0x00000006,0x00000183,0xbdd5bb43, +0x0004002b,0x00000006,0x00000184,0x3d4e8a8a, +0x0004002b,0x00000006,0x00000185,0x3d3b1090, +0x0004002b,0x00000006,0x00000186,0x3e814822, +0x0007002c,0x0000000c,0x00000187,0x00000183, +0x00000184,0x00000185,0x00000186,0x0004002b, +0x00000006,0x00000188,0x3e6583bd,0x0004002b, +0x00000006,0x00000189,0xbe2be0f5,0x0004002b, +0x00000006,0x0000018a,0x3e1cf1f4,0x0004002b, +0x00000006,0x0000018b,0x3e9491b8,0x0007002c, +0x0000000c,0x0000018c,0x00000188,0x00000189, +0x0000018a,0x0000018b,0x0007002c,0x00000035, +0x0000018d,0x0000017d,0x00000182,0x00000187, +0x0000018c,0x0004002b,0x00000006,0x00000194, +0x3dcc8db3,0x0004002b,0x00000006,0x00000195, +0x3d1de2b0,0x0004002b,0x00000006,0x00000196, +0xbd9c23ba,0x0004002b,0x00000006,0x00000197, +0xbe009a76,0x0007002c,0x0000000c,0x00000198, +0x00000194,0x00000195,0x00000196,0x00000197, +0x0004002b,0x00000006,0x00000199,0x3ce68c30, +0x0004002b,0x00000006,0x0000019a,0xbcf9d26e, +0x0004002b,0x00000006,0x0000019b,0xbe138152, +0x0004002b,0x00000006,0x0000019c,0xbdcd20f5, +0x0007002c,0x0000000c,0x0000019d,0x00000199, +0x0000019a,0x0000019b,0x0000019c,0x0004002b, +0x00000006,0x0000019e,0xbe672ffc,0x0004002b, +0x00000006,0x0000019f,0x3e528b3e,0x0004002b, +0x00000006,0x000001a0,0x3ccb99a4,0x0004002b, +0x00000006,0x000001a1,0xbe0db768,0x0007002c, +0x0000000c,0x000001a2,0x0000019e,0x0000019f, +0x000001a0,0x000001a1,0x0004002b,0x00000006, +0x000001a3,0xbdc2e8f1,0x0004002b,0x00000006, +0x000001a4,0x3dcc4564,0x0004002b,0x00000006, +0x000001a5,0x3ce18cf8,0x0004002b,0x00000006, +0x000001a6,0xbf12a5db,0x0007002c,0x0000000c, +0x000001a7,0x000001a3,0x000001a4,0x000001a5, +0x000001a6,0x0007002c,0x00000035,0x000001a8, +0x00000198,0x0000019d,0x000001a2,0x000001a7, +0x0004002b,0x00000006,0x000001ae,0x3ed9ea64, +0x0004002b,0x00000006,0x000001af,0x3e32b328, +0x0004002b,0x00000006,0x000001b0,0xbe76b8db, +0x0004002b,0x00000006,0x000001b1,0x3ea0c2ba, +0x0007002c,0x0000000c,0x000001b2,0x000001ae, +0x000001af,0x000001b0,0x000001b1,0x0004002b, +0x00000006,0x000001b3,0xbb712452,0x0004002b, +0x00000006,0x000001b4,0x3e3a4b70,0x0004002b, +0x00000006,0x000001b5,0xbdb10e57,0x0004002b, +0x00000006,0x000001b6,0x3c283fde,0x0007002c, +0x0000000c,0x000001b7,0x000001b3,0x000001b4, +0x000001b5,0x000001b6,0x0004002b,0x00000006, +0x000001b8,0xbeadf0d4,0x0004002b,0x00000006, +0x000001b9,0x3de2baa3,0x0004002b,0x00000006, +0x000001ba,0xbb66e025,0x0004002b,0x00000006, +0x000001bb,0xbe6211ab,0x0007002c,0x0000000c, +0x000001bc,0x000001b8,0x000001b9,0x000001ba, +0x000001bb,0x0004002b,0x00000006,0x000001bd, +0xbe362f12,0x0004002b,0x00000006,0x000001be, +0xbe57aa9d,0x0004002b,0x00000006,0x000001bf, +0x3d107388,0x0004002b,0x00000006,0x000001c0, +0x3eb91e41,0x0007002c,0x0000000c,0x000001c1, +0x000001bd,0x000001be,0x000001bf,0x000001c0, +0x0007002c,0x00000035,0x000001c2,0x000001b2, +0x000001b7,0x000001bc,0x000001c1,0x0004002b, +0x00000006,0x000001c9,0xbd0d6763,0x0004002b, +0x00000006,0x000001ca,0xbd893374,0x0004002b, +0x00000006,0x000001cb,0x3db9cc16,0x0004002b, +0x00000006,0x000001cc,0xbec07276,0x0007002c, +0x0000000c,0x000001cd,0x000001c9,0x000001ca, +0x000001cb,0x000001cc,0x0004002b,0x00000006, +0x000001ce,0xbd395dcd,0x0004002b,0x00000006, +0x000001cf,0xbde8569f,0x0004002b,0x00000006, +0x000001d0,0xbd12fe5d,0x0004002b,0x00000006, +0x000001d1,0xbe3e4850,0x0007002c,0x0000000c, +0x000001d2,0x000001ce,0x000001cf,0x000001d0, +0x000001d1,0x0004002b,0x00000006,0x000001d3, +0xbcbf130d,0x0004002b,0x00000006,0x000001d4, +0xbd4b0850,0x0004002b,0x00000006,0x000001d5, +0x3e4a5dce,0x0004002b,0x00000006,0x000001d6, +0xbdeebf7e,0x0007002c,0x0000000c,0x000001d7, +0x000001d3,0x000001d4,0x000001d5,0x000001d6, +0x0004002b,0x00000006,0x000001d8,0xbd0b7283, +0x0004002b,0x00000006,0x000001d9,0x3de06245, +0x0004002b,0x00000006,0x000001da,0x3c3482da, +0x0004002b,0x00000006,0x000001db,0xbf53b14a, +0x0007002c,0x0000000c,0x000001dc,0x000001d8, +0x000001d9,0x000001da,0x000001db,0x0007002c, +0x00000035,0x000001dd,0x000001cd,0x000001d2, +0x000001d7,0x000001dc,0x0004002b,0x00000006, +0x000001e3,0xbe0d3d04,0x0004002b,0x00000006, +0x000001e4,0x3dcdac8e,0x0004002b,0x00000006, +0x000001e5,0x3d94465b,0x0004002b,0x00000006, +0x000001e6,0xbe1ab8dd,0x0007002c,0x0000000c, +0x000001e7,0x000001e3,0x000001e4,0x000001e5, +0x000001e6,0x0004002b,0x00000006,0x000001e8, +0x3d7a1f25,0x0004002b,0x00000006,0x000001e9, +0x3d39064b,0x0004002b,0x00000006,0x000001ea, +0xbcbdfeac,0x0004002b,0x00000006,0x000001eb, +0xbcce12a6,0x0007002c,0x0000000c,0x000001ec, +0x000001e8,0x000001e9,0x000001ea,0x000001eb, +0x0004002b,0x00000006,0x000001ed,0x3e6c24a5, +0x0004002b,0x00000006,0x000001ee,0x3dd399d0, +0x0004002b,0x00000006,0x000001ef,0xbe06c787, +0x0004002b,0x00000006,0x000001f0,0x3de78f67, +0x0007002c,0x0000000c,0x000001f1,0x000001ed, +0x000001ee,0x000001ef,0x000001f0,0x0004002b, +0x00000006,0x000001f2,0xbd3bcee6,0x0004002b, +0x00000006,0x000001f3,0xbdec08ee,0x0004002b, +0x00000006,0x000001f4,0xbc113ea4,0x0004002b, +0x00000006,0x000001f5,0xbcafb396,0x0007002c, +0x0000000c,0x000001f6,0x000001f2,0x000001f3, +0x000001f4,0x000001f5,0x0007002c,0x00000035, +0x000001f7,0x000001e7,0x000001ec,0x000001f1, +0x000001f6,0x0004002b,0x00000006,0x000001fe, +0xbd5f8d87,0x0004002b,0x00000006,0x000001ff, +0xbd7dfe02,0x0004002b,0x00000006,0x00000200, +0x3d0e2965,0x0004002b,0x00000006,0x00000201, +0x3de09fde,0x0007002c,0x0000000c,0x00000202, +0x000001fe,0x000001ff,0x00000200,0x00000201, +0x0004002b,0x00000006,0x00000203,0x3b7048b3, +0x0004002b,0x00000006,0x00000204,0xbd293576, +0x0004002b,0x00000006,0x00000205,0x3e13c9f0, +0x0004002b,0x00000006,0x00000206,0xbdedc7c3, +0x0007002c,0x0000000c,0x00000207,0x00000203, +0x00000204,0x00000205,0x00000206,0x0004002b, +0x00000006,0x00000208,0xbbc9eec9,0x0004002b, +0x00000006,0x00000209,0xbccf3d39,0x0004002b, +0x00000006,0x0000020a,0x3ea56082,0x0004002b, +0x00000006,0x0000020b,0xbe81e011,0x0007002c, +0x0000000c,0x0000020c,0x00000208,0x00000209, +0x0000020a,0x0000020b,0x0004002b,0x00000006, +0x0000020d,0xbd679aa5,0x0004002b,0x00000006, +0x0000020e,0x3da97d3a,0x0004002b,0x00000006, +0x0000020f,0xbbeb0872,0x0004002b,0x00000006, +0x00000210,0xbe4b17ce,0x0007002c,0x0000000c, +0x00000211,0x0000020d,0x0000020e,0x0000020f, +0x00000210,0x0007002c,0x00000035,0x00000212, +0x00000202,0x00000207,0x0000020c,0x00000211, +0x0007002c,0x0000000c,0x00000219,0x00000083, +0x00000083,0x00000083,0x00000083,0x0004002b, +0x00000006,0x0000021b,0xbf21978f,0x0004002b, +0x00000006,0x0000021c,0xbdf8e855,0x0004002b, +0x00000006,0x0000021d,0x3e7eb6d7,0x0004002b, +0x00000006,0x0000021e,0x3ecf727d,0x0007002c, +0x0000000c,0x0000021f,0x0000021b,0x0000021c, +0x0000021d,0x0000021e,0x00040015,0x00000227, +0x00000020,0x00000000,0x00040017,0x00000228, +0x00000227,0x00000003,0x00040020,0x00000229, +0x00000001,0x00000228,0x0004003b,0x00000229, +0x0000022a,0x00000001,0x00040017,0x0000022b, +0x00000227,0x00000002,0x00020014,0x0000022f, +0x0004002b,0x00000227,0x00000230,0x00000000, +0x00040020,0x00000234,0x00000009,0x00000016, +0x0004002b,0x00000227,0x0000023b,0x00000001, +0x00090019,0x00000245,0x00000006,0x00000001, +0x00000000,0x00000000,0x00000000,0x00000002, +0x00000002,0x00040020,0x00000246,0x00000000, +0x00000245,0x0004003b,0x00000246,0x00000247, +0x00000000,0x0004002b,0x00000227,0x0000024b, +0x00000010,0x0006002c,0x00000228,0x0000024c, +0x0000024b,0x0000024b,0x0000023b,0x0004002b, +0x00000016,0x000003b8,0xffffffff,0x0005002c, +0x00000017,0x000003b9,0x000003b8,0x000003b8, +0x0005002c,0x00000017,0x000003ba,0x00000026, +0x00000026,0x0005002c,0x00000017,0x000003bb, +0x000003b8,0x0000001e,0x0005002c,0x00000017, +0x000003bc,0x000003b8,0x00000026,0x0005002c, +0x00000017,0x000003bd,0x0000001e,0x000003b8, +0x0005002c,0x00000017,0x000003be,0x0000001e, +0x00000026,0x0005002c,0x00000017,0x000003bf, +0x00000026,0x000003b8,0x0005002c,0x00000017, +0x000003c0,0x00000026,0x0000001e,0x00050036, +0x00000002,0x00000004,0x00000000,0x00000003, +0x000200f8,0x00000005,0x000300f7,0x0000024e, +0x00000000,0x000300fb,0x00000230,0x0000024f, +0x000200f8,0x0000024f,0x0004003d,0x00000228, +0x0000022c,0x0000022a,0x0007004f,0x0000022b, +0x0000022d,0x0000022c,0x0000022c,0x00000000, +0x00000001,0x0004007c,0x00000017,0x0000022e, +0x0000022d,0x00050051,0x00000016,0x00000233, +0x0000022e,0x00000000,0x00060041,0x00000234, +0x00000235,0x00000022,0x0000001e,0x00000230, +0x0004003d,0x00000016,0x00000236,0x00000235, +0x000500af,0x0000022f,0x00000237,0x00000233, +0x00000236,0x000400a8,0x0000022f,0x00000238, +0x00000237,0x000300f7,0x0000023a,0x00000000, +0x000400fa,0x00000238,0x00000239,0x0000023a, +0x000200f8,0x00000239,0x00050051,0x00000016, +0x0000023d,0x0000022e,0x00000001,0x00060041, +0x00000234,0x0000023e,0x00000022,0x0000001e, +0x0000023b,0x0004003d,0x00000016,0x0000023f, +0x0000023e,0x000500af,0x0000022f,0x00000240, +0x0000023d,0x0000023f,0x000200f9,0x0000023a, +0x000200f8,0x0000023a,0x000700f5,0x0000022f, +0x00000241,0x00000237,0x0000024f,0x00000240, +0x00000239,0x000300f7,0x00000243,0x00000000, +0x000400fa,0x00000241,0x00000242,0x00000243, +0x000200f8,0x00000242,0x000200f9,0x0000024e, +0x000200f8,0x00000243,0x0004003d,0x00000245, +0x00000248,0x00000247,0x0004003d,0x00000008, +0x000002ba,0x0000004b,0x00050080,0x00000017, +0x000002be,0x0000022e,0x000003b9,0x00050041, +0x00000023,0x000002bf,0x00000022,0x0000001e, +0x0004003d,0x00000017,0x000002c0,0x000002bf, +0x00050082,0x00000017,0x000002c2,0x000002c0, +0x000003ba,0x0008000c,0x00000017,0x000002c3, +0x00000001,0x0000002d,0x000002be,0x0000001f, +0x000002c2,0x00040064,0x00000007,0x000002c4, +0x000002ba,0x0007005f,0x0000000c,0x000002c5, +0x000002c4,0x000002c3,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x0000026a,0x0000004a, +0x000002c5,0x00050081,0x0000000c,0x0000026c, +0x00000034,0x0000026a,0x0004003d,0x00000008, +0x000002c8,0x00000068,0x00040064,0x00000007, +0x000002d2,0x000002c8,0x0007005f,0x0000000c, +0x000002d3,0x000002d2,0x000002c3,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x0000026e, +0x00000067,0x000002d3,0x00050081,0x0000000c, +0x00000270,0x0000026c,0x0000026e,0x0004003d, +0x00000008,0x000002d6,0x0000004b,0x00050080, +0x00000017,0x000002da,0x0000022e,0x000003bb, +0x0008000c,0x00000017,0x000002df,0x00000001, +0x0000002d,0x000002da,0x0000001f,0x000002c2, +0x00040064,0x00000007,0x000002e0,0x000002d6, +0x0007005f,0x0000000c,0x000002e1,0x000002e0, +0x000002df,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x00000272,0x00000082,0x000002e1, +0x00050081,0x0000000c,0x00000274,0x00000270, +0x00000272,0x0004003d,0x00000008,0x000002e4, +0x00000068,0x00040064,0x00000007,0x000002ee, +0x000002e4,0x0007005f,0x0000000c,0x000002ef, +0x000002ee,0x000002df,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x00000276,0x0000009e, +0x000002ef,0x00050081,0x0000000c,0x00000278, +0x00000274,0x00000276,0x0004003d,0x00000008, +0x000002f2,0x0000004b,0x00050080,0x00000017, +0x000002f6,0x0000022e,0x000003bc,0x0008000c, +0x00000017,0x000002fb,0x00000001,0x0000002d, +0x000002f6,0x0000001f,0x000002c2,0x00040064, +0x00000007,0x000002fc,0x000002f2,0x0007005f, +0x0000000c,0x000002fd,0x000002fc,0x000002fb, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x0000027a,0x000000b8,0x000002fd,0x00050081, +0x0000000c,0x0000027c,0x00000278,0x0000027a, +0x0004003d,0x00000008,0x00000300,0x00000068, +0x00040064,0x00000007,0x0000030a,0x00000300, +0x0007005f,0x0000000c,0x0000030b,0x0000030a, +0x000002fb,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x0000027e,0x000000d4,0x0000030b, +0x00050081,0x0000000c,0x00000280,0x0000027c, +0x0000027e,0x0004003d,0x00000008,0x0000030e, +0x0000004b,0x00050080,0x00000017,0x00000312, +0x0000022e,0x000003bd,0x0008000c,0x00000017, +0x00000317,0x00000001,0x0000002d,0x00000312, +0x0000001f,0x000002c2,0x00040064,0x00000007, +0x00000318,0x0000030e,0x0007005f,0x0000000c, +0x00000319,0x00000318,0x00000317,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x00000282, +0x000000ee,0x00000319,0x00050081,0x0000000c, +0x00000284,0x00000280,0x00000282,0x0004003d, +0x00000008,0x0000031c,0x00000068,0x00040064, +0x00000007,0x00000326,0x0000031c,0x0007005f, +0x0000000c,0x00000327,0x00000326,0x00000317, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x00000286,0x00000109,0x00000327,0x00050081, +0x0000000c,0x00000288,0x00000284,0x00000286, +0x0004003d,0x00000008,0x0000032a,0x0000004b, +0x0008000c,0x00000017,0x00000333,0x00000001, +0x0000002d,0x0000022e,0x0000001f,0x000002c2, +0x00040064,0x00000007,0x00000334,0x0000032a, +0x0007005f,0x0000000c,0x00000335,0x00000334, +0x00000333,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x0000028a,0x00000123,0x00000335, +0x00050081,0x0000000c,0x0000028c,0x00000288, +0x0000028a,0x0004003d,0x00000008,0x00000338, +0x00000068,0x00040064,0x00000007,0x00000342, +0x00000338,0x0007005f,0x0000000c,0x00000343, +0x00000342,0x00000333,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x0000028e,0x0000013e, +0x00000343,0x00050081,0x0000000c,0x00000290, +0x0000028c,0x0000028e,0x0004003d,0x00000008, +0x00000346,0x0000004b,0x00050080,0x00000017, +0x0000034a,0x0000022e,0x000003be,0x0008000c, +0x00000017,0x0000034f,0x00000001,0x0000002d, +0x0000034a,0x0000001f,0x000002c2,0x00040064, +0x00000007,0x00000350,0x00000346,0x0007005f, +0x0000000c,0x00000351,0x00000350,0x0000034f, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x00000292,0x00000158,0x00000351,0x00050081, +0x0000000c,0x00000294,0x00000290,0x00000292, +0x0004003d,0x00000008,0x00000354,0x00000068, +0x00040064,0x00000007,0x0000035e,0x00000354, +0x0007005f,0x0000000c,0x0000035f,0x0000035e, +0x0000034f,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x00000296,0x00000173,0x0000035f, +0x00050081,0x0000000c,0x00000298,0x00000294, +0x00000296,0x0004003d,0x00000008,0x00000362, +0x0000004b,0x00050080,0x00000017,0x00000366, +0x0000022e,0x000003bf,0x0008000c,0x00000017, +0x0000036b,0x00000001,0x0000002d,0x00000366, +0x0000001f,0x000002c2,0x00040064,0x00000007, +0x0000036c,0x00000362,0x0007005f,0x0000000c, +0x0000036d,0x0000036c,0x0000036b,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x0000029a, +0x0000018d,0x0000036d,0x00050081,0x0000000c, +0x0000029c,0x00000298,0x0000029a,0x0004003d, +0x00000008,0x00000370,0x00000068,0x00040064, +0x00000007,0x0000037a,0x00000370,0x0007005f, +0x0000000c,0x0000037b,0x0000037a,0x0000036b, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x0000029e,0x000001a8,0x0000037b,0x00050081, +0x0000000c,0x000002a0,0x0000029c,0x0000029e, +0x0004003d,0x00000008,0x0000037e,0x0000004b, +0x00050080,0x00000017,0x00000382,0x0000022e, +0x000003c0,0x0008000c,0x00000017,0x00000387, +0x00000001,0x0000002d,0x00000382,0x0000001f, +0x000002c2,0x00040064,0x00000007,0x00000388, +0x0000037e,0x0007005f,0x0000000c,0x00000389, +0x00000388,0x00000387,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x000002a2,0x000001c2, +0x00000389,0x00050081,0x0000000c,0x000002a4, +0x000002a0,0x000002a2,0x0004003d,0x00000008, +0x0000038c,0x00000068,0x00040064,0x00000007, +0x00000396,0x0000038c,0x0007005f,0x0000000c, +0x00000397,0x00000396,0x00000387,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x000002a6, +0x000001dd,0x00000397,0x00050081,0x0000000c, +0x000002a8,0x000002a4,0x000002a6,0x0004003d, +0x00000008,0x0000039a,0x0000004b,0x00050080, +0x00000017,0x0000039e,0x0000022e,0x000003ba, +0x0008000c,0x00000017,0x000003a3,0x00000001, +0x0000002d,0x0000039e,0x0000001f,0x000002c2, +0x00040064,0x00000007,0x000003a4,0x0000039a, +0x0007005f,0x0000000c,0x000003a5,0x000003a4, +0x000003a3,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x000002aa,0x000001f7,0x000003a5, +0x00050081,0x0000000c,0x000002ac,0x000002a8, +0x000002aa,0x0004003d,0x00000008,0x000003a8, +0x00000068,0x00040064,0x00000007,0x000003b2, +0x000003a8,0x0007005f,0x0000000c,0x000003b3, +0x000003b2,0x000003a3,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x000002ae,0x00000212, +0x000003b3,0x00050081,0x0000000c,0x000002b0, +0x000002ac,0x000002ae,0x0007000c,0x0000000c, +0x000002b2,0x00000001,0x00000028,0x000002b0, +0x00000219,0x0007000c,0x0000000c,0x000002b4, +0x00000001,0x00000025,0x000002b0,0x00000219, +0x00050085,0x0000000c,0x000002b5,0x0000021f, +0x000002b4,0x00050081,0x0000000c,0x000002b6, +0x000002b2,0x000002b5,0x00040063,0x00000248, +0x0000022e,0x000002b6,0x000200f9,0x0000024e, +0x000200f8,0x0000024e,0x000100fd,0x00010038} diff --git a/app/src/shaders/fsrcnnx/pass_07.comp b/app/src/shaders/fsrcnnx/pass_07.comp new file mode 100644 index 0000000..4c5497a --- /dev/null +++ b/app/src/shaders/fsrcnnx/pass_07.comp @@ -0,0 +1,46 @@ +#version 450 +// Generated by tools/gen_fsrcnnx.js from third_party/FSRCNNX_x2_8-0-4-1.glsl +// (FSRCNNX by igv, LGPL-3.0). Layer: mapping 3_1. Do not edit. +layout(local_size_x = 16, local_size_y = 16) in; +layout(binding = 0, rgba16f) uniform writeonly image2D dst; +layout(binding = 1) uniform sampler2D in0; +layout(binding = 2) uniform sampler2D in1; +layout(binding = 3) uniform sampler2D in2; +layout(push_constant) uniform Params { ivec2 size; } p; + +ivec2 at_; +vec4 fetch_(sampler2D s, vec2 o) { return texelFetch(s, clamp(at_ + ivec2(o), ivec2(0), p.size - 1), 0); } +#define MODEL1_texOff(o) fetch_(in0, vec2(o)) +#define MODEL2_texOff(o) fetch_(in1, vec2(o)) + +vec4 hook() +{ +vec4 res = vec4(-0.0410279631614685,-0.1111723631620407,-0.0406232848763466,-0.0939496159553528); +res += mat4(0.1221675798296928,0.0083215842023492,-0.0162804014980793,0.0316714197397232,-0.2205813378095627,0.1500435769557953,0.2109555304050446,0.2741867899894714,0.0956874340772629,-0.0896854698657990,-0.1657065600156784,-0.1349759399890900,0.0601499564945698,-0.1523845940828323,-0.1828087568283081,-0.2727653682231903) * MODEL1_texOff(vec2(-1,-1)); +res += mat4(-0.0918163508176804,0.1564485579729080,0.1133174449205399,0.2215953171253204,-0.0623677000403404,-0.0497728772461414,-0.0372809022665024,-0.0258478187024593,-0.1364922970533371,0.1053884625434875,0.3292874991893768,0.2693256139755249,-0.0347631797194481,-0.1470523178577423,0.0096792401745915,-0.0542853325605392) * MODEL2_texOff(vec2(-1,-1)); +res += mat4(0.1331177949905396,-0.0964357852935791,-0.0706946700811386,0.1593225002288818,-0.4815943241119385,0.1224092170596123,-0.0870430991053581,0.0005010276800022,-0.0242684502154589,-0.2256436049938202,0.1367238312959671,0.0474774017930031,0.6886650323867798,-0.0065326127223670,0.1841574758291245,-0.1354993879795074) * MODEL1_texOff(vec2(-1,0)); +res += mat4(-0.1049591675400734,0.0515934228897095,0.1128631457686424,0.1688040047883987,-0.0084041170775890,-0.0006375144002959,-0.0598374009132385,0.1424416452646255,-0.0048398924991488,0.1832167655229568,0.0231959503144026,0.0816788375377655,-0.1321710795164108,0.0397678017616272,-0.0058345394209027,0.5784573554992676) * MODEL2_texOff(vec2(-1,0)); +res += mat4(0.1438693851232529,-0.0694608166813850,-0.0428275354206562,0.1599996536970139,-0.1651254445314407,0.1388883888721466,-0.0895452573895454,0.2569831907749176,0.3150432109832764,-0.0910519883036613,0.0367441214621067,0.1903669685125351,0.2805841267108917,-0.0444608181715012,0.0059385276399553,-0.2585869431495667) * MODEL1_texOff(vec2(-1,1)); +res += mat4(-0.1217494234442711,0.0191769022494555,-0.0065453462302685,0.1391217857599258,0.0998920649290085,-0.0162798929959536,0.0502282194793224,0.0370145924389362,0.0290782172232866,-0.0099554909393191,0.0142515478655696,0.1248661577701569,-0.0076912571676075,0.0251651499420404,0.2190572917461395,0.0020069130696356) * MODEL2_texOff(vec2(-1,1)); +res += mat4(0.2666685581207275,-0.1625511497259140,-0.3938800692558289,-0.0253848694264889,0.0987015441060066,0.2033616453409195,0.3128099143505096,0.4608893990516663,0.0620003379881382,-0.1389972567558289,-0.3095863461494446,-0.4023511111736298,-0.1105777546763420,0.1115406602621078,0.3639950752258301,0.0645622834563255) * MODEL1_texOff(vec2(0,-1)); +res += mat4(-0.2135885655879974,-0.1035343706607819,0.1795026361942291,0.1828210204839706,0.0780984908342361,0.0656728670001030,0.0033678691834211,0.1361345648765564,0.1712654232978821,-0.0172833092510700,-0.0502183400094509,0.2910411655902863,0.0691247656941414,0.1935720741748810,0.0652214139699936,0.1608240753412247) * MODEL2_texOff(vec2(0,-1)); +res += mat4(0.8243460655212402,-0.0979344248771667,-0.0366373993456364,0.1692261099815369,0.5517869591712952,0.3282494544982910,-0.7905511856079102,-0.4462923705577850,-0.0803156569600105,0.1172509342432022,0.1864327639341354,0.1471016854047775,0.1296005547046661,-0.1004103720188141,0.3174172043800354,-0.1181766316294670) * MODEL1_texOff(vec2(0,0)); +res += mat4(0.0259374529123306,-0.0934808850288391,0.3008874654769897,0.3957927823066711,-0.4048821926116943,0.1461934000253677,-0.1819096356630325,-0.1908810287714005,0.3193186521530151,-0.7438099980354309,0.1919509470462799,-0.2065188735723495,0.1752236187458038,-0.6840037107467651,0.1588519066572189,-0.3956064879894257) * MODEL2_texOff(vec2(0,0)); +res += mat4(0.1574442386627197,-0.0114925103262067,-0.1208277940750122,0.2058266401290894,0.2879209220409393,-0.0419875606894493,-0.1902059614658356,-0.2723863720893860,-0.1086223348975182,-0.0870924964547157,0.8605937957763672,0.2656622231006622,-0.1653763055801392,0.0816384851932526,-0.0137870563194156,0.1433854848146439) * MODEL1_texOff(vec2(0,1)); +res += mat4(-0.1565909236669540,-0.0307490080595016,-0.1055604666471481,0.2573592662811279,-0.1186821162700653,0.1141471788287163,-0.0272745657712221,-0.1049114838242531,0.2445316016674042,-0.0027864547446370,-0.1759569346904755,-0.1556979566812515,0.0550616309046745,0.1704383641481400,0.0853662937879562,0.3280856907367706) * MODEL2_texOff(vec2(0,1)); +res += mat4(0.1460669338703156,0.4202052652835846,-0.3638312816619873,-0.0958623066544533,-0.0492525361478329,-0.3664234280586243,0.0794373303651810,0.0399017669260502,0.0629198029637337,0.1662959158420563,-0.1001493930816650,-0.0587460733950138,-0.0396478697657585,0.0017320754704997,0.0314909480512142,-0.0202700830996037) * MODEL1_texOff(vec2(1,-1)); +res += mat4(-0.0964399129152298,0.0380319654941559,0.0396055467426777,0.0265473183244467,-0.0161637403070927,-0.1872924566268921,0.1670000404119492,0.0029466480482370,-0.1093841269612312,-0.3629201948642731,-0.0562992505729198,0.1792684197425842,-0.0203859098255634,0.0983991250395775,0.0058611719869077,0.1627455651760101) * MODEL2_texOff(vec2(1,-1)); +res += mat4(-0.1117974221706390,0.7562329173088074,-0.2046248912811279,0.1677842289209366,-0.2063486129045486,-0.6023545265197754,-0.5739209651947021,0.5110496878623962,-0.0715268924832344,-0.1373793482780457,0.1251420378684998,-0.0477442294359207,0.4961377978324890,0.2688887119293213,0.3146316707134247,-0.5197153687477112) * MODEL1_texOff(vec2(1,0)); +res += mat4(-0.1314805448055267,0.0746279135346413,0.3457699418067932,0.2564856410026550,0.0839370116591454,-0.6136511564254761,-0.4646295011043549,0.0612256154417992,-0.1910563558340073,-0.0935136750340462,-0.2426030039787292,0.2102959007024765,0.1575350016355515,0.6145061254501343,0.3368154168128967,-0.0974092856049538) * MODEL2_texOff(vec2(1,0)); +res += mat4(0.0565315335988998,0.2393359094858170,-0.0932938233017921,0.1555283814668655,0.0123879108577967,-0.1247719228267670,-0.0564610138535500,-0.1125799044966698,-0.0104600470513105,0.0482629500329494,0.2316472232341766,0.1083717569708824,-0.0525921434164047,0.0643989592790604,-0.0525734610855579,-0.0503251366317272) * MODEL1_texOff(vec2(1,1)); +res += mat4(-0.1835366338491440,0.0978360474109650,-0.1111819595098495,0.2109299153089523,0.0509372949600220,-0.1992686837911606,0.0677929744124413,-0.0870024710893631,-0.0412262082099915,-0.0697719156742096,-0.0967373847961426,0.0137308547273278,0.0195730421692133,0.0410240143537521,0.1157210171222687,0.2283479571342468) * MODEL2_texOff(vec2(1,1)); +res = max(res, vec4(0.0)) + vec4(0.1991519331932068,-0.1275756657123566,-0.0622864030301571,0.1586369574069977) * min(res, vec4(0.0)); +return res; +} + +void main() +{ + at_ = ivec2(gl_GlobalInvocationID.xy); + if (at_.x >= p.size.x || at_.y >= p.size.y) return; + imageStore(dst, at_, hook()); +} diff --git a/app/src/shaders/fsrcnnx/pass_07.spv.inc b/app/src/shaders/fsrcnnx/pass_07.spv.inc new file mode 100644 index 0000000..f6753a2 --- /dev/null +++ b/app/src/shaders/fsrcnnx/pass_07.spv.inc @@ -0,0 +1,703 @@ +{0x07230203,0x00010000,0x000d000b,0x000003c1, +0x00000000,0x00020011,0x00000001,0x0006000b, +0x00000001,0x4c534c47,0x6474732e,0x3035342e, +0x00000000,0x0003000e,0x00000000,0x00000001, +0x0006000f,0x00000005,0x00000004,0x6e69616d, +0x00000000,0x0000022a,0x00060010,0x00000004, +0x00000011,0x00000010,0x00000010,0x00000001, +0x00030047,0x00000020,0x00000002,0x00050048, +0x00000020,0x00000000,0x00000023,0x00000000, +0x00040047,0x0000004b,0x00000021,0x00000001, +0x00040047,0x0000004b,0x00000022,0x00000000, +0x00040047,0x00000068,0x00000021,0x00000002, +0x00040047,0x00000068,0x00000022,0x00000000, +0x00040047,0x0000022a,0x0000000b,0x0000001c, +0x00030047,0x00000247,0x00000019,0x00040047, +0x00000247,0x00000021,0x00000000,0x00040047, +0x00000247,0x00000022,0x00000000,0x00040047, +0x0000024c,0x0000000b,0x00000019,0x00020013, +0x00000002,0x00030021,0x00000003,0x00000002, +0x00030016,0x00000006,0x00000020,0x00090019, +0x00000007,0x00000006,0x00000001,0x00000000, +0x00000000,0x00000000,0x00000001,0x00000000, +0x0003001b,0x00000008,0x00000007,0x00040020, +0x00000009,0x00000000,0x00000008,0x00040017, +0x0000000c,0x00000006,0x00000004,0x00040015, +0x00000016,0x00000020,0x00000001,0x00040017, +0x00000017,0x00000016,0x00000002,0x0004002b, +0x00000016,0x0000001e,0x00000000,0x0005002c, +0x00000017,0x0000001f,0x0000001e,0x0000001e, +0x0003001e,0x00000020,0x00000017,0x00040020, +0x00000021,0x00000009,0x00000020,0x0004003b, +0x00000021,0x00000022,0x00000009,0x00040020, +0x00000023,0x00000009,0x00000017,0x0004002b, +0x00000016,0x00000026,0x00000001,0x0004002b, +0x00000006,0x00000030,0xbd280cf0,0x0004002b, +0x00000006,0x00000031,0xbde3ae56,0x0004002b, +0x00000006,0x00000032,0xbd26649a,0x0004002b, +0x00000006,0x00000033,0xbdc068a8,0x0007002c, +0x0000000c,0x00000034,0x00000030,0x00000031, +0x00000032,0x00000033,0x00040018,0x00000035, +0x0000000c,0x00000004,0x0004002b,0x00000006, +0x00000036,0x3dfa32ff,0x0004002b,0x00000006, +0x00000037,0x3c085741,0x0004002b,0x00000006, +0x00000038,0xbc855e7a,0x0004002b,0x00000006, +0x00000039,0x3d01b9e4,0x0007002c,0x0000000c, +0x0000003a,0x00000036,0x00000037,0x00000038, +0x00000039,0x0004002b,0x00000006,0x0000003b, +0xbe61e013,0x0004002b,0x00000006,0x0000003c, +0x3e19a506,0x0004002b,0x00000006,0x0000003d, +0x3e5804ba,0x0004002b,0x00000006,0x0000003e, +0x3e8c6236,0x0007002c,0x0000000c,0x0000003f, +0x0000003b,0x0000003c,0x0000003d,0x0000003e, +0x0004002b,0x00000006,0x00000040,0x3dc3f7c6, +0x0004002b,0x00000006,0x00000041,0xbdb7ad04, +0x0004002b,0x00000006,0x00000042,0xbe29aefb, +0x0004002b,0x00000006,0x00000043,0xbe0a3722, +0x0007002c,0x0000000c,0x00000044,0x00000040, +0x00000041,0x00000042,0x00000043,0x0004002b, +0x00000006,0x00000045,0x3d765fcd,0x0004002b, +0x00000006,0x00000046,0xbe1c0ab5,0x0004002b, +0x00000006,0x00000047,0xbe3b3238,0x0004002b, +0x00000006,0x00000048,0xbe8ba7e7,0x0007002c, +0x0000000c,0x00000049,0x00000045,0x00000046, +0x00000047,0x00000048,0x0007002c,0x00000035, +0x0000004a,0x0000003a,0x0000003f,0x00000044, +0x00000049,0x0004003b,0x00000009,0x0000004b, +0x00000000,0x0004002b,0x00000006,0x00000053, +0xbdbc0a36,0x0004002b,0x00000006,0x00000054, +0x3e20340d,0x0004002b,0x00000006,0x00000055, +0x3de812fa,0x0004002b,0x00000006,0x00000056, +0x3e62e9e2,0x0007002c,0x0000000c,0x00000057, +0x00000053,0x00000054,0x00000055,0x00000056, +0x0004002b,0x00000006,0x00000058,0xbd7f7546, +0x0004002b,0x00000006,0x00000059,0xbd4bdea5, +0x0004002b,0x00000006,0x0000005a,0xbd18b3dc, +0x0004002b,0x00000006,0x0000005b,0xbcd3bece, +0x0007002c,0x0000000c,0x0000005c,0x00000058, +0x00000059,0x0000005a,0x0000005b,0x0004002b, +0x00000006,0x0000005d,0xbe0bc4a3,0x0004002b, +0x00000006,0x0000005e,0x3dd7d5e8,0x0004002b, +0x00000006,0x0000005f,0x3ea8985f,0x0004002b, +0x00000006,0x00000060,0x3e89e50c,0x0007002c, +0x0000000c,0x00000061,0x0000005d,0x0000005e, +0x0000005f,0x00000060,0x0004002b,0x00000006, +0x00000062,0xbd0e63d6,0x0004002b,0x00000006, +0x00000063,0xbe1694e2,0x0004002b,0x00000006, +0x00000064,0x3c1e95ad,0x0004002b,0x00000006, +0x00000065,0xbd5e5a4c,0x0007002c,0x0000000c, +0x00000066,0x00000062,0x00000063,0x00000064, +0x00000065,0x0007002c,0x00000035,0x00000067, +0x00000057,0x0000005c,0x00000061,0x00000066, +0x0004003b,0x00000009,0x00000068,0x00000000, +0x0004002b,0x00000006,0x0000006e,0x3e085008, +0x0004002b,0x00000006,0x0000006f,0xbdc58020, +0x0004002b,0x00000006,0x00000070,0xbd90c85e, +0x0004002b,0x00000006,0x00000071,0x3e232570, +0x0007002c,0x0000000c,0x00000072,0x0000006e, +0x0000006f,0x00000070,0x00000071,0x0004002b, +0x00000006,0x00000073,0xbef69388,0x0004002b, +0x00000006,0x00000074,0x3dfab1af,0x0004002b, +0x00000006,0x00000075,0xbdb243a7,0x0004002b, +0x00000006,0x00000076,0x3a035766,0x0007002c, +0x0000000c,0x00000077,0x00000073,0x00000074, +0x00000075,0x00000076,0x0004002b,0x00000006, +0x00000078,0xbcc6cea1,0x0004002b,0x00000006, +0x00000079,0xbe670f1e,0x0004002b,0x00000006, +0x0000007a,0x3e0c0155,0x0004002b,0x00000006, +0x0000007b,0x3d4277aa,0x0007002c,0x0000000c, +0x0000007c,0x00000078,0x00000079,0x0000007a, +0x0000007b,0x0004002b,0x00000006,0x0000007d, +0x3f304c5a,0x0004002b,0x00000006,0x0000007e, +0xbbd60f87,0x0004002b,0x00000006,0x0000007f, +0x3e3c93c7,0x0004002b,0x00000006,0x00000080, +0xbe0ac05a,0x0007002c,0x0000000c,0x00000081, +0x0000007d,0x0000007e,0x0000007f,0x00000080, +0x0007002c,0x00000035,0x00000082,0x00000072, +0x00000077,0x0000007c,0x00000081,0x0004002b, +0x00000006,0x00000083,0x00000000,0x0004002b, +0x00000006,0x0000008a,0xbdd6f4d5,0x0004002b, +0x00000006,0x0000008b,0x3d5353a0,0x0004002b, +0x00000006,0x0000008c,0x3de724cb,0x0004002b, +0x00000006,0x0000008d,0x3e2cdaf5,0x0007002c, +0x0000000c,0x0000008e,0x0000008a,0x0000008b, +0x0000008c,0x0000008d,0x0004002b,0x00000006, +0x0000008f,0xbc09b16c,0x0004002b,0x00000006, +0x00000090,0xba271ede,0x0004002b,0x00000006, +0x00000091,0xbd751810,0x0004002b,0x00000006, +0x00000092,0x3e11dc39,0x0007002c,0x0000000c, +0x00000093,0x0000008f,0x00000090,0x00000091, +0x00000092,0x0004002b,0x00000006,0x00000094, +0xbb9e97f6,0x0004002b,0x00000006,0x00000095, +0x3e3b9d2d,0x0004002b,0x00000006,0x00000096, +0x3cbe056f,0x0004002b,0x00000006,0x00000097, +0x3da7473c,0x0007002c,0x0000000c,0x00000098, +0x00000094,0x00000095,0x00000096,0x00000097, +0x0004002b,0x00000006,0x00000099,0xbe0757db, +0x0004002b,0x00000006,0x0000009a,0x3d22e390, +0x0004002b,0x00000006,0x0000009b,0xbbbf2faa, +0x0004002b,0x00000006,0x0000009c,0x3f1415c8, +0x0007002c,0x0000000c,0x0000009d,0x00000099, +0x0000009a,0x0000009b,0x0000009c,0x0007002c, +0x00000035,0x0000009e,0x0000008e,0x00000093, +0x00000098,0x0000009d,0x0004002b,0x00000006, +0x000000a4,0x3e13527f,0x0004002b,0x00000006, +0x000000a5,0xbd8e4179,0x0004002b,0x00000006, +0x000000a6,0xbd2f6bed,0x0004002b,0x00000006, +0x000000a7,0x3e23d6f3,0x0007002c,0x0000000c, +0x000000a8,0x000000a4,0x000000a5,0x000000a6, +0x000000a7,0x0004002b,0x00000006,0x000000a9, +0xbe2916a5,0x0004002b,0x00000006,0x000000aa, +0x3e0e38c2,0x0004002b,0x00000006,0x000000ab, +0xbdb76381,0x0004002b,0x00000006,0x000000ac, +0x3e83934d,0x0007002c,0x0000000c,0x000000ad, +0x000000a9,0x000000aa,0x000000ab,0x000000ac, +0x0004002b,0x00000006,0x000000ae,0x3ea14d58, +0x0004002b,0x00000006,0x000000af,0xbdba7977, +0x0004002b,0x00000006,0x000000b0,0x3d168101, +0x0004002b,0x00000006,0x000000b1,0x3e42ef8f, +0x0007002c,0x0000000c,0x000000b2,0x000000ae, +0x000000af,0x000000b0,0x000000b1,0x0004002b, +0x00000006,0x000000b3,0x3e8fa8b9,0x0004002b, +0x00000006,0x000000b4,0xbd361c8c,0x0004002b, +0x00000006,0x000000b5,0x3bc297fb,0x0004002b, +0x00000006,0x000000b6,0xbe846582,0x0007002c, +0x0000000c,0x000000b7,0x000000b3,0x000000b4, +0x000000b5,0x000000b6,0x0007002c,0x00000035, +0x000000b8,0x000000a8,0x000000ad,0x000000b2, +0x000000b7,0x0004002b,0x00000006,0x000000c0, +0xbdf957c3,0x0004002b,0x00000006,0x000000c1, +0x3c9d18e1,0x0004002b,0x00000006,0x000000c2, +0xbbd67a58,0x0004002b,0x00000006,0x000000c3, +0x3e0e75f1,0x0007002c,0x0000000c,0x000000c4, +0x000000c0,0x000000c1,0x000000c2,0x000000c3, +0x0004002b,0x00000006,0x000000c5,0x3dcc9436, +0x0004002b,0x00000006,0x000000c6,0xbc855d69, +0x0004002b,0x00000006,0x000000c7,0x3d4dbc1b, +0x0004002b,0x00000006,0x000000c8,0x3d179c9d, +0x0007002c,0x0000000c,0x000000c9,0x000000c5, +0x000000c6,0x000000c7,0x000000c8,0x0004002b, +0x00000006,0x000000ca,0x3cee3571,0x0004002b, +0x00000006,0x000000cb,0xbc231c5b,0x0004002b, +0x00000006,0x000000cc,0x3c697f53,0x0004002b, +0x00000006,0x000000cd,0x3dffb9d4,0x0007002c, +0x0000000c,0x000000ce,0x000000ca,0x000000cb, +0x000000cc,0x000000cd,0x0004002b,0x00000006, +0x000000cf,0xbbfc06f1,0x0004002b,0x00000006, +0x000000d0,0x3cce2725,0x0004002b,0x00000006, +0x000000d1,0x3e60508e,0x0004002b,0x00000006, +0x000000d2,0x3b03866a,0x0007002c,0x0000000c, +0x000000d3,0x000000cf,0x000000d0,0x000000d1, +0x000000d2,0x0007002c,0x00000035,0x000000d4, +0x000000c4,0x000000c9,0x000000ce,0x000000d3, +0x0004002b,0x00000006,0x000000da,0x3e8888c8, +0x0004002b,0x00000006,0x000000db,0xbe2673cf, +0x0004002b,0x00000006,0x000000dc,0xbec9aaa6, +0x0004002b,0x00000006,0x000000dd,0xbccff3ee, +0x0007002c,0x0000000c,0x000000de,0x000000da, +0x000000db,0x000000dc,0x000000dd,0x0004002b, +0x00000006,0x000000df,0x3dca2409,0x0004002b, +0x00000006,0x000000e0,0x3e503e09,0x0004002b, +0x00000006,0x000000e1,0x3ea0289f,0x0004002b, +0x00000006,0x000000e2,0x3eebf9b2,0x0007002c, +0x0000000c,0x000000e3,0x000000df,0x000000e0, +0x000000e1,0x000000e2,0x0004002b,0x00000006, +0x000000e4,0x3d7df411,0x0004002b,0x00000006, +0x000000e5,0xbe0e554c,0x0004002b,0x00000006, +0x000000e6,0xbe9e821a,0x0004002b,0x00000006, +0x000000e7,0xbece00f7,0x0007002c,0x0000000c, +0x000000e8,0x000000e4,0x000000e5,0x000000e6, +0x000000e7,0x0004002b,0x00000006,0x000000e9, +0xbde27697,0x0004002b,0x00000006,0x000000ea, +0x3de46f6e,0x0004002b,0x00000006,0x000000eb, +0x3eba5d90,0x0004002b,0x00000006,0x000000ec, +0x3d84393b,0x0007002c,0x0000000c,0x000000ed, +0x000000e9,0x000000ea,0x000000eb,0x000000ec, +0x0007002c,0x00000035,0x000000ee,0x000000de, +0x000000e3,0x000000e8,0x000000ed,0x0004002b, +0x00000006,0x000000f5,0xbe5ab6f6,0x0004002b, +0x00000006,0x000000f6,0xbdd409d4,0x0004002b, +0x00000006,0x000000f7,0x3e37cf8a,0x0004002b, +0x00000006,0x000000f8,0x3e3b356f,0x0007002c, +0x0000000c,0x000000f9,0x000000f5,0x000000f6, +0x000000f7,0x000000f8,0x0004002b,0x00000006, +0x000000fa,0x3d9ff21a,0x0004002b,0x00000006, +0x000000fb,0x3d867f7f,0x0004002b,0x00000006, +0x000000fc,0x3b5cb778,0x0004002b,0x00000006, +0x000000fd,0x3e0b66dc,0x0007002c,0x0000000c, +0x000000fe,0x000000fa,0x000000fb,0x000000fc, +0x000000fd,0x0004002b,0x00000006,0x000000ff, +0x3e2f6034,0x0004002b,0x00000006,0x00000100, +0xbc8d95ba,0x0004002b,0x00000006,0x00000101, +0xbd4db1bf,0x0004002b,0x00000006,0x00000102, +0x3e950359,0x0007002c,0x0000000c,0x00000103, +0x000000ff,0x00000100,0x00000101,0x00000102, +0x0004002b,0x00000006,0x00000104,0x3d8d9149, +0x0004002b,0x00000006,0x00000105,0x3e4637c2, +0x0004002b,0x00000006,0x00000106,0x3d8592ce, +0x0004002b,0x00000006,0x00000107,0x3e24af11, +0x0007002c,0x0000000c,0x00000108,0x00000104, +0x00000105,0x00000106,0x00000107,0x0007002c, +0x00000035,0x00000109,0x000000f9,0x000000fe, +0x00000103,0x00000108,0x0004002b,0x00000006, +0x0000010f,0x3f530858,0x0004002b,0x00000006, +0x00000110,0xbdc891d8,0x0004002b,0x00000006, +0x00000111,0xbd161119,0x0004002b,0x00000006, +0x00000112,0x3e2d499c,0x0007002c,0x0000000c, +0x00000113,0x0000010f,0x00000110,0x00000111, +0x00000112,0x0004002b,0x00000006,0x00000114, +0x3f0d41e9,0x0004002b,0x00000006,0x00000115, +0x3ea81050,0x0004002b,0x00000006,0x00000116, +0xbf4a6190,0x0004002b,0x00000006,0x00000117, +0xbee4806f,0x0007002c,0x0000000c,0x00000118, +0x00000114,0x00000115,0x00000116,0x00000117, +0x0004002b,0x00000006,0x00000119,0xbda47c89, +0x0004002b,0x00000006,0x0000011a,0x3df02142, +0x0004002b,0x00000006,0x0000011b,0x3e3ee83b, +0x0004002b,0x00000006,0x0000011c,0x3e16a1d3, +0x0007002c,0x0000000c,0x0000011d,0x00000119, +0x0000011a,0x0000011b,0x0000011c,0x0004002b, +0x00000006,0x0000011e,0x3e04b602,0x0004002b, +0x00000006,0x0000011f,0xbdcda3f4,0x0004002b, +0x00000006,0x00000120,0x3ea28482,0x0004002b, +0x00000006,0x00000121,0xbdf20697,0x0007002c, +0x0000000c,0x00000122,0x0000011e,0x0000011f, +0x00000120,0x00000121,0x0007002c,0x00000035, +0x00000123,0x00000113,0x00000118,0x0000011d, +0x00000122,0x0004002b,0x00000006,0x0000012a, +0x3cd47ac8,0x0004002b,0x00000006,0x0000012b, +0xbdbf72e8,0x0004002b,0x00000006,0x0000012c, +0x3e9a0dec,0x0004002b,0x00000006,0x0000012d, +0x3ecaa55a,0x0007002c,0x0000000c,0x0000012e, +0x0000012a,0x0000012b,0x0000012c,0x0000012d, +0x0004002b,0x00000006,0x0000012f,0xbecf4cb8, +0x0004002b,0x00000006,0x00000130,0x3e15b3b9, +0x0004002b,0x00000006,0x00000131,0xbe3a4685, +0x0004002b,0x00000006,0x00000132,0xbe437651, +0x0007002c,0x0000000c,0x00000133,0x0000012f, +0x00000130,0x00000131,0x00000132,0x0004002b, +0x00000006,0x00000134,0x3ea37dbc,0x0004002b, +0x00000006,0x00000135,0xbf3e6a55,0x0004002b, +0x00000006,0x00000136,0x3e448eca,0x0004002b, +0x00000006,0x00000137,0xbe5379af,0x0007002c, +0x0000000c,0x00000138,0x00000134,0x00000135, +0x00000136,0x00000137,0x0004002b,0x00000006, +0x00000139,0x3e336dd2,0x0004002b,0x00000006, +0x0000013a,0xbf2f1ade,0x0004002b,0x00000006, +0x0000013b,0x3e22aa13,0x0004002b,0x00000006, +0x0000013c,0xbeca8cef,0x0007002c,0x0000000c, +0x0000013d,0x00000139,0x0000013a,0x0000013b, +0x0000013c,0x0007002c,0x00000035,0x0000013e, +0x0000012e,0x00000133,0x00000138,0x0000013d, +0x0004002b,0x00000006,0x00000144,0x3e213910, +0x0004002b,0x00000006,0x00000145,0xbc3c4b15, +0x0004002b,0x00000006,0x00000146,0xbdf77490, +0x0004002b,0x00000006,0x00000147,0x3e52c438, +0x0007002c,0x0000000c,0x00000148,0x00000144, +0x00000145,0x00000146,0x00000147,0x0004002b, +0x00000006,0x00000149,0x3e936a5f,0x0004002b, +0x00000006,0x0000014a,0xbd2bfb26,0x0004002b, +0x00000006,0x0000014b,0xbe42c55a,0x0004002b, +0x00000006,0x0000014c,0xbe8b763a,0x0007002c, +0x0000000c,0x0000014d,0x00000149,0x0000014a, +0x0000014b,0x0000014c,0x0004002b,0x00000006, +0x0000014e,0xbdde7563,0x0004002b,0x00000006, +0x0000014f,0xbdb25d8d,0x0004002b,0x00000006, +0x00000150,0x3f5c4fe0,0x0004002b,0x00000006, +0x00000151,0x3e8804e1,0x0007002c,0x0000000c, +0x00000152,0x0000014e,0x0000014f,0x00000150, +0x00000151,0x0004002b,0x00000006,0x00000153, +0xbe295868,0x0004002b,0x00000006,0x00000154, +0x3da73214,0x0004002b,0x00000006,0x00000155, +0xbc61e31b,0x0004002b,0x00000006,0x00000156, +0x3e12d3a5,0x0007002c,0x0000000c,0x00000157, +0x00000153,0x00000154,0x00000155,0x00000156, +0x0007002c,0x00000035,0x00000158,0x00000148, +0x0000014d,0x00000152,0x00000157,0x0004002b, +0x00000006,0x0000015f,0xbe20595f,0x0004002b, +0x00000006,0x00000160,0xbcfbe558,0x0004002b, +0x00000006,0x00000161,0xbdd83016,0x0004002b, +0x00000006,0x00000162,0x3e83c498,0x0007002c, +0x0000000c,0x00000163,0x0000015f,0x00000160, +0x00000161,0x00000162,0x0004002b,0x00000006, +0x00000164,0xbdf30f9c,0x0004002b,0x00000006, +0x00000165,0x3de9c5ff,0x0004002b,0x00000006, +0x00000166,0xbcdf6ee9,0x0004002b,0x00000006, +0x00000167,0xbdd6dbd5,0x0007002c,0x0000000c, +0x00000168,0x00000164,0x00000165,0x00000166, +0x00000167,0x0004002b,0x00000006,0x00000169, +0x3e7a667e,0x0004002b,0x00000006,0x0000016a, +0xbb369cf4,0x0004002b,0x00000006,0x0000016b, +0xbe342e0e,0x0004002b,0x00000006,0x0000016c, +0xbe1f6f49,0x0007002c,0x0000000c,0x0000016d, +0x00000169,0x0000016a,0x0000016b,0x0000016c, +0x0004002b,0x00000006,0x0000016e,0x3d61884e, +0x0004002b,0x00000006,0x0000016f,0x3e2e8765, +0x0004002b,0x00000006,0x00000170,0x3daed486, +0x0004002b,0x00000006,0x00000171,0x3ea7fad9, +0x0007002c,0x0000000c,0x00000172,0x0000016e, +0x0000016f,0x00000170,0x00000171,0x0007002c, +0x00000035,0x00000173,0x00000163,0x00000168, +0x0000016d,0x00000172,0x0004002b,0x00000006, +0x00000179,0x3e159292,0x0004002b,0x00000006, +0x0000017a,0x3ed72525,0x0004002b,0x00000006, +0x0000017b,0xbeba4818,0x0004002b,0x00000006, +0x0000017c,0xbdc45375,0x0007002c,0x0000000c, +0x0000017d,0x00000179,0x0000017a,0x0000017b, +0x0000017c,0x0004002b,0x00000006,0x0000017e, +0xbd49bd07,0x0004002b,0x00000006,0x0000017f, +0xbebb9bda,0x0004002b,0x00000006,0x00000180, +0x3da2b00a,0x0004002b,0x00000006,0x00000181, +0x3d237009,0x0007002c,0x0000000c,0x00000182, +0x0000017e,0x0000017f,0x00000180,0x00000181, +0x0004002b,0x00000006,0x00000183,0x3d80dc19, +0x0004002b,0x00000006,0x00000184,0x3e2a497a, +0x0004002b,0x00000006,0x00000185,0xbdcd1b20, +0x0004002b,0x00000006,0x00000186,0xbd709fb9, +0x0007002c,0x0000000c,0x00000187,0x00000183, +0x00000184,0x00000185,0x00000186,0x0004002b, +0x00000006,0x00000188,0xbd2265ce,0x0004002b, +0x00000006,0x00000189,0x3ae306cf,0x0004002b, +0x00000006,0x0000018a,0x3d00fca7,0x0004002b, +0x00000006,0x0000018b,0xbca60d72,0x0007002c, +0x0000000c,0x0000018c,0x00000188,0x00000189, +0x0000018a,0x0000018b,0x0007002c,0x00000035, +0x0000018d,0x0000017d,0x00000182,0x00000187, +0x0000018c,0x0004002b,0x00000006,0x00000194, +0xbdc5824a,0x0004002b,0x00000006,0x00000195, +0x3d1bc768,0x0004002b,0x00000006,0x00000196, +0x3d22396d,0x0004002b,0x00000006,0x00000197, +0x3cd979c3,0x0007002c,0x0000000c,0x00000198, +0x00000194,0x00000195,0x00000196,0x00000197, +0x0004002b,0x00000006,0x00000199,0xbc8469d2, +0x0004002b,0x00000006,0x0000019a,0xbe3fc998, +0x0004002b,0x00000006,0x0000019b,0x3e2b020f, +0x0004002b,0x00000006,0x0000019c,0x3b411c8d, +0x0007002c,0x0000000c,0x0000019d,0x00000199, +0x0000019a,0x0000019b,0x0000019c,0x0004002b, +0x00000006,0x0000019e,0xbde004c9,0x0004002b, +0x00000006,0x0000019f,0xbeb9d0ad,0x0004002b, +0x00000006,0x000001a0,0xbd669a0b,0x0004002b, +0x00000006,0x000001a1,0x3e379224,0x0007002c, +0x0000000c,0x000001a2,0x0000019e,0x0000019f, +0x000001a0,0x000001a1,0x0004002b,0x00000006, +0x000001a3,0xbca7005a,0x0004002b,0x00000006, +0x000001a4,0x3dc9857b,0x0004002b,0x00000006, +0x000001a5,0x3bc00f13,0x0004002b,0x00000006, +0x000001a6,0x3e26a6c6,0x0007002c,0x0000000c, +0x000001a7,0x000001a3,0x000001a4,0x000001a5, +0x000001a6,0x0007002c,0x00000035,0x000001a8, +0x00000198,0x0000019d,0x000001a2,0x000001a7, +0x0004002b,0x00000006,0x000001ae,0xbde4f60c, +0x0004002b,0x00000006,0x000001af,0x3f41987b, +0x0004002b,0x00000006,0x000001b0,0xbe518930, +0x0004002b,0x00000006,0x000001b1,0x3e2bcfa1, +0x0007002c,0x0000000c,0x000001b2,0x000001ae, +0x000001af,0x000001b0,0x000001b1,0x0004002b, +0x00000006,0x000001b3,0xbe534d0d,0x0004002b, +0x00000006,0x000001b4,0xbf1a33e8,0x0004002b, +0x00000006,0x000001b5,0xbf12ec7c,0x0004002b, +0x00000006,0x000001b6,0x3f02d427,0x0007002c, +0x0000000c,0x000001b7,0x000001b3,0x000001b4, +0x000001b5,0x000001b6,0x0004002b,0x00000006, +0x000001b8,0xbd927cb1,0x0004002b,0x00000006, +0x000001b9,0xbe0cad2c,0x0004002b,0x00000006, +0x000001ba,0x3e00253c,0x0004002b,0x00000006, +0x000001bb,0xbd438f74,0x0007002c,0x0000000c, +0x000001bc,0x000001b8,0x000001b9,0x000001ba, +0x000001bb,0x0004002b,0x00000006,0x000001bd, +0x3efe05c6,0x0004002b,0x00000006,0x000001be, +0x3e89abc8,0x0004002b,0x00000006,0x000001bf, +0x3ea11767,0x0004002b,0x00000006,0x000001c0, +0xbf050c11,0x0007002c,0x0000000c,0x000001c1, +0x000001bd,0x000001be,0x000001bf,0x000001c0, +0x0007002c,0x00000035,0x000001c2,0x000001b2, +0x000001b7,0x000001bc,0x000001c1,0x0004002b, +0x00000006,0x000001c9,0xbe06a2d6,0x0004002b, +0x00000006,0x000001ca,0x3d98d685,0x0004002b, +0x00000006,0x000001cb,0x3eb108c2,0x0004002b, +0x00000006,0x000001cc,0x3e835216,0x0007002c, +0x0000000c,0x000001cd,0x000001c9,0x000001ca, +0x000001cb,0x000001cc,0x0004002b,0x00000006, +0x000001ce,0x3dabe72b,0x0004002b,0x00000006, +0x000001cf,0xbf1d183e,0x0004002b,0x00000006, +0x000001d0,0xbeede3eb,0x0004002b,0x00000006, +0x000001d1,0x3d7ac7b6,0x0007002c,0x0000000c, +0x000001d2,0x000001ce,0x000001cf,0x000001d0, +0x000001d1,0x0004002b,0x00000006,0x000001d3, +0xbe43a447,0x0004002b,0x00000006,0x000001d4, +0xbdbf8419,0x0004002b,0x00000006,0x000001d5, +0xbe786cec,0x0004002b,0x00000006,0x000001d6, +0x3e5757cf,0x0007002c,0x0000000c,0x000001d7, +0x000001d3,0x000001d4,0x000001d5,0x000001d6, +0x0004002b,0x00000006,0x000001d8,0x3e2150db, +0x0004002b,0x00000006,0x000001d9,0x3f1d5046, +0x0004002b,0x00000006,0x000001da,0x3eac7312, +0x0004002b,0x00000006,0x000001db,0xbdc77e85, +0x0007002c,0x0000000c,0x000001dc,0x000001d8, +0x000001d9,0x000001da,0x000001db,0x0007002c, +0x00000035,0x000001dd,0x000001cd,0x000001d2, +0x000001d7,0x000001dc,0x0004002b,0x00000006, +0x000001e3,0x3d678d9c,0x0004002b,0x00000006, +0x000001e4,0x3e751479,0x0004002b,0x00000006, +0x000001e5,0xbdbf10d5,0x0004002b,0x00000006, +0x000001e6,0x3e1f42d5,0x0007002c,0x0000000c, +0x000001e7,0x000001e3,0x000001e4,0x000001e5, +0x000001e6,0x0004002b,0x00000006,0x000001e8, +0x3c4af6aa,0x0004002b,0x00000006,0x000001e9, +0xbdff886c,0x0004002b,0x00000006,0x000001ea, +0xbd6743aa,0x0004002b,0x00000006,0x000001eb, +0xbde6904b,0x0007002c,0x0000000c,0x000001ec, +0x000001e8,0x000001e9,0x000001ea,0x000001eb, +0x0004002b,0x00000006,0x000001ed,0xbc2b609e, +0x0004002b,0x00000006,0x000001ee,0x3d45af5f, +0x0004002b,0x00000006,0x000001ef,0x3e6d34ee, +0x0004002b,0x00000006,0x000001f0,0x3dddf203, +0x0007002c,0x0000000c,0x000001f1,0x000001ed, +0x000001ee,0x000001ef,0x000001f0,0x0004002b, +0x00000006,0x000001f2,0xbd576adc,0x0004002b, +0x00000006,0x000001f3,0x3d83e39a,0x0004002b, +0x00000006,0x000001f4,0xbd575745,0x0004002b, +0x00000006,0x000001f5,0xbd4e21bb,0x0007002c, +0x0000000c,0x000001f6,0x000001f2,0x000001f3, +0x000001f4,0x000001f5,0x0007002c,0x00000035, +0x000001f7,0x000001e7,0x000001ec,0x000001f1, +0x000001f6,0x0004002b,0x00000006,0x000001fe, +0xbe3bf107,0x0004002b,0x00000006,0x000001ff, +0x3dc85e44,0x0004002b,0x00000006,0x00000200, +0xbde3b35e,0x0004002b,0x00000006,0x00000201, +0x3e57fe03,0x0007002c,0x0000000c,0x00000202, +0x000001fe,0x000001ff,0x00000200,0x00000201, +0x0004002b,0x00000006,0x00000203,0x3d50a3a0, +0x0004002b,0x00000006,0x00000204,0xbe4c0d17, +0x0004002b,0x00000006,0x00000205,0x3d8ad70b, +0x0004002b,0x00000006,0x00000206,0xbdb22e5a, +0x0007002c,0x0000000c,0x00000207,0x00000203, +0x00000204,0x00000205,0x00000206,0x0004002b, +0x00000006,0x00000208,0xbd28dcd0,0x0004002b, +0x00000006,0x00000209,0xbd8ee494,0x0004002b, +0x00000006,0x0000020a,0xbdc61e40,0x0004002b, +0x00000006,0x0000020b,0x3c60f761,0x0007002c, +0x0000000c,0x0000020c,0x00000208,0x00000209, +0x0000020a,0x0000020b,0x0004002b,0x00000006, +0x0000020d,0x3ca057a5,0x0004002b,0x00000006, +0x0000020e,0x3d2808cc,0x0004002b,0x00000006, +0x0000020f,0x3decff24,0x0004002b,0x00000006, +0x00000210,0x3e69d40c,0x0007002c,0x0000000c, +0x00000211,0x0000020d,0x0000020e,0x0000020f, +0x00000210,0x0007002c,0x00000035,0x00000212, +0x00000202,0x00000207,0x0000020c,0x00000211, +0x0007002c,0x0000000c,0x00000219,0x00000083, +0x00000083,0x00000083,0x00000083,0x0004002b, +0x00000006,0x0000021b,0x3e4bee7c,0x0004002b, +0x00000006,0x0000021c,0xbe02a332,0x0004002b, +0x00000006,0x0000021d,0xbd7f2007,0x0004002b, +0x00000006,0x0000021e,0x3e2271ba,0x0007002c, +0x0000000c,0x0000021f,0x0000021b,0x0000021c, +0x0000021d,0x0000021e,0x00040015,0x00000227, +0x00000020,0x00000000,0x00040017,0x00000228, +0x00000227,0x00000003,0x00040020,0x00000229, +0x00000001,0x00000228,0x0004003b,0x00000229, +0x0000022a,0x00000001,0x00040017,0x0000022b, +0x00000227,0x00000002,0x00020014,0x0000022f, +0x0004002b,0x00000227,0x00000230,0x00000000, +0x00040020,0x00000234,0x00000009,0x00000016, +0x0004002b,0x00000227,0x0000023b,0x00000001, +0x00090019,0x00000245,0x00000006,0x00000001, +0x00000000,0x00000000,0x00000000,0x00000002, +0x00000002,0x00040020,0x00000246,0x00000000, +0x00000245,0x0004003b,0x00000246,0x00000247, +0x00000000,0x0004002b,0x00000227,0x0000024b, +0x00000010,0x0006002c,0x00000228,0x0000024c, +0x0000024b,0x0000024b,0x0000023b,0x0004002b, +0x00000016,0x000003b8,0xffffffff,0x0005002c, +0x00000017,0x000003b9,0x000003b8,0x000003b8, +0x0005002c,0x00000017,0x000003ba,0x00000026, +0x00000026,0x0005002c,0x00000017,0x000003bb, +0x000003b8,0x0000001e,0x0005002c,0x00000017, +0x000003bc,0x000003b8,0x00000026,0x0005002c, +0x00000017,0x000003bd,0x0000001e,0x000003b8, +0x0005002c,0x00000017,0x000003be,0x0000001e, +0x00000026,0x0005002c,0x00000017,0x000003bf, +0x00000026,0x000003b8,0x0005002c,0x00000017, +0x000003c0,0x00000026,0x0000001e,0x00050036, +0x00000002,0x00000004,0x00000000,0x00000003, +0x000200f8,0x00000005,0x000300f7,0x0000024e, +0x00000000,0x000300fb,0x00000230,0x0000024f, +0x000200f8,0x0000024f,0x0004003d,0x00000228, +0x0000022c,0x0000022a,0x0007004f,0x0000022b, +0x0000022d,0x0000022c,0x0000022c,0x00000000, +0x00000001,0x0004007c,0x00000017,0x0000022e, +0x0000022d,0x00050051,0x00000016,0x00000233, +0x0000022e,0x00000000,0x00060041,0x00000234, +0x00000235,0x00000022,0x0000001e,0x00000230, +0x0004003d,0x00000016,0x00000236,0x00000235, +0x000500af,0x0000022f,0x00000237,0x00000233, +0x00000236,0x000400a8,0x0000022f,0x00000238, +0x00000237,0x000300f7,0x0000023a,0x00000000, +0x000400fa,0x00000238,0x00000239,0x0000023a, +0x000200f8,0x00000239,0x00050051,0x00000016, +0x0000023d,0x0000022e,0x00000001,0x00060041, +0x00000234,0x0000023e,0x00000022,0x0000001e, +0x0000023b,0x0004003d,0x00000016,0x0000023f, +0x0000023e,0x000500af,0x0000022f,0x00000240, +0x0000023d,0x0000023f,0x000200f9,0x0000023a, +0x000200f8,0x0000023a,0x000700f5,0x0000022f, +0x00000241,0x00000237,0x0000024f,0x00000240, +0x00000239,0x000300f7,0x00000243,0x00000000, +0x000400fa,0x00000241,0x00000242,0x00000243, +0x000200f8,0x00000242,0x000200f9,0x0000024e, +0x000200f8,0x00000243,0x0004003d,0x00000245, +0x00000248,0x00000247,0x0004003d,0x00000008, +0x000002ba,0x0000004b,0x00050080,0x00000017, +0x000002be,0x0000022e,0x000003b9,0x00050041, +0x00000023,0x000002bf,0x00000022,0x0000001e, +0x0004003d,0x00000017,0x000002c0,0x000002bf, +0x00050082,0x00000017,0x000002c2,0x000002c0, +0x000003ba,0x0008000c,0x00000017,0x000002c3, +0x00000001,0x0000002d,0x000002be,0x0000001f, +0x000002c2,0x00040064,0x00000007,0x000002c4, +0x000002ba,0x0007005f,0x0000000c,0x000002c5, +0x000002c4,0x000002c3,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x0000026a,0x0000004a, +0x000002c5,0x00050081,0x0000000c,0x0000026c, +0x00000034,0x0000026a,0x0004003d,0x00000008, +0x000002c8,0x00000068,0x00040064,0x00000007, +0x000002d2,0x000002c8,0x0007005f,0x0000000c, +0x000002d3,0x000002d2,0x000002c3,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x0000026e, +0x00000067,0x000002d3,0x00050081,0x0000000c, +0x00000270,0x0000026c,0x0000026e,0x0004003d, +0x00000008,0x000002d6,0x0000004b,0x00050080, +0x00000017,0x000002da,0x0000022e,0x000003bb, +0x0008000c,0x00000017,0x000002df,0x00000001, +0x0000002d,0x000002da,0x0000001f,0x000002c2, +0x00040064,0x00000007,0x000002e0,0x000002d6, +0x0007005f,0x0000000c,0x000002e1,0x000002e0, +0x000002df,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x00000272,0x00000082,0x000002e1, +0x00050081,0x0000000c,0x00000274,0x00000270, +0x00000272,0x0004003d,0x00000008,0x000002e4, +0x00000068,0x00040064,0x00000007,0x000002ee, +0x000002e4,0x0007005f,0x0000000c,0x000002ef, +0x000002ee,0x000002df,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x00000276,0x0000009e, +0x000002ef,0x00050081,0x0000000c,0x00000278, +0x00000274,0x00000276,0x0004003d,0x00000008, +0x000002f2,0x0000004b,0x00050080,0x00000017, +0x000002f6,0x0000022e,0x000003bc,0x0008000c, +0x00000017,0x000002fb,0x00000001,0x0000002d, +0x000002f6,0x0000001f,0x000002c2,0x00040064, +0x00000007,0x000002fc,0x000002f2,0x0007005f, +0x0000000c,0x000002fd,0x000002fc,0x000002fb, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x0000027a,0x000000b8,0x000002fd,0x00050081, +0x0000000c,0x0000027c,0x00000278,0x0000027a, +0x0004003d,0x00000008,0x00000300,0x00000068, +0x00040064,0x00000007,0x0000030a,0x00000300, +0x0007005f,0x0000000c,0x0000030b,0x0000030a, +0x000002fb,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x0000027e,0x000000d4,0x0000030b, +0x00050081,0x0000000c,0x00000280,0x0000027c, +0x0000027e,0x0004003d,0x00000008,0x0000030e, +0x0000004b,0x00050080,0x00000017,0x00000312, +0x0000022e,0x000003bd,0x0008000c,0x00000017, +0x00000317,0x00000001,0x0000002d,0x00000312, +0x0000001f,0x000002c2,0x00040064,0x00000007, +0x00000318,0x0000030e,0x0007005f,0x0000000c, +0x00000319,0x00000318,0x00000317,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x00000282, +0x000000ee,0x00000319,0x00050081,0x0000000c, +0x00000284,0x00000280,0x00000282,0x0004003d, +0x00000008,0x0000031c,0x00000068,0x00040064, +0x00000007,0x00000326,0x0000031c,0x0007005f, +0x0000000c,0x00000327,0x00000326,0x00000317, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x00000286,0x00000109,0x00000327,0x00050081, +0x0000000c,0x00000288,0x00000284,0x00000286, +0x0004003d,0x00000008,0x0000032a,0x0000004b, +0x0008000c,0x00000017,0x00000333,0x00000001, +0x0000002d,0x0000022e,0x0000001f,0x000002c2, +0x00040064,0x00000007,0x00000334,0x0000032a, +0x0007005f,0x0000000c,0x00000335,0x00000334, +0x00000333,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x0000028a,0x00000123,0x00000335, +0x00050081,0x0000000c,0x0000028c,0x00000288, +0x0000028a,0x0004003d,0x00000008,0x00000338, +0x00000068,0x00040064,0x00000007,0x00000342, +0x00000338,0x0007005f,0x0000000c,0x00000343, +0x00000342,0x00000333,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x0000028e,0x0000013e, +0x00000343,0x00050081,0x0000000c,0x00000290, +0x0000028c,0x0000028e,0x0004003d,0x00000008, +0x00000346,0x0000004b,0x00050080,0x00000017, +0x0000034a,0x0000022e,0x000003be,0x0008000c, +0x00000017,0x0000034f,0x00000001,0x0000002d, +0x0000034a,0x0000001f,0x000002c2,0x00040064, +0x00000007,0x00000350,0x00000346,0x0007005f, +0x0000000c,0x00000351,0x00000350,0x0000034f, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x00000292,0x00000158,0x00000351,0x00050081, +0x0000000c,0x00000294,0x00000290,0x00000292, +0x0004003d,0x00000008,0x00000354,0x00000068, +0x00040064,0x00000007,0x0000035e,0x00000354, +0x0007005f,0x0000000c,0x0000035f,0x0000035e, +0x0000034f,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x00000296,0x00000173,0x0000035f, +0x00050081,0x0000000c,0x00000298,0x00000294, +0x00000296,0x0004003d,0x00000008,0x00000362, +0x0000004b,0x00050080,0x00000017,0x00000366, +0x0000022e,0x000003bf,0x0008000c,0x00000017, +0x0000036b,0x00000001,0x0000002d,0x00000366, +0x0000001f,0x000002c2,0x00040064,0x00000007, +0x0000036c,0x00000362,0x0007005f,0x0000000c, +0x0000036d,0x0000036c,0x0000036b,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x0000029a, +0x0000018d,0x0000036d,0x00050081,0x0000000c, +0x0000029c,0x00000298,0x0000029a,0x0004003d, +0x00000008,0x00000370,0x00000068,0x00040064, +0x00000007,0x0000037a,0x00000370,0x0007005f, +0x0000000c,0x0000037b,0x0000037a,0x0000036b, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x0000029e,0x000001a8,0x0000037b,0x00050081, +0x0000000c,0x000002a0,0x0000029c,0x0000029e, +0x0004003d,0x00000008,0x0000037e,0x0000004b, +0x00050080,0x00000017,0x00000382,0x0000022e, +0x000003c0,0x0008000c,0x00000017,0x00000387, +0x00000001,0x0000002d,0x00000382,0x0000001f, +0x000002c2,0x00040064,0x00000007,0x00000388, +0x0000037e,0x0007005f,0x0000000c,0x00000389, +0x00000388,0x00000387,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x000002a2,0x000001c2, +0x00000389,0x00050081,0x0000000c,0x000002a4, +0x000002a0,0x000002a2,0x0004003d,0x00000008, +0x0000038c,0x00000068,0x00040064,0x00000007, +0x00000396,0x0000038c,0x0007005f,0x0000000c, +0x00000397,0x00000396,0x00000387,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x000002a6, +0x000001dd,0x00000397,0x00050081,0x0000000c, +0x000002a8,0x000002a4,0x000002a6,0x0004003d, +0x00000008,0x0000039a,0x0000004b,0x00050080, +0x00000017,0x0000039e,0x0000022e,0x000003ba, +0x0008000c,0x00000017,0x000003a3,0x00000001, +0x0000002d,0x0000039e,0x0000001f,0x000002c2, +0x00040064,0x00000007,0x000003a4,0x0000039a, +0x0007005f,0x0000000c,0x000003a5,0x000003a4, +0x000003a3,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x000002aa,0x000001f7,0x000003a5, +0x00050081,0x0000000c,0x000002ac,0x000002a8, +0x000002aa,0x0004003d,0x00000008,0x000003a8, +0x00000068,0x00040064,0x00000007,0x000003b2, +0x000003a8,0x0007005f,0x0000000c,0x000003b3, +0x000003b2,0x000003a3,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x000002ae,0x00000212, +0x000003b3,0x00050081,0x0000000c,0x000002b0, +0x000002ac,0x000002ae,0x0007000c,0x0000000c, +0x000002b2,0x00000001,0x00000028,0x000002b0, +0x00000219,0x0007000c,0x0000000c,0x000002b4, +0x00000001,0x00000025,0x000002b0,0x00000219, +0x00050085,0x0000000c,0x000002b5,0x0000021f, +0x000002b4,0x00050081,0x0000000c,0x000002b6, +0x000002b2,0x000002b5,0x00040063,0x00000248, +0x0000022e,0x000002b6,0x000200f9,0x0000024e, +0x000200f8,0x0000024e,0x000100fd,0x00010038} diff --git a/app/src/shaders/fsrcnnx/pass_08.comp b/app/src/shaders/fsrcnnx/pass_08.comp new file mode 100644 index 0000000..b14dcaf --- /dev/null +++ b/app/src/shaders/fsrcnnx/pass_08.comp @@ -0,0 +1,46 @@ +#version 450 +// Generated by tools/gen_fsrcnnx.js from third_party/FSRCNNX_x2_8-0-4-1.glsl +// (FSRCNNX by igv, LGPL-3.0). Layer: mapping 3_2. Do not edit. +layout(local_size_x = 16, local_size_y = 16) in; +layout(binding = 0, rgba16f) uniform writeonly image2D dst; +layout(binding = 1) uniform sampler2D in0; +layout(binding = 2) uniform sampler2D in1; +layout(binding = 3) uniform sampler2D in2; +layout(push_constant) uniform Params { ivec2 size; } p; + +ivec2 at_; +vec4 fetch_(sampler2D s, vec2 o) { return texelFetch(s, clamp(at_ + ivec2(o), ivec2(0), p.size - 1), 0); } +#define MODEL1_texOff(o) fetch_(in0, vec2(o)) +#define MODEL2_texOff(o) fetch_(in1, vec2(o)) + +vec4 hook() +{ +vec4 res = vec4(-0.0089084329083562,-0.0336172059178352,0.0177190825343132,0.0529975406825542); +res += mat4(-0.0275970958173275,0.0141968233510852,0.1181544512510300,-0.0572245270013809,0.1161347925662994,-0.1156444773077965,-0.2549640238285065,0.0882879272103310,-0.0715355500578880,0.0151285668835044,0.1079384386539459,0.0650847703218460,-0.1597152203321457,0.0669793561100960,0.2084401696920395,-0.0951152443885803) * MODEL1_texOff(vec2(-1,-1)); +res += mat4(0.0404323227703571,-0.0206144321709871,-0.1080420613288879,-0.2038477361202240,0.0248847268521786,-0.0064681121148169,0.0389525443315506,0.0011026862775907,0.0885242074728012,0.0295896343886852,-0.3323790132999420,0.1935138553380966,-0.0466548874974251,0.1023886054754257,0.1257870644330978,-0.1541756242513657) * MODEL2_texOff(vec2(-1,-1)); +res += mat4(-0.0076520540751517,0.0361139886081219,0.1749804913997650,-0.2051989138126373,0.0022692133206874,-0.0282937753945589,-0.2039019316434860,-0.2343468815088272,-0.0357327871024609,-0.0570764988660812,0.2925858795642853,-0.1988349705934525,-0.0584560707211494,-0.0341510921716690,0.1300961822271347,0.5184492468833923) * MODEL1_texOff(vec2(-1,0)); +res += mat4(0.0884973928332329,0.0333527140319347,0.0180535931140184,-0.2655122876167297,0.0433661043643951,0.0104369185864925,0.0010909073753282,-0.0705273598432541,-0.0602585524320602,0.2420269846916199,-0.4731841087341309,-0.8040290474891663,0.3066828548908234,-0.2466925680637360,0.0938910692930222,-0.2002603262662888) * MODEL2_texOff(vec2(-1,0)); +res += mat4(0.0549152903258801,0.0291299298405647,0.0946277007460594,-0.0581608228385448,0.0669180899858475,-0.0635575056076050,-0.2427970170974731,-0.2677550315856934,0.2226776182651520,0.1301570236682892,-0.1519709974527359,0.0671724304556847,-0.0526433289051056,0.1898351758718491,0.2383745312690735,0.2191711813211441) * MODEL1_texOff(vec2(-1,1)); +res += mat4(-0.0234222635626793,0.0238620284944773,0.0427630320191383,-0.1080563366413116,0.0332126952707767,-0.0039051575586200,0.0293126031756401,0.0161924213171005,0.0453971028327942,0.0131999952718616,-0.0689036697149277,0.2349009960889816,0.1013344153761864,0.2706570029258728,0.1191426888108253,-0.2830821871757507) * MODEL2_texOff(vec2(-1,1)); +res += mat4(0.0181465242058039,-0.0571886636316776,0.4875229001045227,-0.4244020283222198,0.4331104159355164,0.1066712513566017,-0.5277034044265747,0.1110567077994347,-0.1179447323083878,-0.0273578558117151,0.1798476576805115,-0.2829602360725403,0.1012385115027428,-0.2528488039970398,0.1697608679533005,0.1121710017323494) * MODEL1_texOff(vec2(0,-1)); +res += mat4(-0.1404130905866623,-0.0984055623412132,-0.0279541295021772,-0.1321212500333786,-0.0841855704784393,0.1336171030998230,-0.1458790600299835,-0.0044095455668867,0.2203754037618637,0.1455714553594589,-0.2362042963504791,-0.0329121425747871,-0.1683547794818878,0.0289597529917955,0.3424547612667084,0.0143845872953534) * MODEL2_texOff(vec2(0,-1)); +res += mat4(0.0287246014922857,0.1948280781507492,0.5998955368995667,0.1192114129662514,-0.6269109249114990,0.8724324703216553,-0.6399638652801514,-0.4201497733592987,-0.3355066180229187,-0.1566904038190842,-0.4396412074565887,0.1525828838348389,0.5573399066925049,0.2324324846267700,0.2762884795665741,0.0406046211719513) * MODEL1_texOff(vec2(0,0)); +res += mat4(0.3890096545219421,-0.0574061162769794,-0.1468243300914764,-0.5953360199928284,-0.1363215148448944,-0.2224670499563217,-0.2237723320722580,0.2738097012042999,-0.4868114292621613,-0.5029351711273193,-0.3570256233215332,-0.1776263266801834,-0.0176672954112291,-0.4318660795688629,1.0395888090133667,0.1728395074605942) * MODEL2_texOff(vec2(0,0)); +res += mat4(0.1337304115295410,-0.0809440389275551,0.1600498855113983,-0.1108811497688293,-0.2376178801059723,-0.1532768607139587,-0.0447455830872059,0.2515332102775574,0.4848278462886810,-0.0915748402476311,-0.0336527302861214,-0.2141884714365005,0.2125129699707031,0.3237875998020172,0.0022272330243140,-0.0167857185006142) * MODEL1_texOff(vec2(0,1)); +res += mat4(0.0457934997975826,0.0510537698864937,-0.0519523508846760,-0.4506326615810394,-0.1029204949736595,0.0116113182157278,-0.1750748157501221,-0.0048758201301098,0.1506977379322052,0.0633068457245827,-0.1628549993038177,-0.0144928665831685,0.1408756822347641,0.2896180152893066,0.0803691521286964,-0.4930096566677094) * MODEL2_texOff(vec2(0,1)); +res += mat4(-0.0484248884022236,0.1371297985315323,-0.1235475391149521,-0.2618594765663147,-0.0280395895242691,0.0248795989900827,0.1204105168581009,0.3246576189994812,0.0426272377371788,-0.0520061068236828,0.0575957447290421,-0.2613646090030670,0.1165295541286469,-0.0390013493597507,-0.0470846109092236,-0.0014663023175672) * MODEL1_texOff(vec2(1,-1)); +res += mat4(-0.1066762879490852,-0.0869804695248604,-0.0099332248792052,-0.1355892717838287,-0.0760413780808449,0.1377770304679871,-0.0263407956808805,0.0880135521292686,0.1496269851922989,-0.0487459264695644,0.1286851912736893,0.2218491584062576,0.1723349541425705,-0.0165541302412748,-0.0690477639436722,-0.2388458102941513) * MODEL2_texOff(vec2(1,-1)); +res += mat4(-0.4236431121826172,0.0465179122984409,-0.1526456624269485,0.1426440477371216,0.5913932919502258,-0.1082349196076393,0.2731275856494904,-0.2687640488147736,-0.4628683030605316,-0.0537119321525097,-0.1597615629434586,0.0528527684509754,-0.3485085070133209,0.1395110934972763,0.0642972290515900,0.0323829315602779) * MODEL1_texOff(vec2(1,0)); +res += mat4(0.0066713397391140,-0.0482029877603054,-0.1707276403903961,-0.1001396998763084,0.0539822019636631,-0.1624453216791153,0.4913550019264221,0.3687861263751984,0.0491421781480312,0.1311376541852951,0.0992425829172134,-0.4636098444461823,-0.3415873646736145,-0.0153833786025643,-0.0270162131637335,-0.0935514941811562) * MODEL2_texOff(vec2(1,0)); +res += mat4(-0.1738258153200150,0.0458541549742222,-0.0653749182820320,-0.0156540926545858,-0.0357586294412613,-0.1486178338527679,0.1798035055398941,-0.1310307979583740,0.0783249065279961,-0.0261360015720129,-0.1047066971659660,0.3385537564754486,-0.0339452810585499,0.2299628853797913,-0.1408322304487228,-0.0352708548307419) * MODEL1_texOff(vec2(1,1)); +res += mat4(0.0463018082082272,0.0565674640238285,-0.0538956597447395,-0.2354862987995148,0.0297824125736952,0.0307939313352108,0.1271791011095047,-0.1025698855519295,0.1060482114553452,-0.0703211054205894,-0.0083062350749969,0.0474255047738552,0.0442508421838284,0.1569559425115585,-0.0442709513008595,-0.1188704669475555) * MODEL2_texOff(vec2(1,1)); +res = max(res, vec4(0.0)) + vec4(0.7366524934768677,1.0013850927352905,-0.0276311747729778,0.0734841898083687) * min(res, vec4(0.0)); +return res; +} + +void main() +{ + at_ = ivec2(gl_GlobalInvocationID.xy); + if (at_.x >= p.size.x || at_.y >= p.size.y) return; + imageStore(dst, at_, hook()); +} diff --git a/app/src/shaders/fsrcnnx/pass_08.spv.inc b/app/src/shaders/fsrcnnx/pass_08.spv.inc new file mode 100644 index 0000000..4e54a7c --- /dev/null +++ b/app/src/shaders/fsrcnnx/pass_08.spv.inc @@ -0,0 +1,703 @@ +{0x07230203,0x00010000,0x000d000b,0x000003c1, +0x00000000,0x00020011,0x00000001,0x0006000b, +0x00000001,0x4c534c47,0x6474732e,0x3035342e, +0x00000000,0x0003000e,0x00000000,0x00000001, +0x0006000f,0x00000005,0x00000004,0x6e69616d, +0x00000000,0x0000022a,0x00060010,0x00000004, +0x00000011,0x00000010,0x00000010,0x00000001, +0x00030047,0x00000020,0x00000002,0x00050048, +0x00000020,0x00000000,0x00000023,0x00000000, +0x00040047,0x0000004b,0x00000021,0x00000001, +0x00040047,0x0000004b,0x00000022,0x00000000, +0x00040047,0x00000068,0x00000021,0x00000002, +0x00040047,0x00000068,0x00000022,0x00000000, +0x00040047,0x0000022a,0x0000000b,0x0000001c, +0x00030047,0x00000247,0x00000019,0x00040047, +0x00000247,0x00000021,0x00000000,0x00040047, +0x00000247,0x00000022,0x00000000,0x00040047, +0x0000024c,0x0000000b,0x00000019,0x00020013, +0x00000002,0x00030021,0x00000003,0x00000002, +0x00030016,0x00000006,0x00000020,0x00090019, +0x00000007,0x00000006,0x00000001,0x00000000, +0x00000000,0x00000000,0x00000001,0x00000000, +0x0003001b,0x00000008,0x00000007,0x00040020, +0x00000009,0x00000000,0x00000008,0x00040017, +0x0000000c,0x00000006,0x00000004,0x00040015, +0x00000016,0x00000020,0x00000001,0x00040017, +0x00000017,0x00000016,0x00000002,0x0004002b, +0x00000016,0x0000001e,0x00000000,0x0005002c, +0x00000017,0x0000001f,0x0000001e,0x0000001e, +0x0003001e,0x00000020,0x00000017,0x00040020, +0x00000021,0x00000009,0x00000020,0x0004003b, +0x00000021,0x00000022,0x00000009,0x00040020, +0x00000023,0x00000009,0x00000017,0x0004002b, +0x00000016,0x00000026,0x00000001,0x0004002b, +0x00000006,0x00000030,0xbc11f4ad,0x0004002b, +0x00000006,0x00000031,0xbd09b232,0x0004002b, +0x00000006,0x00000032,0x3c91279c,0x0004002b, +0x00000006,0x00000033,0x3d5913f3,0x0007002c, +0x0000000c,0x00000034,0x00000030,0x00000031, +0x00000032,0x00000033,0x00040018,0x00000035, +0x0000000c,0x00000004,0x0004002b,0x00000006, +0x00000036,0xbce2134e,0x0004002b,0x00000006, +0x00000037,0x3c6899cb,0x0004002b,0x00000006, +0x00000038,0x3df1faf6,0x0004002b,0x00000006, +0x00000039,0xbd6a6444,0x0007002c,0x0000000c, +0x0000003a,0x00000036,0x00000037,0x00000038, +0x00000039,0x0004002b,0x00000006,0x0000003b, +0x3dedd814,0x0004002b,0x00000006,0x0000003c, +0xbdecd703,0x0004002b,0x00000006,0x0000003d, +0xbe828aa5,0x0004002b,0x00000006,0x0000003e, +0x3db4d04d,0x0007002c,0x0000000c,0x0000003f, +0x0000003b,0x0000003c,0x0000003d,0x0000003e, +0x0004002b,0x00000006,0x00000040,0xbd92813b, +0x0004002b,0x00000006,0x00000041,0x3c77ddcf, +0x0004002b,0x00000006,0x00000042,0x3ddd0ed4, +0x0004002b,0x00000006,0x00000043,0x3d854b2a, +0x0007002c,0x0000000c,0x00000044,0x00000040, +0x00000041,0x00000042,0x00000043,0x0004002b, +0x00000006,0x00000045,0xbe238c63,0x0004002b, +0x00000006,0x00000046,0x3d892c79,0x0004002b, +0x00000006,0x00000047,0x3e557157,0x0004002b, +0x00000006,0x00000048,0xbdc2cbc8,0x0007002c, +0x0000000c,0x00000049,0x00000045,0x00000046, +0x00000047,0x00000048,0x0007002c,0x00000035, +0x0000004a,0x0000003a,0x0000003f,0x00000044, +0x00000049,0x0004003b,0x00000009,0x0000004b, +0x00000000,0x0004002b,0x00000006,0x00000053, +0x3d259c5d,0x0004002b,0x00000006,0x00000054, +0xbca8df99,0x0004002b,0x00000006,0x00000055, +0xbddd4528,0x0004002b,0x00000006,0x00000056, +0xbe50bd76,0x0007002c,0x0000000c,0x00000057, +0x00000053,0x00000054,0x00000055,0x00000056, +0x0004002b,0x00000006,0x00000058,0x3ccbdb0e, +0x0004002b,0x00000006,0x00000059,0xbbd3f275, +0x0004002b,0x00000006,0x0000005a,0x3d1f8cb4, +0x0004002b,0x00000006,0x0000005b,0x3a908803, +0x0007002c,0x0000000c,0x0000005c,0x00000058, +0x00000059,0x0000005a,0x0000005b,0x0004002b, +0x00000006,0x0000005d,0x3db54c2e,0x0004002b, +0x00000006,0x0000005e,0x3cf265f6,0x0004002b, +0x00000006,0x0000005f,0xbeaa2d95,0x0004002b, +0x00000006,0x00000060,0x3e46287f,0x0007002c, +0x0000000c,0x00000061,0x0000005d,0x0000005e, +0x0000005f,0x00000060,0x0004002b,0x00000006, +0x00000062,0xbd3f1932,0x0004002b,0x00000006, +0x00000063,0x3dd1b11e,0x0004002b,0x00000006, +0x00000064,0x3e00ce53,0x0004002b,0x00000006, +0x00000065,0xbe1de037,0x0007002c,0x0000000c, +0x00000066,0x00000062,0x00000063,0x00000064, +0x00000065,0x0007002c,0x00000035,0x00000067, +0x00000057,0x0000005c,0x00000061,0x00000066, +0x0004003b,0x00000009,0x00000068,0x00000000, +0x0004002b,0x00000006,0x0000006e,0xbbfabe15, +0x0004002b,0x00000006,0x0000006f,0x3d13ec43, +0x0004002b,0x00000006,0x00000070,0x3e332e16, +0x0004002b,0x00000006,0x00000071,0xbe521faa, +0x0007002c,0x0000000c,0x00000072,0x0000006e, +0x0000006f,0x00000070,0x00000071,0x0004002b, +0x00000006,0x00000073,0x3b14b715,0x0004002b, +0x00000006,0x00000074,0xbce7c859,0x0004002b, +0x00000006,0x00000075,0xbe50cbab,0x0004002b, +0x00000006,0x00000076,0xbe6ff8a1,0x0007002c, +0x0000000c,0x00000077,0x00000073,0x00000074, +0x00000075,0x00000076,0x0004002b,0x00000006, +0x00000078,0xbd125c8b,0x0004002b,0x00000006, +0x00000079,0xbd69c90c,0x0004002b,0x00000006, +0x0000007a,0x3e95cdd1,0x0004002b,0x00000006, +0x0000007b,0xbe4b9b65,0x0007002c,0x0000000c, +0x0000007c,0x00000078,0x00000079,0x0000007a, +0x0000007b,0x0004002b,0x00000006,0x0000007d, +0xbd6f6fa2,0x0004002b,0x00000006,0x0000007e, +0xbd0be204,0x0004002b,0x00000006,0x0000007f, +0x3e0537ef,0x0004002b,0x00000006,0x00000080, +0x3f04b917,0x0007002c,0x0000000c,0x00000081, +0x0000007d,0x0000007e,0x0000007f,0x00000080, +0x0007002c,0x00000035,0x00000082,0x00000072, +0x00000077,0x0000007c,0x00000081,0x0004002b, +0x00000006,0x00000083,0x00000000,0x0004002b, +0x00000006,0x0000008a,0x3db53e1f,0x0004002b, +0x00000006,0x0000008b,0x3d089cdb,0x0004002b, +0x00000006,0x0000008c,0x3c93e521,0x0004002b, +0x00000006,0x0000008d,0xbe87f13a,0x0007002c, +0x0000000c,0x0000008e,0x0000008a,0x0000008b, +0x0000008c,0x0000008d,0x0004002b,0x00000006, +0x0000008f,0x3d31a0a8,0x0004002b,0x00000006, +0x00000090,0x3c2aff9c,0x0004002b,0x00000006, +0x00000091,0x3a8efcc7,0x0004002b,0x00000006, +0x00000092,0xbd9070a6,0x0007002c,0x0000000c, +0x00000093,0x0000008f,0x00000090,0x00000091, +0x00000092,0x0004002b,0x00000006,0x00000094, +0xbd76d1ac,0x0004002b,0x00000006,0x00000095, +0x3e77d5ec,0x0004002b,0x00000006,0x00000096, +0xbef24530,0x0004002b,0x00000006,0x00000097, +0xbf4dd4d9,0x0007002c,0x0000000c,0x00000098, +0x00000094,0x00000095,0x00000096,0x00000097, +0x0004002b,0x00000006,0x00000099,0x3e9d0589, +0x0004002b,0x00000006,0x0000009a,0xbe7c9cfa, +0x0004002b,0x00000006,0x0000009b,0x3dc049f6, +0x0004002b,0x00000006,0x0000009c,0xbe4d110b, +0x0007002c,0x0000000c,0x0000009d,0x00000099, +0x0000009a,0x0000009b,0x0000009c,0x0007002c, +0x00000035,0x0000009e,0x0000008e,0x00000093, +0x00000098,0x0000009d,0x0004002b,0x00000006, +0x000000a4,0x3d60eedb,0x0004002b,0x00000006, +0x000000a5,0x3ceea1e4,0x0004002b,0x00000006, +0x000000a6,0x3dc1cc2b,0x0004002b,0x00000006, +0x000000a7,0xbd6e3a0b,0x0007002c,0x0000000c, +0x000000a8,0x000000a4,0x000000a5,0x000000a6, +0x000000a7,0x0004002b,0x00000006,0x000000a9, +0x3d890c5a,0x0004002b,0x00000006,0x000000aa, +0xbd822a70,0x0004002b,0x00000006,0x000000ab, +0xbe789fc8,0x0004002b,0x00000006,0x000000ac, +0xbe891730,0x0007002c,0x0000000c,0x000000ad, +0x000000a9,0x000000aa,0x000000ab,0x000000ac, +0x0004002b,0x00000006,0x000000ae,0x3e64059a, +0x0004002b,0x00000006,0x000000af,0x3e0547e2, +0x0004002b,0x00000006,0x000000b0,0xbe1b9e49, +0x0004002b,0x00000006,0x000000b1,0x3d8991b3, +0x0007002c,0x0000000c,0x000000b2,0x000000ae, +0x000000af,0x000000b0,0x000000b1,0x0004002b, +0x00000006,0x000000b3,0xbd57a088,0x0004002b, +0x00000006,0x000000b4,0x3e426427,0x0004002b, +0x00000006,0x000000b5,0x3e741874,0x0004002b, +0x00000006,0x000000b6,0x3e606e69,0x0007002c, +0x0000000c,0x000000b7,0x000000b3,0x000000b4, +0x000000b5,0x000000b6,0x0007002c,0x00000035, +0x000000b8,0x000000a8,0x000000ad,0x000000b2, +0x000000b7,0x0004002b,0x00000006,0x000000c0, +0xbcbfe00c,0x0004002b,0x00000006,0x000000c1, +0x3cc37a4d,0x0004002b,0x00000006,0x000000c2, +0x3d2f284a,0x0004002b,0x00000006,0x000000c3, +0xbddd4ca4,0x0007002c,0x0000000c,0x000000c4, +0x000000c0,0x000000c1,0x000000c2,0x000000c3, +0x0004002b,0x00000006,0x000000c5,0x3d080a09, +0x0004002b,0x00000006,0x000000c6,0xbb7fedac, +0x0004002b,0x00000006,0x000000c7,0x3cf020fc, +0x0004002b,0x00000006,0x000000c8,0x3c84a5f8, +0x0007002c,0x0000000c,0x000000c9,0x000000c5, +0x000000c6,0x000000c7,0x000000c8,0x0004002b, +0x00000006,0x000000ca,0x3d39f250,0x0004002b, +0x00000006,0x000000cb,0x3c5844cb,0x0004002b, +0x00000006,0x000000cc,0xbd8d1d5e,0x0004002b, +0x00000006,0x000000cd,0x3e7089e3,0x0007002c, +0x0000000c,0x000000ce,0x000000ca,0x000000cb, +0x000000cc,0x000000cd,0x0004002b,0x00000006, +0x000000cf,0x3dcf886b,0x0004002b,0x00000006, +0x000000d0,0x3e8a938e,0x0004002b,0x00000006, +0x000000d1,0x3df40115,0x0004002b,0x00000006, +0x000000d2,0xbe90f026,0x0007002c,0x0000000c, +0x000000d3,0x000000cf,0x000000d0,0x000000d1, +0x000000d2,0x0007002c,0x00000035,0x000000d4, +0x000000c4,0x000000c9,0x000000ce,0x000000d3, +0x0004002b,0x00000006,0x000000da,0x3c94a805, +0x0004002b,0x00000006,0x000000db,0xbd6a3ea9, +0x0004002b,0x00000006,0x000000dc,0x3ef99c9a, +0x0004002b,0x00000006,0x000000dd,0xbed94b39, +0x0007002c,0x0000000c,0x000000de,0x000000da, +0x000000db,0x000000dc,0x000000dd,0x0004002b, +0x00000006,0x000000df,0x3eddc0a6,0x0004002b, +0x00000006,0x000000e0,0x3dda7675,0x0004002b, +0x00000006,0x000000e1,0xbf071792,0x0004002b, +0x00000006,0x000000e2,0x3de371b3,0x0007002c, +0x0000000c,0x000000e3,0x000000df,0x000000e0, +0x000000e1,0x000000e2,0x0004002b,0x00000006, +0x000000e4,0xbdf18d02,0x0004002b,0x00000006, +0x000000e5,0xbce01d95,0x0004002b,0x00000006, +0x000000e6,0x3e3829fc,0x0004002b,0x00000006, +0x000000e7,0xbe90e02a,0x0007002c,0x0000000c, +0x000000e8,0x000000e4,0x000000e5,0x000000e6, +0x000000e7,0x0004002b,0x00000006,0x000000e9, +0x3dcf5623,0x0004002b,0x00000006,0x000000ea, +0xbe817566,0x0004002b,0x00000006,0x000000eb, +0x3e2dd5cb,0x0004002b,0x00000006,0x000000ec, +0x3de5b9e9,0x0007002c,0x0000000c,0x000000ed, +0x000000e9,0x000000ea,0x000000eb,0x000000ec, +0x0007002c,0x00000035,0x000000ee,0x000000de, +0x000000e3,0x000000e8,0x000000ed,0x0004002b, +0x00000006,0x000000f5,0xbe0fc873,0x0004002b, +0x00000006,0x000000f6,0xbdc988db,0x0004002b, +0x00000006,0x000000f7,0xbce5000f,0x0004002b, +0x00000006,0x000000f8,0xbe074acb,0x0007002c, +0x0000000c,0x000000f9,0x000000f5,0x000000f6, +0x000000f7,0x000000f8,0x0004002b,0x00000006, +0x000000fa,0xbdac697c,0x0004002b,0x00000006, +0x000000fb,0x3e08d2ec,0x0004002b,0x00000006, +0x000000fc,0xbe156152,0x0004002b,0x00000006, +0x000000fd,0xbb907df3,0x0007002c,0x0000000c, +0x000000fe,0x000000fa,0x000000fb,0x000000fc, +0x000000fd,0x0004002b,0x00000006,0x000000ff, +0x3e61aa17,0x0004002b,0x00000006,0x00000100, +0x3e1510af,0x0004002b,0x00000006,0x00000101, +0xbe71df8a,0x0004002b,0x00000006,0x00000102, +0xbd06cee2,0x0007002c,0x0000000c,0x00000103, +0x000000ff,0x00000100,0x00000101,0x00000102, +0x0004002b,0x00000006,0x00000104,0xbe2c6532, +0x0004002b,0x00000006,0x00000105,0x3ced3d01, +0x0004002b,0x00000006,0x00000106,0x3eaf563b, +0x0004002b,0x00000006,0x00000107,0x3c6bad55, +0x0007002c,0x0000000c,0x00000108,0x00000104, +0x00000105,0x00000106,0x00000107,0x0007002c, +0x00000035,0x00000109,0x000000f9,0x000000fe, +0x00000103,0x00000108,0x0004002b,0x00000006, +0x0000010f,0x3ceb4fdb,0x0004002b,0x00000006, +0x00000110,0x3e478103,0x0004002b,0x00000006, +0x00000111,0x3f1992c1,0x0004002b,0x00000006, +0x00000112,0x3df4251d,0x0007002c,0x0000000c, +0x00000113,0x0000010f,0x00000110,0x00000111, +0x00000112,0x0004002b,0x00000006,0x00000114, +0xbf207d3c,0x0004002b,0x00000006,0x00000115, +0x3f5f57bc,0x0004002b,0x00000006,0x00000116, +0xbf23d4ac,0x0004002b,0x00000006,0x00000117, +0xbed71ddf,0x0007002c,0x0000000c,0x00000118, +0x00000114,0x00000115,0x00000116,0x00000117, +0x0004002b,0x00000006,0x00000119,0xbeabc786, +0x0004002b,0x00000006,0x0000011a,0xbe207373, +0x0004002b,0x00000006,0x0000011b,0xbee118a7, +0x0004002b,0x00000006,0x0000011c,0x3e1c3eb0, +0x0007002c,0x0000000c,0x0000011d,0x00000119, +0x0000011a,0x0000011b,0x0000011c,0x0004002b, +0x00000006,0x0000011e,0x3f0eadd4,0x0004002b, +0x00000006,0x0000011f,0x3e6e02c8,0x0004002b, +0x00000006,0x00000120,0x3e8d75af,0x0004002b, +0x00000006,0x00000121,0x3d265108,0x0007002c, +0x0000000c,0x00000122,0x0000011e,0x0000011f, +0x00000120,0x00000121,0x0007002c,0x00000035, +0x00000123,0x00000113,0x00000118,0x0000011d, +0x00000122,0x0004002b,0x00000006,0x0000012a, +0x3ec72c46,0x0004002b,0x00000006,0x0000012b, +0xbd6b22ad,0x0004002b,0x00000006,0x0000012c, +0xbe16591e,0x0004002b,0x00000006,0x0000012d, +0xbf1867f1,0x0007002c,0x0000000c,0x0000012e, +0x0000012a,0x0000012b,0x0000012c,0x0000012d, +0x0004002b,0x00000006,0x0000012f,0xbe0b97de, +0x0004002b,0x00000006,0x00000130,0xbe63ce67, +0x0004002b,0x00000006,0x00000131,0xbe652493, +0x0004002b,0x00000006,0x00000132,0x3e8c30c9, +0x0007002c,0x0000000c,0x00000133,0x0000012f, +0x00000130,0x00000131,0x00000132,0x0004002b, +0x00000006,0x00000134,0xbef93f59,0x0004002b, +0x00000006,0x00000135,0xbf00c05c,0x0004002b, +0x00000006,0x00000136,0xbeb6cc10,0x0004002b, +0x00000006,0x00000137,0xbe35e3ad,0x0007002c, +0x0000000c,0x00000138,0x00000134,0x00000135, +0x00000136,0x00000137,0x0004002b,0x00000006, +0x00000139,0xbc90bb01,0x0004002b,0x00000006, +0x0000013a,0xbedd1d8d,0x0004002b,0x00000006, +0x0000013b,0x3f85113f,0x0004002b,0x00000006, +0x0000013c,0x3e30fcd7,0x0007002c,0x0000000c, +0x0000013d,0x00000139,0x0000013a,0x0000013b, +0x0000013c,0x0007002c,0x00000035,0x0000013e, +0x0000012e,0x00000133,0x00000138,0x0000013d, +0x0004002b,0x00000006,0x00000144,0x3e08f0a0, +0x0004002b,0x00000006,0x00000145,0xbda5c5fd, +0x0004002b,0x00000006,0x00000146,0x3e23e41e, +0x0004002b,0x00000006,0x00000147,0xbde315a8, +0x0007002c,0x0000000c,0x00000148,0x00000144, +0x00000145,0x00000146,0x00000147,0x0004002b, +0x00000006,0x00000149,0xbe73521a,0x0004002b, +0x00000006,0x0000014a,0xbe1cf49c,0x0004002b, +0x00000006,0x0000014b,0xbd374725,0x0004002b, +0x00000006,0x0000014c,0x3e80c8f6,0x0007002c, +0x0000000c,0x0000014d,0x00000149,0x0000014a, +0x0000014b,0x0000014c,0x0004002b,0x00000006, +0x0000014e,0x3ef83b5b,0x0004002b,0x00000006, +0x0000014f,0xbdbb8b97,0x0004002b,0x00000006, +0x00000150,0xbd09d772,0x0004002b,0x00000006, +0x00000151,0xbe5b5439,0x0007002c,0x0000000c, +0x00000152,0x0000014e,0x0000014f,0x00000150, +0x00000151,0x0004002b,0x00000006,0x00000153, +0x3e599d00,0x0004002b,0x00000006,0x00000154, +0x3ea5c77d,0x0004002b,0x00000006,0x00000155, +0x3b11f6c5,0x0004002b,0x00000006,0x00000156, +0xbc898234,0x0007002c,0x0000000c,0x00000157, +0x00000153,0x00000154,0x00000155,0x00000156, +0x0007002c,0x00000035,0x00000158,0x00000148, +0x0000014d,0x00000152,0x00000157,0x0004002b, +0x00000006,0x0000015f,0x3d3b91f7,0x0004002b, +0x00000006,0x00000160,0x3d511dc2,0x0004002b, +0x00000006,0x00000161,0xbd54cbfd,0x0004002b, +0x00000006,0x00000162,0xbee6b953,0x0007002c, +0x0000000c,0x00000163,0x0000015f,0x00000160, +0x00000161,0x00000162,0x0004002b,0x00000006, +0x00000164,0xbdd2c7fb,0x0004002b,0x00000006, +0x00000165,0x3c3e3d66,0x0004002b,0x00000006, +0x00000166,0xbe3346d0,0x0004002b,0x00000006, +0x00000167,0xbb9fc558,0x0007002c,0x0000000c, +0x00000168,0x00000164,0x00000165,0x00000166, +0x00000167,0x0004002b,0x00000006,0x00000169, +0x3e1a5082,0x0004002b,0x00000006,0x0000016a, +0x3d81a705,0x0004002b,0x00000006,0x0000016b, +0xbe26c376,0x0004002b,0x00000006,0x0000016c, +0xbc6d737d,0x0007002c,0x0000000c,0x0000016d, +0x00000169,0x0000016a,0x0000016b,0x0000016c, +0x0004002b,0x00000006,0x0000016e,0x3e1041b7, +0x0004002b,0x00000006,0x0000016f,0x3e9448d0, +0x0004002b,0x00000006,0x00000170,0x3da49895, +0x0004002b,0x00000006,0x00000171,0xbefc6bc3, +0x0007002c,0x0000000c,0x00000172,0x0000016e, +0x0000016f,0x00000170,0x00000171,0x0007002c, +0x00000035,0x00000173,0x00000163,0x00000168, +0x0000016d,0x00000172,0x0004002b,0x00000006, +0x00000179,0xbd46592d,0x0004002b,0x00000006, +0x0000017a,0x3e0c6bc1,0x0004002b,0x00000006, +0x0000017b,0xbdfd067e,0x0004002b,0x00000006, +0x0000017c,0xbe861272,0x0007002c,0x0000000c, +0x0000017d,0x00000179,0x0000017a,0x0000017b, +0x0000017c,0x0004002b,0x00000006,0x0000017e, +0xbce5b348,0x0004002b,0x00000006,0x0000017f, +0x3ccbd04d,0x0004002b,0x00000006,0x00000180, +0x3df699ca,0x0004002b,0x00000006,0x00000181, +0x3ea63986,0x0007002c,0x0000000c,0x00000182, +0x0000017e,0x0000017f,0x00000180,0x00000181, +0x0004002b,0x00000006,0x00000183,0x3d2e99e6, +0x0004002b,0x00000006,0x00000184,0xbd55045b, +0x0004002b,0x00000006,0x00000185,0x3d6be984, +0x0004002b,0x00000006,0x00000186,0xbe85d195, +0x0007002c,0x0000000c,0x00000187,0x00000183, +0x00000184,0x00000185,0x00000186,0x0004002b, +0x00000006,0x00000188,0x3deea70c,0x0004002b, +0x00000006,0x00000189,0xbd1fbfe1,0x0004002b, +0x00000006,0x0000018a,0xbd40dbcb,0x0004002b, +0x00000006,0x0000018b,0xbac030f1,0x0007002c, +0x0000000c,0x0000018c,0x00000188,0x00000189, +0x0000018a,0x0000018b,0x0007002c,0x00000035, +0x0000018d,0x0000017d,0x00000182,0x00000187, +0x0000018c,0x0004002b,0x00000006,0x00000194, +0xbdda7919,0x0004002b,0x00000006,0x00000195, +0xbdb222d1,0x0004002b,0x00000006,0x00000196, +0xbc22bef7,0x0004002b,0x00000006,0x00000197, +0xbe0ad7ea,0x0007002c,0x0000000c,0x00000198, +0x00000194,0x00000195,0x00000196,0x00000197, +0x0004002b,0x00000006,0x00000199,0xbd9bbb95, +0x0004002b,0x00000006,0x0000019a,0x3e0d156c, +0x0004002b,0x00000006,0x0000019b,0xbcd7c8a7, +0x0004002b,0x00000006,0x0000019c,0x3db44073, +0x0007002c,0x0000000c,0x0000019d,0x00000199, +0x0000019a,0x0000019b,0x0000019c,0x0004002b, +0x00000006,0x0000019e,0x3e1937d1,0x0004002b, +0x00000006,0x0000019f,0xbd47a9cf,0x0004002b, +0x00000006,0x000001a0,0x3e03c60d,0x0004002b, +0x00000006,0x000001a1,0x3e632c6d,0x0007002c, +0x0000000c,0x000001a2,0x0000019e,0x0000019f, +0x000001a0,0x000001a1,0x0004002b,0x00000006, +0x000001a3,0x3e307893,0x0004002b,0x00000006, +0x000001a4,0xbc879c87,0x0004002b,0x00000006, +0x000001a5,0xbd8d68ea,0x0004002b,0x00000006, +0x000001a6,0xbe7493ff,0x0007002c,0x0000000c, +0x000001a7,0x000001a3,0x000001a4,0x000001a5, +0x000001a6,0x0007002c,0x00000035,0x000001a8, +0x00000198,0x0000019d,0x000001a2,0x000001a7, +0x0004002b,0x00000006,0x000001ae,0xbed8e7c0, +0x0004002b,0x00000006,0x000001af,0x3d3e8991, +0x0004002b,0x00000006,0x000001b0,0xbe1c4f25, +0x0004002b,0x00000006,0x000001b1,0x3e121148, +0x0007002c,0x0000000c,0x000001b2,0x000001ae, +0x000001af,0x000001b0,0x000001b1,0x0004002b, +0x00000006,0x000001b3,0x3f17658d,0x0004002b, +0x00000006,0x000001b4,0xbdddaa45,0x0004002b, +0x00000006,0x000001b5,0x3e8bd761,0x0004002b, +0x00000006,0x000001b6,0xbe899b71,0x0007002c, +0x0000000c,0x000001b7,0x000001b3,0x000001b4, +0x000001b5,0x000001b6,0x0004002b,0x00000006, +0x000001b8,0xbeecfd13,0x0004002b,0x00000006, +0x000001b9,0xbd5c010b,0x0004002b,0x00000006, +0x000001ba,0xbe239889,0x0004002b,0x00000006, +0x000001bb,0x3d587c25,0x0007002c,0x0000000c, +0x000001bc,0x000001b8,0x000001b9,0x000001ba, +0x000001bb,0x0004002b,0x00000006,0x000001bd, +0xbeb26fb5,0x0004002b,0x00000006,0x000001be, +0x3e0edbff,0x0004002b,0x00000006,0x000001bf, +0x3d83ae44,0x0004002b,0x00000006,0x000001c0, +0x3d04a3f7,0x0007002c,0x0000000c,0x000001c1, +0x000001bd,0x000001be,0x000001bf,0x000001c0, +0x0007002c,0x00000035,0x000001c2,0x000001b2, +0x000001b7,0x000001bc,0x000001c1,0x0004002b, +0x00000006,0x000001c9,0x3bda9b41,0x0004002b, +0x00000006,0x000001ca,0xbd45707f,0x0004002b, +0x00000006,0x000001cb,0xbe2ed33a,0x0004002b, +0x00000006,0x000001cc,0xbdcd160b,0x0007002c, +0x0000000c,0x000001cd,0x000001c9,0x000001ca, +0x000001cb,0x000001cc,0x0004002b,0x00000006, +0x000001ce,0x3d5d1c71,0x0004002b,0x00000006, +0x000001cf,0xbe265811,0x0004002b,0x00000006, +0x000001d0,0x3efb92e2,0x0004002b,0x00000006, +0x000001d1,0x3ebcd189,0x0007002c,0x0000000c, +0x000001d2,0x000001ce,0x000001cf,0x000001d0, +0x000001d1,0x0004002b,0x00000006,0x000001d3, +0x3d49494f,0x0004002b,0x00000006,0x000001d4, +0x3e0648f3,0x0004002b,0x00000006,0x000001d5, +0x3dcb3fb2,0x0004002b,0x00000006,0x000001d6, +0xbeed5e45,0x0007002c,0x0000000c,0x000001d7, +0x000001d3,0x000001d4,0x000001d5,0x000001d6, +0x0004002b,0x00000006,0x000001d8,0xbeaee48a, +0x0004002b,0x00000006,0x000001d9,0xbc7c0a91, +0x0004002b,0x00000006,0x000001da,0xbcdd511b, +0x0004002b,0x00000006,0x000001db,0xbdbf97ed, +0x0007002c,0x0000000c,0x000001dc,0x000001d8, +0x000001d9,0x000001da,0x000001db,0x0007002c, +0x00000035,0x000001dd,0x000001cd,0x000001d2, +0x000001d7,0x000001dc,0x0004002b,0x00000006, +0x000001e3,0xbe31ff65,0x0004002b,0x00000006, +0x000001e4,0x3d3bd191,0x0004002b,0x00000006, +0x000001e5,0xbd85e349,0x0004002b,0x00000006, +0x000001e6,0xbc803d03,0x0007002c,0x0000000c, +0x000001e7,0x000001e3,0x000001e4,0x000001e5, +0x000001e6,0x0004002b,0x00000006,0x000001e8, +0xbd1277a4,0x0004002b,0x00000006,0x000001e9, +0xbe182f46,0x0004002b,0x00000006,0x000001ea, +0x3e381e69,0x0004002b,0x00000006,0x000001eb, +0xbe062cf0,0x0007002c,0x0000000c,0x000001ec, +0x000001e8,0x000001e9,0x000001ea,0x000001eb, +0x0004002b,0x00000006,0x000001ed,0x3da068cf, +0x0004002b,0x00000006,0x000001ee,0xbcd61b2b, +0x0004002b,0x00000006,0x000001ef,0xbdd67077, +0x0004002b,0x00000006,0x000001f0,0x3ead56eb, +0x0007002c,0x0000000c,0x000001f1,0x000001ed, +0x000001ee,0x000001ef,0x000001f0,0x0004002b, +0x00000006,0x000001f2,0xbd0b0a35,0x0004002b, +0x00000006,0x000001f3,0x3e6b7b64,0x0004002b, +0x00000006,0x000001f4,0xbe103653,0x0004002b, +0x00000006,0x000001f5,0xbd10782c,0x0007002c, +0x0000000c,0x000001f6,0x000001f2,0x000001f3, +0x000001f4,0x000001f5,0x0007002c,0x00000035, +0x000001f7,0x000001e7,0x000001ec,0x000001f1, +0x000001f6,0x0004002b,0x00000006,0x000001fe, +0x3d3da6f7,0x0004002b,0x00000006,0x000001ff, +0x3d67b349,0x0004002b,0x00000006,0x00000200, +0xbd5cc1b2,0x0004002b,0x00000006,0x00000201, +0xbe712352,0x0007002c,0x0000000c,0x00000202, +0x000001fe,0x000001ff,0x00000200,0x00000201, +0x0004002b,0x00000006,0x00000203,0x3cf3fa3f, +0x0004002b,0x00000006,0x00000204,0x3cfc438e, +0x0004002b,0x00000006,0x00000205,0x3e023b3d, +0x0004002b,0x00000006,0x00000206,0xbdd21029, +0x0007002c,0x0000000c,0x00000207,0x00000203, +0x00000204,0x00000205,0x00000206,0x0004002b, +0x00000006,0x00000208,0x3dd92fce,0x0004002b, +0x00000006,0x00000209,0xbd900483,0x0004002b, +0x00000006,0x0000020a,0xbc0816e0,0x0004002b, +0x00000006,0x0000020b,0x3d42413f,0x0007002c, +0x0000000c,0x0000020c,0x00000208,0x00000209, +0x0000020a,0x0000020b,0x0004002b,0x00000006, +0x0000020d,0x3d35405f,0x0004002b,0x00000006, +0x0000020e,0x3e20b90f,0x0004002b,0x00000006, +0x0000020f,0xbd355575,0x0004002b,0x00000006, +0x00000210,0xbdf3725c,0x0007002c,0x0000000c, +0x00000211,0x0000020d,0x0000020e,0x0000020f, +0x00000210,0x0007002c,0x00000035,0x00000212, +0x00000202,0x00000207,0x0000020c,0x00000211, +0x0007002c,0x0000000c,0x00000219,0x00000083, +0x00000083,0x00000083,0x00000083,0x0004002b, +0x00000006,0x0000021b,0x3f3c9542,0x0004002b, +0x00000006,0x0000021c,0x3f802d63,0x0004002b, +0x00000006,0x0000021d,0xbce25ac6,0x0004002b, +0x00000006,0x0000021e,0x3d967ee1,0x0007002c, +0x0000000c,0x0000021f,0x0000021b,0x0000021c, +0x0000021d,0x0000021e,0x00040015,0x00000227, +0x00000020,0x00000000,0x00040017,0x00000228, +0x00000227,0x00000003,0x00040020,0x00000229, +0x00000001,0x00000228,0x0004003b,0x00000229, +0x0000022a,0x00000001,0x00040017,0x0000022b, +0x00000227,0x00000002,0x00020014,0x0000022f, +0x0004002b,0x00000227,0x00000230,0x00000000, +0x00040020,0x00000234,0x00000009,0x00000016, +0x0004002b,0x00000227,0x0000023b,0x00000001, +0x00090019,0x00000245,0x00000006,0x00000001, +0x00000000,0x00000000,0x00000000,0x00000002, +0x00000002,0x00040020,0x00000246,0x00000000, +0x00000245,0x0004003b,0x00000246,0x00000247, +0x00000000,0x0004002b,0x00000227,0x0000024b, +0x00000010,0x0006002c,0x00000228,0x0000024c, +0x0000024b,0x0000024b,0x0000023b,0x0004002b, +0x00000016,0x000003b8,0xffffffff,0x0005002c, +0x00000017,0x000003b9,0x000003b8,0x000003b8, +0x0005002c,0x00000017,0x000003ba,0x00000026, +0x00000026,0x0005002c,0x00000017,0x000003bb, +0x000003b8,0x0000001e,0x0005002c,0x00000017, +0x000003bc,0x000003b8,0x00000026,0x0005002c, +0x00000017,0x000003bd,0x0000001e,0x000003b8, +0x0005002c,0x00000017,0x000003be,0x0000001e, +0x00000026,0x0005002c,0x00000017,0x000003bf, +0x00000026,0x000003b8,0x0005002c,0x00000017, +0x000003c0,0x00000026,0x0000001e,0x00050036, +0x00000002,0x00000004,0x00000000,0x00000003, +0x000200f8,0x00000005,0x000300f7,0x0000024e, +0x00000000,0x000300fb,0x00000230,0x0000024f, +0x000200f8,0x0000024f,0x0004003d,0x00000228, +0x0000022c,0x0000022a,0x0007004f,0x0000022b, +0x0000022d,0x0000022c,0x0000022c,0x00000000, +0x00000001,0x0004007c,0x00000017,0x0000022e, +0x0000022d,0x00050051,0x00000016,0x00000233, +0x0000022e,0x00000000,0x00060041,0x00000234, +0x00000235,0x00000022,0x0000001e,0x00000230, +0x0004003d,0x00000016,0x00000236,0x00000235, +0x000500af,0x0000022f,0x00000237,0x00000233, +0x00000236,0x000400a8,0x0000022f,0x00000238, +0x00000237,0x000300f7,0x0000023a,0x00000000, +0x000400fa,0x00000238,0x00000239,0x0000023a, +0x000200f8,0x00000239,0x00050051,0x00000016, +0x0000023d,0x0000022e,0x00000001,0x00060041, +0x00000234,0x0000023e,0x00000022,0x0000001e, +0x0000023b,0x0004003d,0x00000016,0x0000023f, +0x0000023e,0x000500af,0x0000022f,0x00000240, +0x0000023d,0x0000023f,0x000200f9,0x0000023a, +0x000200f8,0x0000023a,0x000700f5,0x0000022f, +0x00000241,0x00000237,0x0000024f,0x00000240, +0x00000239,0x000300f7,0x00000243,0x00000000, +0x000400fa,0x00000241,0x00000242,0x00000243, +0x000200f8,0x00000242,0x000200f9,0x0000024e, +0x000200f8,0x00000243,0x0004003d,0x00000245, +0x00000248,0x00000247,0x0004003d,0x00000008, +0x000002ba,0x0000004b,0x00050080,0x00000017, +0x000002be,0x0000022e,0x000003b9,0x00050041, +0x00000023,0x000002bf,0x00000022,0x0000001e, +0x0004003d,0x00000017,0x000002c0,0x000002bf, +0x00050082,0x00000017,0x000002c2,0x000002c0, +0x000003ba,0x0008000c,0x00000017,0x000002c3, +0x00000001,0x0000002d,0x000002be,0x0000001f, +0x000002c2,0x00040064,0x00000007,0x000002c4, +0x000002ba,0x0007005f,0x0000000c,0x000002c5, +0x000002c4,0x000002c3,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x0000026a,0x0000004a, +0x000002c5,0x00050081,0x0000000c,0x0000026c, +0x00000034,0x0000026a,0x0004003d,0x00000008, +0x000002c8,0x00000068,0x00040064,0x00000007, +0x000002d2,0x000002c8,0x0007005f,0x0000000c, +0x000002d3,0x000002d2,0x000002c3,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x0000026e, +0x00000067,0x000002d3,0x00050081,0x0000000c, +0x00000270,0x0000026c,0x0000026e,0x0004003d, +0x00000008,0x000002d6,0x0000004b,0x00050080, +0x00000017,0x000002da,0x0000022e,0x000003bb, +0x0008000c,0x00000017,0x000002df,0x00000001, +0x0000002d,0x000002da,0x0000001f,0x000002c2, +0x00040064,0x00000007,0x000002e0,0x000002d6, +0x0007005f,0x0000000c,0x000002e1,0x000002e0, +0x000002df,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x00000272,0x00000082,0x000002e1, +0x00050081,0x0000000c,0x00000274,0x00000270, +0x00000272,0x0004003d,0x00000008,0x000002e4, +0x00000068,0x00040064,0x00000007,0x000002ee, +0x000002e4,0x0007005f,0x0000000c,0x000002ef, +0x000002ee,0x000002df,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x00000276,0x0000009e, +0x000002ef,0x00050081,0x0000000c,0x00000278, +0x00000274,0x00000276,0x0004003d,0x00000008, +0x000002f2,0x0000004b,0x00050080,0x00000017, +0x000002f6,0x0000022e,0x000003bc,0x0008000c, +0x00000017,0x000002fb,0x00000001,0x0000002d, +0x000002f6,0x0000001f,0x000002c2,0x00040064, +0x00000007,0x000002fc,0x000002f2,0x0007005f, +0x0000000c,0x000002fd,0x000002fc,0x000002fb, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x0000027a,0x000000b8,0x000002fd,0x00050081, +0x0000000c,0x0000027c,0x00000278,0x0000027a, +0x0004003d,0x00000008,0x00000300,0x00000068, +0x00040064,0x00000007,0x0000030a,0x00000300, +0x0007005f,0x0000000c,0x0000030b,0x0000030a, +0x000002fb,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x0000027e,0x000000d4,0x0000030b, +0x00050081,0x0000000c,0x00000280,0x0000027c, +0x0000027e,0x0004003d,0x00000008,0x0000030e, +0x0000004b,0x00050080,0x00000017,0x00000312, +0x0000022e,0x000003bd,0x0008000c,0x00000017, +0x00000317,0x00000001,0x0000002d,0x00000312, +0x0000001f,0x000002c2,0x00040064,0x00000007, +0x00000318,0x0000030e,0x0007005f,0x0000000c, +0x00000319,0x00000318,0x00000317,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x00000282, +0x000000ee,0x00000319,0x00050081,0x0000000c, +0x00000284,0x00000280,0x00000282,0x0004003d, +0x00000008,0x0000031c,0x00000068,0x00040064, +0x00000007,0x00000326,0x0000031c,0x0007005f, +0x0000000c,0x00000327,0x00000326,0x00000317, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x00000286,0x00000109,0x00000327,0x00050081, +0x0000000c,0x00000288,0x00000284,0x00000286, +0x0004003d,0x00000008,0x0000032a,0x0000004b, +0x0008000c,0x00000017,0x00000333,0x00000001, +0x0000002d,0x0000022e,0x0000001f,0x000002c2, +0x00040064,0x00000007,0x00000334,0x0000032a, +0x0007005f,0x0000000c,0x00000335,0x00000334, +0x00000333,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x0000028a,0x00000123,0x00000335, +0x00050081,0x0000000c,0x0000028c,0x00000288, +0x0000028a,0x0004003d,0x00000008,0x00000338, +0x00000068,0x00040064,0x00000007,0x00000342, +0x00000338,0x0007005f,0x0000000c,0x00000343, +0x00000342,0x00000333,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x0000028e,0x0000013e, +0x00000343,0x00050081,0x0000000c,0x00000290, +0x0000028c,0x0000028e,0x0004003d,0x00000008, +0x00000346,0x0000004b,0x00050080,0x00000017, +0x0000034a,0x0000022e,0x000003be,0x0008000c, +0x00000017,0x0000034f,0x00000001,0x0000002d, +0x0000034a,0x0000001f,0x000002c2,0x00040064, +0x00000007,0x00000350,0x00000346,0x0007005f, +0x0000000c,0x00000351,0x00000350,0x0000034f, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x00000292,0x00000158,0x00000351,0x00050081, +0x0000000c,0x00000294,0x00000290,0x00000292, +0x0004003d,0x00000008,0x00000354,0x00000068, +0x00040064,0x00000007,0x0000035e,0x00000354, +0x0007005f,0x0000000c,0x0000035f,0x0000035e, +0x0000034f,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x00000296,0x00000173,0x0000035f, +0x00050081,0x0000000c,0x00000298,0x00000294, +0x00000296,0x0004003d,0x00000008,0x00000362, +0x0000004b,0x00050080,0x00000017,0x00000366, +0x0000022e,0x000003bf,0x0008000c,0x00000017, +0x0000036b,0x00000001,0x0000002d,0x00000366, +0x0000001f,0x000002c2,0x00040064,0x00000007, +0x0000036c,0x00000362,0x0007005f,0x0000000c, +0x0000036d,0x0000036c,0x0000036b,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x0000029a, +0x0000018d,0x0000036d,0x00050081,0x0000000c, +0x0000029c,0x00000298,0x0000029a,0x0004003d, +0x00000008,0x00000370,0x00000068,0x00040064, +0x00000007,0x0000037a,0x00000370,0x0007005f, +0x0000000c,0x0000037b,0x0000037a,0x0000036b, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x0000029e,0x000001a8,0x0000037b,0x00050081, +0x0000000c,0x000002a0,0x0000029c,0x0000029e, +0x0004003d,0x00000008,0x0000037e,0x0000004b, +0x00050080,0x00000017,0x00000382,0x0000022e, +0x000003c0,0x0008000c,0x00000017,0x00000387, +0x00000001,0x0000002d,0x00000382,0x0000001f, +0x000002c2,0x00040064,0x00000007,0x00000388, +0x0000037e,0x0007005f,0x0000000c,0x00000389, +0x00000388,0x00000387,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x000002a2,0x000001c2, +0x00000389,0x00050081,0x0000000c,0x000002a4, +0x000002a0,0x000002a2,0x0004003d,0x00000008, +0x0000038c,0x00000068,0x00040064,0x00000007, +0x00000396,0x0000038c,0x0007005f,0x0000000c, +0x00000397,0x00000396,0x00000387,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x000002a6, +0x000001dd,0x00000397,0x00050081,0x0000000c, +0x000002a8,0x000002a4,0x000002a6,0x0004003d, +0x00000008,0x0000039a,0x0000004b,0x00050080, +0x00000017,0x0000039e,0x0000022e,0x000003ba, +0x0008000c,0x00000017,0x000003a3,0x00000001, +0x0000002d,0x0000039e,0x0000001f,0x000002c2, +0x00040064,0x00000007,0x000003a4,0x0000039a, +0x0007005f,0x0000000c,0x000003a5,0x000003a4, +0x000003a3,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x000002aa,0x000001f7,0x000003a5, +0x00050081,0x0000000c,0x000002ac,0x000002a8, +0x000002aa,0x0004003d,0x00000008,0x000003a8, +0x00000068,0x00040064,0x00000007,0x000003b2, +0x000003a8,0x0007005f,0x0000000c,0x000003b3, +0x000003b2,0x000003a3,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x000002ae,0x00000212, +0x000003b3,0x00050081,0x0000000c,0x000002b0, +0x000002ac,0x000002ae,0x0007000c,0x0000000c, +0x000002b2,0x00000001,0x00000028,0x000002b0, +0x00000219,0x0007000c,0x0000000c,0x000002b4, +0x00000001,0x00000025,0x000002b0,0x00000219, +0x00050085,0x0000000c,0x000002b5,0x0000021f, +0x000002b4,0x00050081,0x0000000c,0x000002b6, +0x000002b2,0x000002b5,0x00040063,0x00000248, +0x0000022e,0x000002b6,0x000200f9,0x0000024e, +0x000200f8,0x0000024e,0x000100fd,0x00010038} diff --git a/app/src/shaders/fsrcnnx/pass_09.comp b/app/src/shaders/fsrcnnx/pass_09.comp new file mode 100644 index 0000000..1d9d838 --- /dev/null +++ b/app/src/shaders/fsrcnnx/pass_09.comp @@ -0,0 +1,46 @@ +#version 450 +// Generated by tools/gen_fsrcnnx.js from third_party/FSRCNNX_x2_8-0-4-1.glsl +// (FSRCNNX by igv, LGPL-3.0). Layer: mapping 4_1. Do not edit. +layout(local_size_x = 16, local_size_y = 16) in; +layout(binding = 0, rgba16f) uniform writeonly image2D dst; +layout(binding = 1) uniform sampler2D in0; +layout(binding = 2) uniform sampler2D in1; +layout(binding = 3) uniform sampler2D in2; +layout(push_constant) uniform Params { ivec2 size; } p; + +ivec2 at_; +vec4 fetch_(sampler2D s, vec2 o) { return texelFetch(s, clamp(at_ + ivec2(o), ivec2(0), p.size - 1), 0); } +#define MODEL21_texOff(o) fetch_(in0, vec2(o)) +#define MODEL22_texOff(o) fetch_(in1, vec2(o)) + +vec4 hook() +{ +vec4 res = vec4(-0.1306160986423492,-0.0808217376470566,-0.2880123555660248,0.0099629526957870); +res += mat4(-0.1033539846539497,0.0541300140321255,-0.0804840475320816,-0.0334571413695812,-0.0264753755182028,0.1118840202689171,0.1186013221740723,-0.0127575425431132,0.2236593365669250,0.0025286162272096,0.0985530614852905,0.0685181617736816,-0.1884875595569611,0.0530862808227539,-0.0482063069939613,0.0375233069062233) * MODEL21_texOff(vec2(-1,-1)); +res += mat4(0.1837068796157837,-0.0632847175002098,0.0016613919287920,0.0392861217260361,0.2923883199691772,-0.1713902205228806,0.1907587945461273,0.0550456829369068,0.0644215345382690,-0.1046456992626190,0.0187383033335209,0.0770180150866508,0.1933846622705460,-0.0455715768039227,0.0375007353723049,-0.1053109914064407) * MODEL22_texOff(vec2(-1,-1)); +res += mat4(-0.0972480997443199,0.2820451855659485,0.0114549007266760,-0.0954328626394272,0.0706252008676529,0.4829064607620239,-0.6371517181396484,0.0005180989392102,0.3280143439769745,0.0665246024727821,-0.0503116399049759,-0.1261110603809357,0.1114177703857422,-0.2053108513355255,0.1428771317005157,0.3926100134849548) * MODEL21_texOff(vec2(-1,0)); +res += mat4(-0.2571723163127899,0.1627264618873596,-0.4940335154533386,-0.1361546218395233,0.0804422944784164,-0.4231885373592377,0.0650202706456184,0.0518481098115444,-0.0502478554844856,-0.1305799931287766,0.1814480125904083,0.0090866927057505,-0.0510044656693935,-0.1691461503505707,0.0922467112541199,-0.0314207412302494) * MODEL22_texOff(vec2(-1,0)); +res += mat4(0.1270498335361481,0.0563284493982792,-0.0435525141656399,0.1569847911596298,0.0576847903430462,0.3461692929267883,-0.0325655154883862,-0.2688976824283600,-0.1341977864503860,-0.1382253766059875,0.2293784171342850,-0.1111817285418510,-0.1402447521686554,-0.3257531225681305,0.0598510466516018,0.1008039116859436) * MODEL21_texOff(vec2(-1,1)); +res += mat4(0.1698816716670990,0.3491003513336182,-0.1367681026458740,-0.1165873408317566,-0.2091718912124634,-0.1487034261226654,-0.0569749698042870,-0.2100717276334763,0.0404917001724243,-0.1372035890817642,0.0689046755433083,-0.0367818064987659,-0.0325474888086319,-0.0114965448155999,-0.0137249026447535,-0.0279692262411118) * MODEL22_texOff(vec2(-1,1)); +res += mat4(-0.0563433989882469,0.0132494345307350,-0.2434540390968323,0.0796563774347305,-0.2109155058860779,0.0387088693678379,-0.0591037571430206,0.0955820381641388,0.4660535752773285,-0.1204202473163605,0.1332369595766068,-0.0285425651818514,-0.3886952698230743,-0.0434980578720570,-0.0849134400486946,0.0802380964159966) * MODEL21_texOff(vec2(0,-1)); +res += mat4(0.0412235632538795,0.1571959257125854,0.2050069272518158,-0.1138664111495018,0.1962715685367584,0.0594439841806889,0.0351715497672558,-0.0129811102524400,0.2055217623710632,-0.0647534057497978,0.0373471938073635,0.0877277255058289,-0.5734645724296570,0.1188675239682198,-0.1145943328738213,-0.1182733029127121) * MODEL22_texOff(vec2(0,-1)); +res += mat4(-0.2004909217357635,-0.4817073047161102,0.5596802830696106,-0.0327854752540588,0.0989314392209053,0.4127818942070007,0.7265836596488953,-0.2692042589187622,0.5195841789245605,-0.2357539832592010,-0.3819393217563629,0.1755530238151550,0.6578183770179749,0.1075539961457253,-0.2688144743442535,0.3242723941802979) * MODEL21_texOff(vec2(0,0)); +res += mat4(-0.3221310675144196,0.2978510260581970,0.2269985526800156,-0.3184116482734680,0.4845580160617828,0.4407236874103546,0.0099756307899952,-0.3121858239173889,-0.3810067176818848,-0.0553649961948395,0.0202834140509367,0.0409953594207764,0.2532750964164734,0.2731618583202362,0.1237529441714287,0.0134243080392480) * MODEL22_texOff(vec2(0,0)); +res += mat4(0.1835541725158691,0.0549701862037182,-0.1749316602945328,-0.2030028849840164,0.0263462308794260,0.2781440317630768,0.0372458845376968,0.3643021881580353,-0.4047883749008179,0.0660117194056511,0.4863115549087524,-0.2024163603782654,-0.6403482556343079,0.2765505611896515,0.1417075097560883,0.5064445734024048) * MODEL21_texOff(vec2(0,1)); +res += mat4(0.6106975078582764,-0.1570862233638763,-0.3223383128643036,-0.2497926801443100,-0.4854303300380707,0.0132978223264217,-0.0609334111213684,0.1285556703805923,-0.1412864029407501,-0.1379042416810989,-0.0258826259523630,0.1357705891132355,-0.1285902857780457,-0.0577826797962189,0.0550044551491737,0.1717510819435120) * MODEL22_texOff(vec2(0,1)); +res += mat4(0.1389609426259995,0.0835867226123810,0.0309768319129944,-0.0278116948902607,-0.0390677824616432,-0.0111810686066747,-0.0025318188127130,0.0069569633342326,0.0347319357097149,0.0191543344408274,0.0314339138567448,-0.0228427499532700,0.0416300334036350,0.0249234102666378,0.1210031509399414,0.1142473593354225) * MODEL21_texOff(vec2(1,-1)); +res += mat4(0.0607251487672329,0.0386395826935768,-0.0219341218471527,-0.1102298423647881,0.1487188935279846,0.0602982006967068,-0.0280748903751373,-0.0211924221366644,0.0042894422076643,-0.0269144997000694,0.0814756453037262,-0.0314031280577183,-0.0213186051696539,-0.1362965404987335,0.0382767543196678,-0.0669511556625366) * MODEL22_texOff(vec2(1,-1)); +res += mat4(-0.2397561967372894,0.3023172020912170,-0.2398054003715515,0.0041919997893274,-0.1016605198383331,-0.1521034836769104,-0.1526568531990051,0.0272433310747147,0.0741761848330498,0.1116370111703873,0.1149727106094360,-0.0809784531593323,-0.1448147594928741,-0.0943927690386772,-0.0086280042305589,0.1243222951889038) * MODEL21_texOff(vec2(1,0)); +res += mat4(-0.0469366572797298,-0.1655988991260529,-0.1029584184288979,-0.1347874104976654,0.2064601778984070,0.0521226711571217,-0.1366733759641647,-0.0041872998699546,0.1077186539769173,0.0184442866593599,-0.2309073060750961,-0.1637075096368790,-0.0417953692376614,-0.3190860450267792,-0.1593534499406815,0.0136412177234888) * MODEL22_texOff(vec2(1,0)); +res += mat4(0.1698798984289169,0.0232755411416292,-0.0876034423708916,-0.3008348643779755,0.0789884999394417,0.0034748215693980,-0.0064704762771726,0.0057828431017697,-0.0190630126744509,-0.0334153175354004,-0.0195646341890097,0.0105131156742573,0.0995147302746773,-0.3130289018154144,-0.0724022984504700,0.0113303456455469) * MODEL21_texOff(vec2(1,1)); +res += mat4(-0.0027791252359748,-0.0193455871194601,-0.0415000133216381,0.0568981170654297,-0.2745247483253479,0.1222846284508705,0.1899162530899048,0.1067754998803139,-0.0561975166201591,-0.1500336527824402,0.0526139959692955,-0.3491798937320709,-0.0692384615540504,-0.0307095069438219,0.0498757846653461,0.0019003645284101) * MODEL22_texOff(vec2(1,1)); +res = max(res, vec4(0.0)) + vec4(0.1552927196025848,0.0782765746116638,0.7966942191123962,-1.1619627475738525) * min(res, vec4(0.0)); +return res; +} + +void main() +{ + at_ = ivec2(gl_GlobalInvocationID.xy); + if (at_.x >= p.size.x || at_.y >= p.size.y) return; + imageStore(dst, at_, hook()); +} diff --git a/app/src/shaders/fsrcnnx/pass_09.spv.inc b/app/src/shaders/fsrcnnx/pass_09.spv.inc new file mode 100644 index 0000000..0342a6c --- /dev/null +++ b/app/src/shaders/fsrcnnx/pass_09.spv.inc @@ -0,0 +1,703 @@ +{0x07230203,0x00010000,0x000d000b,0x000003c1, +0x00000000,0x00020011,0x00000001,0x0006000b, +0x00000001,0x4c534c47,0x6474732e,0x3035342e, +0x00000000,0x0003000e,0x00000000,0x00000001, +0x0006000f,0x00000005,0x00000004,0x6e69616d, +0x00000000,0x0000022a,0x00060010,0x00000004, +0x00000011,0x00000010,0x00000010,0x00000001, +0x00030047,0x00000020,0x00000002,0x00050048, +0x00000020,0x00000000,0x00000023,0x00000000, +0x00040047,0x0000004b,0x00000021,0x00000001, +0x00040047,0x0000004b,0x00000022,0x00000000, +0x00040047,0x00000068,0x00000021,0x00000002, +0x00040047,0x00000068,0x00000022,0x00000000, +0x00040047,0x0000022a,0x0000000b,0x0000001c, +0x00030047,0x00000247,0x00000019,0x00040047, +0x00000247,0x00000021,0x00000000,0x00040047, +0x00000247,0x00000022,0x00000000,0x00040047, +0x0000024c,0x0000000b,0x00000019,0x00020013, +0x00000002,0x00030021,0x00000003,0x00000002, +0x00030016,0x00000006,0x00000020,0x00090019, +0x00000007,0x00000006,0x00000001,0x00000000, +0x00000000,0x00000000,0x00000001,0x00000000, +0x0003001b,0x00000008,0x00000007,0x00040020, +0x00000009,0x00000000,0x00000008,0x00040017, +0x0000000c,0x00000006,0x00000004,0x00040015, +0x00000016,0x00000020,0x00000001,0x00040017, +0x00000017,0x00000016,0x00000002,0x0004002b, +0x00000016,0x0000001e,0x00000000,0x0005002c, +0x00000017,0x0000001f,0x0000001e,0x0000001e, +0x0003001e,0x00000020,0x00000017,0x00040020, +0x00000021,0x00000009,0x00000020,0x0004003b, +0x00000021,0x00000022,0x00000009,0x00040020, +0x00000023,0x00000009,0x00000017,0x0004002b, +0x00000016,0x00000026,0x00000001,0x0004002b, +0x00000006,0x00000030,0xbe05c03a,0x0004002b, +0x00000006,0x00000031,0xbda585de,0x0004002b, +0x00000006,0x00000032,0xbe93765b,0x0004002b, +0x00000006,0x00000033,0x3c233ba7,0x0007002c, +0x0000000c,0x00000034,0x00000030,0x00000031, +0x00000032,0x00000033,0x00040018,0x00000035, +0x0000000c,0x00000004,0x0004002b,0x00000006, +0x00000036,0xbdd3ab41,0x0004002b,0x00000006, +0x00000037,0x3d5db76f,0x0004002b,0x00000006, +0x00000038,0xbda4d4d2,0x0004002b,0x00000006, +0x00000039,0xbd090a5b,0x0007002c,0x0000000c, +0x0000003a,0x00000036,0x00000037,0x00000038, +0x00000039,0x0004002b,0x00000006,0x0000003b, +0xbcd8e2e3,0x0004002b,0x00000006,0x0000003c, +0x3de52373,0x0004002b,0x00000006,0x0000003d, +0x3df2e540,0x0004002b,0x00000006,0x0000003e, +0xbc510503,0x0007002c,0x0000000c,0x0000003f, +0x0000003b,0x0000003c,0x0000003d,0x0000003e, +0x0004002b,0x00000006,0x00000040,0x3e6506f4, +0x0004002b,0x00000006,0x00000041,0x3b25b724, +0x0004002b,0x00000006,0x00000042,0x3dc9d630, +0x0004002b,0x00000006,0x00000043,0x3d8c5340, +0x0007002c,0x0000000c,0x00000044,0x00000040, +0x00000041,0x00000042,0x00000043,0x0004002b, +0x00000006,0x00000045,0xbe4102e2,0x0004002b, +0x00000006,0x00000046,0x3d597100,0x0004002b, +0x00000006,0x00000047,0xbd4573fa,0x0004002b, +0x00000006,0x00000048,0x3d19b20a,0x0007002c, +0x0000000c,0x00000049,0x00000045,0x00000046, +0x00000047,0x00000048,0x0007002c,0x00000035, +0x0000004a,0x0000003a,0x0000003f,0x00000044, +0x00000049,0x0004003b,0x00000009,0x0000004b, +0x00000000,0x0004002b,0x00000006,0x00000053, +0x3e3c1da8,0x0004002b,0x00000006,0x00000054, +0xbd819b6b,0x0004002b,0x00000006,0x00000055, +0x3ad9c310,0x0004002b,0x00000006,0x00000056, +0x3d20ea7c,0x0007002c,0x0000000c,0x00000057, +0x00000053,0x00000054,0x00000055,0x00000056, +0x0004002b,0x00000006,0x00000058,0x3e95b3ec, +0x0004002b,0x00000006,0x00000059,0xbe2f80eb, +0x0004002b,0x00000006,0x0000005a,0x3e435646, +0x0004002b,0x00000006,0x0000005b,0x3d617795, +0x0007002c,0x0000000c,0x0000005c,0x00000058, +0x00000059,0x0000005a,0x0000005b,0x0004002b, +0x00000006,0x0000005d,0x3d83ef70,0x0004002b, +0x00000006,0x0000005e,0xbdd6507c,0x0004002b, +0x00000006,0x0000005f,0x3c998112,0x0004002b, +0x00000006,0x00000060,0x3d9dbb9f,0x0007002c, +0x0000000c,0x00000061,0x0000005d,0x0000005e, +0x0000005f,0x00000060,0x0004002b,0x00000006, +0x00000062,0x3e4606a1,0x0004002b,0x00000006, +0x00000063,0xbd3aa943,0x0004002b,0x00000006, +0x00000064,0x3d199a5f,0x0004002b,0x00000006, +0x00000065,0xbdd7ad4a,0x0007002c,0x0000000c, +0x00000066,0x00000062,0x00000063,0x00000064, +0x00000065,0x0007002c,0x00000035,0x00000067, +0x00000057,0x0000005c,0x00000061,0x00000066, +0x0004003b,0x00000009,0x00000068,0x00000000, +0x0004002b,0x00000006,0x0000006e,0xbdc72a03, +0x0004002b,0x00000006,0x0000006f,0x3e90683a, +0x0004002b,0x00000006,0x00000070,0x3c3bad56, +0x0004002b,0x00000006,0x00000071,0xbdc3724e, +0x0007002c,0x0000000c,0x00000072,0x0000006e, +0x0000006f,0x00000070,0x00000071,0x0004002b, +0x00000006,0x00000073,0x3d90a3f2,0x0004002b, +0x00000006,0x00000074,0x3ef73f84,0x0004002b, +0x00000006,0x00000075,0xbf231c60,0x0004002b, +0x00000006,0x00000076,0x3a07d108,0x0007002c, +0x0000000c,0x00000077,0x00000073,0x00000074, +0x00000075,0x00000076,0x0004002b,0x00000006, +0x00000078,0x3ea7f17f,0x0004002b,0x00000006, +0x00000079,0x3d883e0d,0x0004002b,0x00000006, +0x0000007a,0xbd4e1394,0x0004002b,0x00000006, +0x0000007b,0xbe012342,0x0007002c,0x0000000c, +0x0000007c,0x00000078,0x00000079,0x0000007a, +0x0000007b,0x0004002b,0x00000006,0x0000007d, +0x3de42f00,0x0004002b,0x00000006,0x0000007e, +0xbe523d02,0x0004002b,0x00000006,0x0000007f, +0x3e124e62,0x0004002b,0x00000006,0x00000080, +0x3ec9042e,0x0007002c,0x0000000c,0x00000081, +0x0000007d,0x0000007e,0x0000007f,0x00000080, +0x0007002c,0x00000035,0x00000082,0x00000072, +0x00000077,0x0000007c,0x00000081,0x0004002b, +0x00000006,0x00000083,0x00000000,0x0004002b, +0x00000006,0x0000008a,0xbe83ac17,0x0004002b, +0x00000006,0x0000008b,0x3e26a1c4,0x0004002b, +0x00000006,0x0000008c,0xbefcf1f6,0x0004002b, +0x00000006,0x0000008d,0xbe0b6c1e,0x0007002c, +0x0000000c,0x0000008e,0x0000008a,0x0000008b, +0x0000008c,0x0000008d,0x0004002b,0x00000006, +0x0000008f,0x3da4beee,0x0004002b,0x00000006, +0x00000090,0xbed8ac2b,0x0004002b,0x00000006, +0x00000091,0x3d852959,0x0004002b,0x00000006, +0x00000092,0x3d545eaf,0x0007002c,0x0000000c, +0x00000093,0x0000008f,0x00000090,0x00000091, +0x00000092,0x0004002b,0x00000006,0x00000094, +0xbd4dd0b2,0x0004002b,0x00000006,0x00000095, +0xbe05b6c3,0x0004002b,0x00000006,0x00000096, +0x3e39cd82,0x0004002b,0x00000006,0x00000097, +0x3c14e05a,0x0007002c,0x0000000c,0x00000098, +0x00000094,0x00000095,0x00000096,0x00000097, +0x0004002b,0x00000006,0x00000099,0xbd50ea0f, +0x0004002b,0x00000006,0x0000009a,0xbe2d34a6, +0x0004002b,0x00000006,0x0000009b,0x3dbcebd8, +0x0004002b,0x00000006,0x0000009c,0xbd00b309, +0x0007002c,0x0000000c,0x0000009d,0x00000099, +0x0000009a,0x0000009b,0x0000009c,0x0007002c, +0x00000035,0x0000009e,0x0000008e,0x00000093, +0x00000098,0x0000009d,0x0004002b,0x00000006, +0x000000a4,0x3e02195a,0x0004002b,0x00000006, +0x000000a5,0x3d66b8a9,0x0004002b,0x00000006, +0x000000a6,0xbd32641f,0x0004002b,0x00000006, +0x000000a7,0x3e20c09f,0x0007002c,0x0000000c, +0x000000a8,0x000000a4,0x000000a5,0x000000a6, +0x000000a7,0x0004002b,0x00000006,0x000000a9, +0x3d6c46e3,0x0004002b,0x00000006,0x000000aa, +0x3eb13d1a,0x0004002b,0x00000006,0x000000ab, +0xbd05636b,0x0004002b,0x00000006,0x000000ac, +0xbe89acf5,0x0007002c,0x0000000c,0x000000ad, +0x000000a9,0x000000aa,0x000000ab,0x000000ac, +0x0004002b,0x00000006,0x000000ae,0xbe096b25, +0x0004002b,0x00000006,0x000000af,0xbe0d8af4, +0x0004002b,0x00000006,0x000000b0,0x3e6ae22d, +0x0004002b,0x00000006,0x000000b1,0xbde3b33f, +0x0007002c,0x0000000c,0x000000b2,0x000000ae, +0x000000af,0x000000b0,0x000000b1,0x0004002b, +0x00000006,0x000000b3,0xbe0f9c52,0x0004002b, +0x00000006,0x000000b4,0xbea6c91d,0x0004002b, +0x00000006,0x000000b5,0x3d75265f,0x0004002b, +0x00000006,0x000000b6,0x3dce7248,0x0007002c, +0x0000000c,0x000000b7,0x000000b3,0x000000b4, +0x000000b5,0x000000b6,0x0007002c,0x00000035, +0x000000b8,0x000000a8,0x000000ad,0x000000b2, +0x000000b7,0x0004002b,0x00000006,0x000000c0, +0x3e2df576,0x0004002b,0x00000006,0x000000c1, +0x3eb2bd48,0x0004002b,0x00000006,0x000000c2, +0xbe0c0cf0,0x0004002b,0x00000006,0x000000c3, +0xbdeec558,0x0007002c,0x0000000c,0x000000c4, +0x000000c0,0x000000c1,0x000000c2,0x000000c3, +0x0004002b,0x00000006,0x000000c5,0xbe563128, +0x0004002b,0x00000006,0x000000c6,0xbe1845b6, +0x0004002b,0x00000006,0x000000c7,0xbd695e96, +0x0004002b,0x00000006,0x000000c8,0xbe571d0b, +0x0007002c,0x0000000c,0x000000c9,0x000000c5, +0x000000c6,0x000000c7,0x000000c8,0x0004002b, +0x00000006,0x000000ca,0x3d25daa0,0x0004002b, +0x00000006,0x000000cb,0xbe0c7f19,0x0004002b, +0x00000006,0x000000cc,0x3d8d1de5,0x0004002b, +0x00000006,0x000000cd,0xbd16a885,0x0007002c, +0x0000000c,0x000000ce,0x000000ca,0x000000cb, +0x000000cc,0x000000cd,0x0004002b,0x00000006, +0x000000cf,0xbd055084,0x0004002b,0x00000006, +0x000000d0,0xbc3c5c01,0x0004002b,0x00000006, +0x000000d1,0xbc60de6a,0x0004002b,0x00000006, +0x000000d2,0xbce51fb8,0x0007002c,0x0000000c, +0x000000d3,0x000000cf,0x000000d0,0x000000d1, +0x000000d2,0x0007002c,0x00000035,0x000000d4, +0x000000c4,0x000000c9,0x000000ce,0x000000d3, +0x0004002b,0x00000006,0x000000da,0xbd66c856, +0x0004002b,0x00000006,0x000000db,0x3c591428, +0x0004002b,0x00000006,0x000000dc,0xbe794c04, +0x0004002b,0x00000006,0x000000dd,0x3da322e2, +0x0007002c,0x0000000c,0x000000de,0x000000da, +0x000000db,0x000000dc,0x000000dd,0x0004002b, +0x00000006,0x000000df,0xbe57fa3c,0x0004002b, +0x00000006,0x000000e0,0x3d1e8d31,0x0004002b, +0x00000006,0x000000e1,0xbd7216c8,0x0004002b, +0x00000006,0x000000e2,0x3dc3c084,0x0007002c, +0x0000000c,0x000000e3,0x000000df,0x000000e0, +0x000000e1,0x000000e2,0x0004002b,0x00000006, +0x000000e4,0x3eee9e93,0x0004002b,0x00000006, +0x000000e5,0xbdf69ee4,0x0004002b,0x00000006, +0x000000e6,0x3e086f45,0x0004002b,0x00000006, +0x000000e7,0xbce9d219,0x0007002c,0x0000000c, +0x000000e8,0x000000e4,0x000000e5,0x000000e6, +0x000000e7,0x0004002b,0x00000006,0x000000e9, +0xbec70311,0x0004002b,0x00000006,0x000000ea, +0xbd322b05,0x0004002b,0x00000006,0x000000eb, +0xbdade719,0x0004002b,0x00000006,0x000000ec, +0x3da453df,0x0007002c,0x0000000c,0x000000ed, +0x000000e9,0x000000ea,0x000000eb,0x000000ec, +0x0007002c,0x00000035,0x000000ee,0x000000de, +0x000000e3,0x000000e8,0x000000ed,0x0004002b, +0x00000006,0x000000f5,0x3d28da0a,0x0004002b, +0x00000006,0x000000f6,0x3e20f7f8,0x0004002b, +0x00000006,0x000000f7,0x3e51ed56,0x0004002b, +0x00000006,0x000000f8,0xbde932cb,0x0007002c, +0x0000000c,0x000000f9,0x000000f5,0x000000f6, +0x000000f7,0x000000f8,0x0004002b,0x00000006, +0x000000fa,0x3e48fb6a,0x0004002b,0x00000006, +0x000000fb,0x3d737b89,0x0004002b,0x00000006, +0x000000fc,0x3d10100b,0x0004002b,0x00000006, +0x000000fd,0xbc54aeb9,0x0007002c,0x0000000c, +0x000000fe,0x000000fa,0x000000fb,0x000000fc, +0x000000fd,0x0004002b,0x00000006,0x000000ff, +0x3e52744c,0x0004002b,0x00000006,0x00000100, +0xbd849d6f,0x0004002b,0x00000006,0x00000101, +0x3d18f95f,0x0004002b,0x00000006,0x00000102, +0x3db3aa98,0x0007002c,0x0000000c,0x00000103, +0x000000ff,0x00000100,0x00000101,0x00000102, +0x0004002b,0x00000006,0x00000104,0xbf12ce93, +0x0004002b,0x00000006,0x00000105,0x3df370d1, +0x0004002b,0x00000006,0x00000106,0xbdeab06f, +0x0004002b,0x00000006,0x00000107,0xbdf23946, +0x0007002c,0x0000000c,0x00000108,0x00000104, +0x00000105,0x00000106,0x00000107,0x0007002c, +0x00000035,0x00000109,0x000000f9,0x000000fe, +0x00000103,0x00000108,0x0004002b,0x00000006, +0x0000010f,0xbe4d4d7e,0x0004002b,0x00000006, +0x00000110,0xbef6a257,0x0004002b,0x00000006, +0x00000111,0x3f0f4735,0x0004002b,0x00000006, +0x00000112,0xbd064a10,0x0007002c,0x0000000c, +0x00000113,0x0000010f,0x00000110,0x00000111, +0x00000112,0x0004002b,0x00000006,0x00000114, +0x3dca9c91,0x0004002b,0x00000006,0x00000115, +0x3ed35826,0x0004002b,0x00000006,0x00000116, +0x3f3a0163,0x0004002b,0x00000006,0x00000117, +0xbe89d524,0x0007002c,0x0000000c,0x00000118, +0x00000114,0x00000115,0x00000116,0x00000117, +0x0004002b,0x00000006,0x00000119,0x3f050378, +0x0004002b,0x00000006,0x0000011a,0xbe71697e, +0x0004002b,0x00000006,0x0000011b,0xbec38d8d, +0x0004002b,0x00000006,0x0000011c,0x3e33c42c, +0x0007002c,0x0000000c,0x0000011d,0x00000119, +0x0000011a,0x0000011b,0x0000011c,0x0004002b, +0x00000006,0x0000011e,0x3f2866c9,0x0004002b, +0x00000006,0x0000011f,0x3ddc4545,0x0004002b, +0x00000006,0x00000120,0xbe89a20d,0x0004002b, +0x00000006,0x00000121,0x3ea60708,0x0007002c, +0x0000000c,0x00000122,0x0000011e,0x0000011f, +0x00000120,0x00000121,0x0007002c,0x00000035, +0x00000123,0x00000113,0x00000118,0x0000011d, +0x00000122,0x0004002b,0x00000006,0x0000012a, +0xbea4ee5d,0x0004002b,0x00000006,0x0000012b, +0x3e987fee,0x0004002b,0x00000006,0x0000012c, +0x3e68724f,0x0004002b,0x00000006,0x0000012d, +0xbea306da,0x0007002c,0x0000000c,0x0000012e, +0x0000012a,0x0000012b,0x0000012c,0x0000012d, +0x0004002b,0x00000006,0x0000012f,0x3ef817fd, +0x0004002b,0x00000006,0x00000130,0x3ee1a689, +0x0004002b,0x00000006,0x00000131,0x3c2370d4, +0x0004002b,0x00000006,0x00000132,0xbe9fd6d2, +0x0007002c,0x0000000c,0x00000133,0x0000012f, +0x00000130,0x00000131,0x00000132,0x0004002b, +0x00000006,0x00000134,0xbec31350,0x0004002b, +0x00000006,0x00000135,0xbd62c668,0x0004002b, +0x00000006,0x00000136,0x3ca62967,0x0004002b, +0x00000006,0x00000137,0x3d27eac0,0x0007002c, +0x0000000c,0x00000138,0x00000134,0x00000135, +0x00000136,0x00000137,0x0004002b,0x00000006, +0x00000139,0x3e81ad46,0x0004002b,0x00000006, +0x0000013a,0x3e8bdbdf,0x0004002b,0x00000006, +0x0000013b,0x3dfd722f,0x0004002b,0x00000006, +0x0000013c,0x3c5bf1a1,0x0007002c,0x0000000c, +0x0000013d,0x00000139,0x0000013a,0x0000013b, +0x0000013c,0x0007002c,0x00000035,0x0000013e, +0x0000012e,0x00000133,0x00000138,0x0000013d, +0x0004002b,0x00000006,0x00000144,0x3e3bf5a0, +0x0004002b,0x00000006,0x00000145,0x3d61286b, +0x0004002b,0x00000006,0x00000146,0xbe332149, +0x0004002b,0x00000006,0x00000147,0xbe4fdffd, +0x0007002c,0x0000000c,0x00000148,0x00000144, +0x00000145,0x00000146,0x00000147,0x0004002b, +0x00000006,0x00000149,0x3cd7d40d,0x0004002b, +0x00000006,0x0000014a,0x3e8e68e5,0x0004002b, +0x00000006,0x0000014b,0x3d188f24,0x0004002b, +0x00000006,0x0000014c,0x3eba85d1,0x0007002c, +0x0000000c,0x0000014d,0x00000149,0x0000014a, +0x0000014b,0x0000014c,0x0004002b,0x00000006, +0x0000014e,0xbecf406c,0x0004002b,0x00000006, +0x0000014f,0x3d873127,0x0004002b,0x00000006, +0x00000150,0x3ef8fdd4,0x0004002b,0x00000006, +0x00000151,0xbe4f463c,0x0007002c,0x0000000c, +0x00000152,0x0000014e,0x0000014f,0x00000150, +0x00000151,0x0004002b,0x00000006,0x00000153, +0xbf23eddd,0x0004002b,0x00000006,0x00000154, +0x3e8d9809,0x0004002b,0x00000006,0x00000155, +0x3e111bc6,0x0004002b,0x00000006,0x00000156, +0x3f01a65a,0x0007002c,0x0000000c,0x00000157, +0x00000153,0x00000154,0x00000155,0x00000156, +0x0007002c,0x00000035,0x00000158,0x00000148, +0x0000014d,0x00000152,0x00000157,0x0004002b, +0x00000006,0x0000015f,0x3f1c56ac,0x0004002b, +0x00000006,0x00000160,0xbe20db36,0x0004002b, +0x00000006,0x00000161,0xbea50987,0x0004002b, +0x00000006,0x00000162,0xbe7fc9a7,0x0007002c, +0x0000000c,0x00000163,0x0000015f,0x00000160, +0x00000161,0x00000162,0x0004002b,0x00000006, +0x00000164,0xbef88a53,0x0004002b,0x00000006, +0x00000165,0x3c59df1c,0x0004002b,0x00000006, +0x00000166,0xbd799550,0x0004002b,0x00000006, +0x00000167,0x3e03a419,0x0007002c,0x0000000c, +0x00000168,0x00000164,0x00000165,0x00000166, +0x00000167,0x0004002b,0x00000006,0x00000169, +0xbe10ad62,0x0004002b,0x00000006,0x0000016a, +0xbe0d36c5,0x0004002b,0x00000006,0x0000016b, +0xbcd407cd,0x0004002b,0x00000006,0x0000016c, +0x3e0b0772,0x0007002c,0x0000000c,0x0000016d, +0x00000169,0x0000016a,0x0000016b,0x0000016c, +0x0004002b,0x00000006,0x0000016e,0xbe03ad2c, +0x0004002b,0x00000006,0x0000016f,0xbd6cad88, +0x0004002b,0x00000006,0x00000170,0x3d614c5a, +0x0004002b,0x00000006,0x00000171,0x3e2fdf84, +0x0007002c,0x0000000c,0x00000172,0x0000016e, +0x0000016f,0x00000170,0x00000171,0x0007002c, +0x00000035,0x00000173,0x00000163,0x00000168, +0x0000016d,0x00000172,0x0004002b,0x00000006, +0x00000179,0x3e0e4bc7,0x0004002b,0x00000006, +0x0000017a,0x3dab2f84,0x0004002b,0x00000006, +0x0000017b,0x3cfdc320,0x0004002b,0x00000006, +0x0000017c,0xbce3d55a,0x0007002c,0x0000000c, +0x0000017d,0x00000179,0x0000017a,0x0000017b, +0x0000017c,0x0004002b,0x00000006,0x0000017e, +0xbd20058a,0x0004002b,0x00000006,0x0000017f, +0xbc3730cd,0x0004002b,0x00000006,0x00000180, +0xbb25ecdf,0x0004002b,0x00000006,0x00000181, +0x3be3f73d,0x0007002c,0x0000000c,0x00000182, +0x0000017e,0x0000017f,0x00000180,0x00000181, +0x0004002b,0x00000006,0x00000183,0x3d0e4313, +0x0004002b,0x00000006,0x00000184,0x3c9ce98d, +0x0004002b,0x00000006,0x00000185,0x3d00c0d9, +0x0004002b,0x00000006,0x00000186,0xbcbb20b8, +0x0007002c,0x0000000c,0x00000187,0x00000183, +0x00000184,0x00000185,0x00000186,0x0004002b, +0x00000006,0x00000188,0x3d2a8441,0x0004002b, +0x00000006,0x00000189,0x3ccc2c2e,0x0004002b, +0x00000006,0x0000018a,0x3df7d080,0x0004002b, +0x00000006,0x0000018b,0x3de9fa85,0x0007002c, +0x0000000c,0x0000018c,0x00000188,0x00000189, +0x0000018a,0x0000018b,0x0007002c,0x00000035, +0x0000018d,0x0000017d,0x00000182,0x00000187, +0x0000018c,0x0004002b,0x00000006,0x00000194, +0x3d78baef,0x0004002b,0x00000006,0x00000195, +0x3d1e448a,0x0004002b,0x00000006,0x00000196, +0xbcb3af30,0x0004002b,0x00000006,0x00000197, +0xbde1c02f,0x0007002c,0x0000000c,0x00000198, +0x00000194,0x00000195,0x00000196,0x00000197, +0x0004002b,0x00000006,0x00000199,0x3e1849c4, +0x0004002b,0x00000006,0x0000019a,0x3d76fb3f, +0x0004002b,0x00000006,0x0000019b,0xbce5fd50, +0x0004002b,0x00000006,0x0000019c,0xbcad9bbb, +0x0007002c,0x0000000c,0x0000019d,0x00000199, +0x0000019a,0x0000019b,0x0000019c,0x0004002b, +0x00000006,0x0000019e,0x3b8c8e73,0x0004002b, +0x00000006,0x0000019f,0xbcdc7bcc,0x0004002b, +0x00000006,0x000001a0,0x3da6dcb4,0x0004002b, +0x00000006,0x000001a1,0xbd00a091,0x0007002c, +0x0000000c,0x000001a2,0x0000019e,0x0000019f, +0x000001a0,0x000001a1,0x0004002b,0x00000006, +0x000001a3,0xbcaea45b,0x0004002b,0x00000006, +0x000001a4,0xbe0b9152,0x0004002b,0x00000006, +0x000001a5,0x3d1cc816,0x0004002b,0x00000006, +0x000001a6,0xbd891db0,0x0007002c,0x0000000c, +0x000001a7,0x000001a3,0x000001a4,0x000001a5, +0x000001a6,0x0007002c,0x00000035,0x000001a8, +0x00000198,0x0000019d,0x000001a2,0x000001a7, +0x0004002b,0x00000006,0x000001ae,0xbe7582a6, +0x0004002b,0x00000006,0x000001af,0x3e9ac952, +0x0004002b,0x00000006,0x000001b0,0xbe758f8c, +0x0004002b,0x00000006,0x000001b1,0x3b895d0b, +0x0007002c,0x0000000c,0x000001b2,0x000001ae, +0x000001af,0x000001b0,0x000001b1,0x0004002b, +0x00000006,0x000001b3,0xbdd03364,0x0004002b, +0x00000006,0x000001b4,0xbe1bc104,0x0004002b, +0x00000006,0x000001b5,0xbe1c5214,0x0004002b, +0x00000006,0x000001b6,0x3cdf2d68,0x0007002c, +0x0000000c,0x000001b7,0x000001b3,0x000001b4, +0x000001b5,0x000001b6,0x0004002b,0x00000006, +0x000001b8,0x3d97e9af,0x0004002b,0x00000006, +0x000001b9,0x3de4a1f2,0x0004002b,0x00000006, +0x000001ba,0x3deb76d0,0x0004002b,0x00000006, +0x000001bb,0xbda5d808,0x0007002c,0x0000000c, +0x000001bc,0x000001b8,0x000001b9,0x000001ba, +0x000001bb,0x0004002b,0x00000006,0x000001bd, +0xbe144a52,0x0004002b,0x00000006,0x000001be, +0xbdc150ff,0x0004002b,0x00000006,0x000001bf, +0xbc0d5c79,0x0004002b,0x00000006,0x000001c0, +0x3dfe9cb0,0x0007002c,0x0000000c,0x000001c1, +0x000001bd,0x000001be,0x000001bf,0x000001c0, +0x0007002c,0x00000035,0x000001c2,0x000001b2, +0x000001b7,0x000001bc,0x000001c1,0x0004002b, +0x00000006,0x000001c9,0xbd4040a7,0x0004002b, +0x00000006,0x000001ca,0xbe2992c2,0x0004002b, +0x00000006,0x000001cb,0xbdd2dbdd,0x0004002b, +0x00000006,0x000001cc,0xbe0a05b6,0x0007002c, +0x0000000c,0x000001cd,0x000001c9,0x000001ca, +0x000001cb,0x000001cc,0x0004002b,0x00000006, +0x000001ce,0x3e536a4c,0x0004002b,0x00000006, +0x000001cf,0x3d557e95,0x0004002b,0x00000006, +0x000001d0,0xbe0bf41b,0x0004002b,0x00000006, +0x000001d1,0xbb89359e,0x0007002c,0x0000000c, +0x000001d2,0x000001ce,0x000001cf,0x000001d0, +0x000001d1,0x0004002b,0x00000006,0x000001d3, +0x3ddc9b99,0x0004002b,0x00000006,0x000001d4, +0x3c971879,0x0004002b,0x00000006,0x000001d5, +0xbe6c72f7,0x0004002b,0x00000006,0x000001d6, +0xbe27a2f1,0x0007002c,0x0000000c,0x000001d7, +0x000001d3,0x000001d4,0x000001d5,0x000001d6, +0x0004002b,0x00000006,0x000001d8,0xbd2b319f, +0x0004002b,0x00000006,0x000001d9,0xbea35f3f, +0x0004002b,0x00000006,0x000001da,0xbe232d8d, +0x0004002b,0x00000006,0x000001db,0x3c5f7f6a, +0x0007002c,0x0000000c,0x000001dc,0x000001d8, +0x000001d9,0x000001da,0x000001db,0x0007002c, +0x00000035,0x000001dd,0x000001cd,0x000001d2, +0x000001d7,0x000001dc,0x0004002b,0x00000006, +0x000001e3,0x3e2df4ff,0x0004002b,0x00000006, +0x000001e4,0x3cbeac59,0x0004002b,0x00000006, +0x000001e5,0xbdb3696f,0x0004002b,0x00000006, +0x000001e6,0xbe9a0707,0x0007002c,0x0000000c, +0x000001e7,0x000001e3,0x000001e4,0x000001e5, +0x000001e6,0x0004002b,0x00000006,0x000001e8, +0x3da1c4b9,0x0004002b,0x00000006,0x000001e9, +0x3b63b9d5,0x0004002b,0x00000006,0x000001ea, +0xbbd4064a,0x0004002b,0x00000006,0x000001eb, +0x3bbd7e01,0x0007002c,0x0000000c,0x000001ec, +0x000001e8,0x000001e9,0x000001ea,0x000001eb, +0x0004002b,0x00000006,0x000001ed,0xbc9c2a09, +0x0004002b,0x00000006,0x000001ee,0xbd08de80, +0x0004002b,0x00000006,0x000001ef,0xbca04603, +0x0004002b,0x00000006,0x000001f0,0x3c2c3f34, +0x0007002c,0x0000000c,0x000001f1,0x000001ed, +0x000001ee,0x000001ef,0x000001f0,0x0004002b, +0x00000006,0x000001f2,0x3dcbce61,0x0004002b, +0x00000006,0x000001f3,0xbea04553,0x0004002b, +0x00000006,0x000001f4,0xbd9447a8,0x0004002b, +0x00000006,0x000001f5,0x3c39a2ea,0x0007002c, +0x0000000c,0x000001f6,0x000001f2,0x000001f3, +0x000001f4,0x000001f5,0x0007002c,0x00000035, +0x000001f7,0x000001e7,0x000001ec,0x000001f1, +0x000001f6,0x0004002b,0x00000006,0x000001fe, +0xbb3621fc,0x0004002b,0x00000006,0x000001ff, +0xbc9e7aa3,0x0004002b,0x00000006,0x00000200, +0xbd29fbeb,0x0004002b,0x00000006,0x00000201, +0x3d690e00,0x0007002c,0x0000000c,0x00000202, +0x000001fe,0x000001ff,0x00000200,0x00000201, +0x0004002b,0x00000006,0x00000203,0xbe8c8e82, +0x0004002b,0x00000006,0x00000204,0x3dfa705d, +0x0004002b,0x00000006,0x00000205,0x3e427968, +0x0004002b,0x00000006,0x00000206,0x3ddaad1d, +0x0007002c,0x0000000c,0x00000207,0x00000203, +0x00000204,0x00000205,0x00000206,0x0004002b, +0x00000006,0x00000208,0xbd662f5e,0x0004002b, +0x00000006,0x00000209,0xbe19a26c,0x0004002b, +0x00000006,0x0000020a,0x3d5781c6,0x0004002b, +0x00000006,0x0000020b,0xbeb2c7b5,0x0007002c, +0x0000000c,0x0000020c,0x00000208,0x00000209, +0x0000020a,0x0000020b,0x0004002b,0x00000006, +0x0000020d,0xbd8dcce5,0x0004002b,0x00000006, +0x0000020e,0xbcfb9281,0x0004002b,0x00000006, +0x0000020f,0x3d4c4a8d,0x0004002b,0x00000006, +0x00000210,0x3af915a7,0x0007002c,0x0000000c, +0x00000211,0x0000020d,0x0000020e,0x0000020f, +0x00000210,0x0007002c,0x00000035,0x00000212, +0x00000202,0x00000207,0x0000020c,0x00000211, +0x0007002c,0x0000000c,0x00000219,0x00000083, +0x00000083,0x00000083,0x00000083,0x0004002b, +0x00000006,0x0000021b,0x3e1f050e,0x0004002b, +0x00000006,0x0000021c,0x3da04f78,0x0004002b, +0x00000006,0x0000021d,0x3f4bf427,0x0004002b, +0x00000006,0x0000021e,0xbf94bb32,0x0007002c, +0x0000000c,0x0000021f,0x0000021b,0x0000021c, +0x0000021d,0x0000021e,0x00040015,0x00000227, +0x00000020,0x00000000,0x00040017,0x00000228, +0x00000227,0x00000003,0x00040020,0x00000229, +0x00000001,0x00000228,0x0004003b,0x00000229, +0x0000022a,0x00000001,0x00040017,0x0000022b, +0x00000227,0x00000002,0x00020014,0x0000022f, +0x0004002b,0x00000227,0x00000230,0x00000000, +0x00040020,0x00000234,0x00000009,0x00000016, +0x0004002b,0x00000227,0x0000023b,0x00000001, +0x00090019,0x00000245,0x00000006,0x00000001, +0x00000000,0x00000000,0x00000000,0x00000002, +0x00000002,0x00040020,0x00000246,0x00000000, +0x00000245,0x0004003b,0x00000246,0x00000247, +0x00000000,0x0004002b,0x00000227,0x0000024b, +0x00000010,0x0006002c,0x00000228,0x0000024c, +0x0000024b,0x0000024b,0x0000023b,0x0004002b, +0x00000016,0x000003b8,0xffffffff,0x0005002c, +0x00000017,0x000003b9,0x000003b8,0x000003b8, +0x0005002c,0x00000017,0x000003ba,0x00000026, +0x00000026,0x0005002c,0x00000017,0x000003bb, +0x000003b8,0x0000001e,0x0005002c,0x00000017, +0x000003bc,0x000003b8,0x00000026,0x0005002c, +0x00000017,0x000003bd,0x0000001e,0x000003b8, +0x0005002c,0x00000017,0x000003be,0x0000001e, +0x00000026,0x0005002c,0x00000017,0x000003bf, +0x00000026,0x000003b8,0x0005002c,0x00000017, +0x000003c0,0x00000026,0x0000001e,0x00050036, +0x00000002,0x00000004,0x00000000,0x00000003, +0x000200f8,0x00000005,0x000300f7,0x0000024e, +0x00000000,0x000300fb,0x00000230,0x0000024f, +0x000200f8,0x0000024f,0x0004003d,0x00000228, +0x0000022c,0x0000022a,0x0007004f,0x0000022b, +0x0000022d,0x0000022c,0x0000022c,0x00000000, +0x00000001,0x0004007c,0x00000017,0x0000022e, +0x0000022d,0x00050051,0x00000016,0x00000233, +0x0000022e,0x00000000,0x00060041,0x00000234, +0x00000235,0x00000022,0x0000001e,0x00000230, +0x0004003d,0x00000016,0x00000236,0x00000235, +0x000500af,0x0000022f,0x00000237,0x00000233, +0x00000236,0x000400a8,0x0000022f,0x00000238, +0x00000237,0x000300f7,0x0000023a,0x00000000, +0x000400fa,0x00000238,0x00000239,0x0000023a, +0x000200f8,0x00000239,0x00050051,0x00000016, +0x0000023d,0x0000022e,0x00000001,0x00060041, +0x00000234,0x0000023e,0x00000022,0x0000001e, +0x0000023b,0x0004003d,0x00000016,0x0000023f, +0x0000023e,0x000500af,0x0000022f,0x00000240, +0x0000023d,0x0000023f,0x000200f9,0x0000023a, +0x000200f8,0x0000023a,0x000700f5,0x0000022f, +0x00000241,0x00000237,0x0000024f,0x00000240, +0x00000239,0x000300f7,0x00000243,0x00000000, +0x000400fa,0x00000241,0x00000242,0x00000243, +0x000200f8,0x00000242,0x000200f9,0x0000024e, +0x000200f8,0x00000243,0x0004003d,0x00000245, +0x00000248,0x00000247,0x0004003d,0x00000008, +0x000002ba,0x0000004b,0x00050080,0x00000017, +0x000002be,0x0000022e,0x000003b9,0x00050041, +0x00000023,0x000002bf,0x00000022,0x0000001e, +0x0004003d,0x00000017,0x000002c0,0x000002bf, +0x00050082,0x00000017,0x000002c2,0x000002c0, +0x000003ba,0x0008000c,0x00000017,0x000002c3, +0x00000001,0x0000002d,0x000002be,0x0000001f, +0x000002c2,0x00040064,0x00000007,0x000002c4, +0x000002ba,0x0007005f,0x0000000c,0x000002c5, +0x000002c4,0x000002c3,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x0000026a,0x0000004a, +0x000002c5,0x00050081,0x0000000c,0x0000026c, +0x00000034,0x0000026a,0x0004003d,0x00000008, +0x000002c8,0x00000068,0x00040064,0x00000007, +0x000002d2,0x000002c8,0x0007005f,0x0000000c, +0x000002d3,0x000002d2,0x000002c3,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x0000026e, +0x00000067,0x000002d3,0x00050081,0x0000000c, +0x00000270,0x0000026c,0x0000026e,0x0004003d, +0x00000008,0x000002d6,0x0000004b,0x00050080, +0x00000017,0x000002da,0x0000022e,0x000003bb, +0x0008000c,0x00000017,0x000002df,0x00000001, +0x0000002d,0x000002da,0x0000001f,0x000002c2, +0x00040064,0x00000007,0x000002e0,0x000002d6, +0x0007005f,0x0000000c,0x000002e1,0x000002e0, +0x000002df,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x00000272,0x00000082,0x000002e1, +0x00050081,0x0000000c,0x00000274,0x00000270, +0x00000272,0x0004003d,0x00000008,0x000002e4, +0x00000068,0x00040064,0x00000007,0x000002ee, +0x000002e4,0x0007005f,0x0000000c,0x000002ef, +0x000002ee,0x000002df,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x00000276,0x0000009e, +0x000002ef,0x00050081,0x0000000c,0x00000278, +0x00000274,0x00000276,0x0004003d,0x00000008, +0x000002f2,0x0000004b,0x00050080,0x00000017, +0x000002f6,0x0000022e,0x000003bc,0x0008000c, +0x00000017,0x000002fb,0x00000001,0x0000002d, +0x000002f6,0x0000001f,0x000002c2,0x00040064, +0x00000007,0x000002fc,0x000002f2,0x0007005f, +0x0000000c,0x000002fd,0x000002fc,0x000002fb, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x0000027a,0x000000b8,0x000002fd,0x00050081, +0x0000000c,0x0000027c,0x00000278,0x0000027a, +0x0004003d,0x00000008,0x00000300,0x00000068, +0x00040064,0x00000007,0x0000030a,0x00000300, +0x0007005f,0x0000000c,0x0000030b,0x0000030a, +0x000002fb,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x0000027e,0x000000d4,0x0000030b, +0x00050081,0x0000000c,0x00000280,0x0000027c, +0x0000027e,0x0004003d,0x00000008,0x0000030e, +0x0000004b,0x00050080,0x00000017,0x00000312, +0x0000022e,0x000003bd,0x0008000c,0x00000017, +0x00000317,0x00000001,0x0000002d,0x00000312, +0x0000001f,0x000002c2,0x00040064,0x00000007, +0x00000318,0x0000030e,0x0007005f,0x0000000c, +0x00000319,0x00000318,0x00000317,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x00000282, +0x000000ee,0x00000319,0x00050081,0x0000000c, +0x00000284,0x00000280,0x00000282,0x0004003d, +0x00000008,0x0000031c,0x00000068,0x00040064, +0x00000007,0x00000326,0x0000031c,0x0007005f, +0x0000000c,0x00000327,0x00000326,0x00000317, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x00000286,0x00000109,0x00000327,0x00050081, +0x0000000c,0x00000288,0x00000284,0x00000286, +0x0004003d,0x00000008,0x0000032a,0x0000004b, +0x0008000c,0x00000017,0x00000333,0x00000001, +0x0000002d,0x0000022e,0x0000001f,0x000002c2, +0x00040064,0x00000007,0x00000334,0x0000032a, +0x0007005f,0x0000000c,0x00000335,0x00000334, +0x00000333,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x0000028a,0x00000123,0x00000335, +0x00050081,0x0000000c,0x0000028c,0x00000288, +0x0000028a,0x0004003d,0x00000008,0x00000338, +0x00000068,0x00040064,0x00000007,0x00000342, +0x00000338,0x0007005f,0x0000000c,0x00000343, +0x00000342,0x00000333,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x0000028e,0x0000013e, +0x00000343,0x00050081,0x0000000c,0x00000290, +0x0000028c,0x0000028e,0x0004003d,0x00000008, +0x00000346,0x0000004b,0x00050080,0x00000017, +0x0000034a,0x0000022e,0x000003be,0x0008000c, +0x00000017,0x0000034f,0x00000001,0x0000002d, +0x0000034a,0x0000001f,0x000002c2,0x00040064, +0x00000007,0x00000350,0x00000346,0x0007005f, +0x0000000c,0x00000351,0x00000350,0x0000034f, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x00000292,0x00000158,0x00000351,0x00050081, +0x0000000c,0x00000294,0x00000290,0x00000292, +0x0004003d,0x00000008,0x00000354,0x00000068, +0x00040064,0x00000007,0x0000035e,0x00000354, +0x0007005f,0x0000000c,0x0000035f,0x0000035e, +0x0000034f,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x00000296,0x00000173,0x0000035f, +0x00050081,0x0000000c,0x00000298,0x00000294, +0x00000296,0x0004003d,0x00000008,0x00000362, +0x0000004b,0x00050080,0x00000017,0x00000366, +0x0000022e,0x000003bf,0x0008000c,0x00000017, +0x0000036b,0x00000001,0x0000002d,0x00000366, +0x0000001f,0x000002c2,0x00040064,0x00000007, +0x0000036c,0x00000362,0x0007005f,0x0000000c, +0x0000036d,0x0000036c,0x0000036b,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x0000029a, +0x0000018d,0x0000036d,0x00050081,0x0000000c, +0x0000029c,0x00000298,0x0000029a,0x0004003d, +0x00000008,0x00000370,0x00000068,0x00040064, +0x00000007,0x0000037a,0x00000370,0x0007005f, +0x0000000c,0x0000037b,0x0000037a,0x0000036b, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x0000029e,0x000001a8,0x0000037b,0x00050081, +0x0000000c,0x000002a0,0x0000029c,0x0000029e, +0x0004003d,0x00000008,0x0000037e,0x0000004b, +0x00050080,0x00000017,0x00000382,0x0000022e, +0x000003c0,0x0008000c,0x00000017,0x00000387, +0x00000001,0x0000002d,0x00000382,0x0000001f, +0x000002c2,0x00040064,0x00000007,0x00000388, +0x0000037e,0x0007005f,0x0000000c,0x00000389, +0x00000388,0x00000387,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x000002a2,0x000001c2, +0x00000389,0x00050081,0x0000000c,0x000002a4, +0x000002a0,0x000002a2,0x0004003d,0x00000008, +0x0000038c,0x00000068,0x00040064,0x00000007, +0x00000396,0x0000038c,0x0007005f,0x0000000c, +0x00000397,0x00000396,0x00000387,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x000002a6, +0x000001dd,0x00000397,0x00050081,0x0000000c, +0x000002a8,0x000002a4,0x000002a6,0x0004003d, +0x00000008,0x0000039a,0x0000004b,0x00050080, +0x00000017,0x0000039e,0x0000022e,0x000003ba, +0x0008000c,0x00000017,0x000003a3,0x00000001, +0x0000002d,0x0000039e,0x0000001f,0x000002c2, +0x00040064,0x00000007,0x000003a4,0x0000039a, +0x0007005f,0x0000000c,0x000003a5,0x000003a4, +0x000003a3,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x000002aa,0x000001f7,0x000003a5, +0x00050081,0x0000000c,0x000002ac,0x000002a8, +0x000002aa,0x0004003d,0x00000008,0x000003a8, +0x00000068,0x00040064,0x00000007,0x000003b2, +0x000003a8,0x0007005f,0x0000000c,0x000003b3, +0x000003b2,0x000003a3,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x000002ae,0x00000212, +0x000003b3,0x00050081,0x0000000c,0x000002b0, +0x000002ac,0x000002ae,0x0007000c,0x0000000c, +0x000002b2,0x00000001,0x00000028,0x000002b0, +0x00000219,0x0007000c,0x0000000c,0x000002b4, +0x00000001,0x00000025,0x000002b0,0x00000219, +0x00050085,0x0000000c,0x000002b5,0x0000021f, +0x000002b4,0x00050081,0x0000000c,0x000002b6, +0x000002b2,0x000002b5,0x00040063,0x00000248, +0x0000022e,0x000002b6,0x000200f9,0x0000024e, +0x000200f8,0x0000024e,0x000100fd,0x00010038} diff --git a/app/src/shaders/fsrcnnx/pass_10.comp b/app/src/shaders/fsrcnnx/pass_10.comp new file mode 100644 index 0000000..8bf65c3 --- /dev/null +++ b/app/src/shaders/fsrcnnx/pass_10.comp @@ -0,0 +1,46 @@ +#version 450 +// Generated by tools/gen_fsrcnnx.js from third_party/FSRCNNX_x2_8-0-4-1.glsl +// (FSRCNNX by igv, LGPL-3.0). Layer: mapping 4_2. Do not edit. +layout(local_size_x = 16, local_size_y = 16) in; +layout(binding = 0, rgba16f) uniform writeonly image2D dst; +layout(binding = 1) uniform sampler2D in0; +layout(binding = 2) uniform sampler2D in1; +layout(binding = 3) uniform sampler2D in2; +layout(push_constant) uniform Params { ivec2 size; } p; + +ivec2 at_; +vec4 fetch_(sampler2D s, vec2 o) { return texelFetch(s, clamp(at_ + ivec2(o), ivec2(0), p.size - 1), 0); } +#define MODEL21_texOff(o) fetch_(in0, vec2(o)) +#define MODEL22_texOff(o) fetch_(in1, vec2(o)) + +vec4 hook() +{ +vec4 res = vec4(-0.1443098634481430,-0.1343899369239807,-0.0624338127672672,-0.1094277128577232); +res += mat4(-0.0689977407455444,-0.1693786680698395,0.0109281269833446,0.0609922930598259,0.0296908002346754,0.1195700988173485,-0.0694077461957932,0.0971287414431572,0.0253518298268318,0.1213042959570885,0.0703809782862663,0.0055739870294929,-0.1595942378044128,-0.1336689442396164,-0.0622441768646240,-0.0428023114800453) * MODEL21_texOff(vec2(-1,-1)); +res += mat4(0.0860001668334007,-0.0226618759334087,0.1602241247892380,0.0431661494076252,0.1526461094617844,0.2752982378005981,0.0960300788283348,-0.0536719262599945,-0.0171773489564657,0.0457364916801453,-0.0360932648181915,-0.0397153608500957,-0.0277090407907963,0.0729821547865868,-0.0145150292664766,0.0252893269062042) * MODEL22_texOff(vec2(-1,-1)); +res += mat4(-0.1407091915607452,-0.4007499516010284,-0.0302001200616360,-0.0606933943927288,-0.2960600554943085,-0.2263117432594299,0.0721478462219238,-0.4578711986541748,0.0960150733590126,-0.1606502830982208,0.2444226741790771,0.0000882153908606,0.1472496986389160,0.3256779909133911,-0.2132861614227295,0.0339313484728336) * MODEL21_texOff(vec2(-1,0)); +res += mat4(-0.1477648764848709,-0.1487885862588882,-0.1973863691091537,0.0717295333743095,0.0843430235981941,0.6259996294975281,-0.1214931011199951,-0.1274987608194351,0.2359549105167389,0.3002171218395233,-0.0825233608484268,-0.0157950688153505,0.0706149637699127,0.1762917637825012,-0.0611497573554516,-0.0859689489006996) * MODEL22_texOff(vec2(-1,0)); +res += mat4(0.0174895934760571,-0.0567042417824268,0.0409146919846535,0.0258173532783985,0.1421577036380768,0.1234543323516846,-0.1721662431955338,0.1492216140031815,0.1100751459598541,0.0501539446413517,0.1100447699427605,-0.1086079254746437,-0.0608497932553291,0.0087817469611764,0.0714464113116264,-0.1285197436809540) * MODEL21_texOff(vec2(-1,1)); +res += mat4(-0.0017177806003019,-0.1463395059108734,-0.1085453778505325,0.1650195866823196,0.0813829153776169,0.1102061793208122,-0.0578421875834465,-0.0232036896049976,-0.1239888817071915,0.0155465165153146,0.1079114526510239,-0.0420837886631489,-0.0775837749242783,0.0148941157385707,-0.0502299368381500,-0.0654754191637039) * MODEL22_texOff(vec2(-1,1)); +res += mat4(0.0918162539601326,0.0440697595477104,-0.0515748932957649,0.0417411290109158,0.0353216230869293,0.1535954177379608,0.0439723692834377,-0.1288845241069794,0.1076577678322792,-0.1306740194559097,0.0715952813625336,-0.0681907683610916,-0.3798767924308777,0.1023928597569466,-0.0970670804381371,0.0077168666757643) * MODEL21_texOff(vec2(0,-1)); +res += mat4(0.0634560957551003,-0.0550306066870689,0.2073986232280731,0.0520241297781467,0.1162287592887878,-0.2218665480613708,0.3199682831764221,0.0606246069073677,-0.0058511858806014,-0.0667045339941978,-0.0449917949736118,0.0707788690924644,-0.3323366343975067,-0.0763893201947212,-0.0997853428125381,-0.1181001588702202) * MODEL22_texOff(vec2(0,-1)); +res += mat4(-0.3101258873939514,0.2616009712219238,0.0584651045501232,0.1656491309404373,-0.0069236233830452,0.2573371529579163,-0.1793291717767715,-0.2718756198883057,0.0953581258654594,0.0524105131626129,0.1183085516095161,0.0583294369280338,0.5036848187446594,-0.5763167142868042,-0.2119628041982651,-0.3140562772750854) * MODEL21_texOff(vec2(0,0)); +res += mat4(-0.2497755438089371,-0.0146329319104552,-0.2741575539112091,0.2459975033998489,0.3562706708908081,-0.6528629064559937,-0.4287456274032593,0.2055913358926773,0.1739019453525543,-0.3855968713760376,-0.0958273336291313,-0.7066691517829895,0.2365748286247253,-0.3046728968620300,-0.2590373754501343,-0.0496727414429188) * MODEL22_texOff(vec2(0,0)); +res += mat4(-0.0844531357288361,-0.0321611948311329,-0.0951840654015541,0.0577518045902252,-0.1606003493070602,0.2776086628437042,-0.1355003118515015,-0.0880064144730568,-0.1277643740177155,-0.0514567233622074,0.1522682905197144,-0.1040910631418228,-0.2767944037914276,-0.1452194601297379,0.0089118303731084,0.0231996178627014) * MODEL21_texOff(vec2(0,1)); +res += mat4(0.2603267133235931,0.0167464651167393,-0.2064073234796524,0.1782064288854599,0.4890212416648865,0.0559245310723782,0.1221160590648651,-0.0202587731182575,-0.4056585729122162,-0.1839511841535568,0.2775998413562775,0.0024275144096464,-0.2624500989913940,-0.0619418807327747,0.0153478365391493,0.0123427547514439) * MODEL22_texOff(vec2(0,1)); +res += mat4(0.0816635638475418,-0.0134946266189218,0.0594766475260258,-0.0551253929734230,0.0134431896731257,-0.0652195811271667,-0.0563635528087616,-0.0066532371565700,-0.0004114551993553,0.0105680683627725,0.1324467360973358,0.0467248968780041,0.0301312971860170,-0.1073397025465965,-0.0363437235355377,-0.0474153012037277) * MODEL21_texOff(vec2(1,-1)); +res += mat4(0.0199097190052271,0.0901319086551666,0.0448978282511234,0.0505443066358566,0.0438878424465656,-0.0494784042239189,0.0724927335977554,-0.0070675504393876,-0.0012125011999160,0.0295279901474714,0.0705125033855438,0.0555334389209747,-0.0403393507003784,-0.1271172016859055,0.0017914215568453,0.1462216079235077) * MODEL22_texOff(vec2(1,-1)); +res += mat4(-0.2827299833297729,0.2052399665117264,0.0042732120491564,-0.3969024717807770,-0.0782120972871780,0.1960176974534988,-0.0675340741872787,0.0027962317690253,0.0516129024326801,-0.0352642722427845,0.0546326488256454,0.0065340655855834,-0.1062376946210861,0.1364430636167526,-0.0536947809159756,0.2098117172718048) * MODEL21_texOff(vec2(1,0)); +res += mat4(0.0045875865034759,0.2162927240133286,-0.2158576399087906,-0.0047327815555036,0.1251590698957443,0.1279677897691727,-0.1188964918255806,0.0328494384884834,0.0076038073748350,-0.0561547242105007,0.0335608273744583,0.4332321286201477,0.0021786799188703,0.0844521671533585,-0.2102309316396713,-0.0189208015799522) * MODEL22_texOff(vec2(1,0)); +res += mat4(0.0933093801140785,0.1548244059085846,-0.0598701611161232,0.0357220247387886,-0.1141726672649384,0.0536412484943867,-0.0159156844019890,-0.0445508137345314,0.1883231997489929,-0.1547038406133652,0.0530619807541370,0.0059371814131737,0.0602529086172581,-0.0435577929019928,0.0083390390500426,0.0191930737346411) * MODEL21_texOff(vec2(1,1)); +res += mat4(-0.0351041629910469,0.2119503468275070,-0.0841927304863930,0.0079463515430689,0.0683520361781120,-0.1657009869813919,0.0611055232584476,-0.0063667562790215,0.0330024957656860,-0.1810818463563919,0.0872574150562286,0.1485669612884521,-0.1305806934833527,0.0041402997449040,0.0223289318382740,-0.0141495745629072) * MODEL22_texOff(vec2(1,1)); +res = max(res, vec4(0.0)) + vec4(0.5769761204719543,0.1716064810752869,-0.0821026712656021,0.2092144042253494) * min(res, vec4(0.0)); +return res; +} + +void main() +{ + at_ = ivec2(gl_GlobalInvocationID.xy); + if (at_.x >= p.size.x || at_.y >= p.size.y) return; + imageStore(dst, at_, hook()); +} diff --git a/app/src/shaders/fsrcnnx/pass_10.spv.inc b/app/src/shaders/fsrcnnx/pass_10.spv.inc new file mode 100644 index 0000000..11679f1 --- /dev/null +++ b/app/src/shaders/fsrcnnx/pass_10.spv.inc @@ -0,0 +1,703 @@ +{0x07230203,0x00010000,0x000d000b,0x000003c1, +0x00000000,0x00020011,0x00000001,0x0006000b, +0x00000001,0x4c534c47,0x6474732e,0x3035342e, +0x00000000,0x0003000e,0x00000000,0x00000001, +0x0006000f,0x00000005,0x00000004,0x6e69616d, +0x00000000,0x0000022a,0x00060010,0x00000004, +0x00000011,0x00000010,0x00000010,0x00000001, +0x00030047,0x00000020,0x00000002,0x00050048, +0x00000020,0x00000000,0x00000023,0x00000000, +0x00040047,0x0000004b,0x00000021,0x00000001, +0x00040047,0x0000004b,0x00000022,0x00000000, +0x00040047,0x00000068,0x00000021,0x00000002, +0x00040047,0x00000068,0x00000022,0x00000000, +0x00040047,0x0000022a,0x0000000b,0x0000001c, +0x00030047,0x00000247,0x00000019,0x00040047, +0x00000247,0x00000021,0x00000000,0x00040047, +0x00000247,0x00000022,0x00000000,0x00040047, +0x0000024c,0x0000000b,0x00000019,0x00020013, +0x00000002,0x00030021,0x00000003,0x00000002, +0x00030016,0x00000006,0x00000020,0x00090019, +0x00000007,0x00000006,0x00000001,0x00000000, +0x00000000,0x00000000,0x00000001,0x00000000, +0x0003001b,0x00000008,0x00000007,0x00040020, +0x00000009,0x00000000,0x00000008,0x00040017, +0x0000000c,0x00000006,0x00000004,0x00040015, +0x00000016,0x00000020,0x00000001,0x00040017, +0x00000017,0x00000016,0x00000002,0x0004002b, +0x00000016,0x0000001e,0x00000000,0x0005002c, +0x00000017,0x0000001f,0x0000001e,0x0000001e, +0x0003001e,0x00000020,0x00000017,0x00040020, +0x00000021,0x00000009,0x00000020,0x0004003b, +0x00000021,0x00000022,0x00000009,0x00040020, +0x00000023,0x00000009,0x00000017,0x0004002b, +0x00000016,0x00000026,0x00000001,0x0004002b, +0x00000006,0x00000030,0xbe13c5f7,0x0004002b, +0x00000006,0x00000031,0xbe099d84,0x0004002b, +0x00000006,0x00000032,0xbd7fba99,0x0004002b, +0x00000006,0x00000033,0xbde01ba3,0x0007002c, +0x0000000c,0x00000034,0x00000030,0x00000031, +0x00000032,0x00000033,0x00040018,0x00000035, +0x0000000c,0x00000004,0x0004002b,0x00000006, +0x00000036,0xbd8d4eb0,0x0004002b,0x00000006, +0x00000037,0xbe2d719a,0x0004002b,0x00000006, +0x00000038,0x3c330be3,0x0004002b,0x00000006, +0x00000039,0x3d79d30e,0x0007002c,0x0000000c, +0x0000003a,0x00000036,0x00000037,0x00000038, +0x00000039,0x0004002b,0x00000006,0x0000003b, +0x3cf33a1f,0x0004002b,0x00000006,0x0000003c, +0x3df4e12b,0x0004002b,0x00000006,0x0000003d, +0xbd8e25a6,0x0004002b,0x00000006,0x0000003e, +0x3dc6eb6f,0x0007002c,0x0000000c,0x0000003f, +0x0000003b,0x0000003c,0x0000003d,0x0000003e, +0x0004002b,0x00000006,0x00000040,0x3ccfaea4, +0x0004002b,0x00000006,0x00000041,0x3df86e63, +0x0004002b,0x00000006,0x00000042,0x3d9023e7, +0x0004002b,0x00000006,0x00000043,0x3bb6a5fe, +0x0007002c,0x0000000c,0x00000044,0x00000040, +0x00000041,0x00000042,0x00000043,0x0004002b, +0x00000006,0x00000045,0xbe236cac,0x0004002b, +0x00000006,0x00000046,0xbe08e083,0x0004002b, +0x00000006,0x00000047,0xbd7ef3c0,0x0004002b, +0x00000006,0x00000048,0xbd2f517a,0x0007002c, +0x0000000c,0x00000049,0x00000045,0x00000046, +0x00000047,0x00000048,0x0007002c,0x00000035, +0x0000004a,0x0000003a,0x0000003f,0x00000044, +0x00000049,0x0004003b,0x00000009,0x0000004b, +0x00000000,0x0004002b,0x00000006,0x00000053, +0x3db020db,0x0004002b,0x00000006,0x00000054, +0xbcb9a566,0x0004002b,0x00000006,0x00000055, +0x3e2411cb,0x0004002b,0x00000006,0x00000056, +0x3d30cefd,0x0007002c,0x0000000c,0x00000057, +0x00000053,0x00000054,0x00000055,0x00000056, +0x0004002b,0x00000006,0x00000058,0x3e1c4f43, +0x0004002b,0x00000006,0x00000059,0x3e8cf3e4, +0x0004002b,0x00000006,0x0000005a,0x3dc4ab6b, +0x0004002b,0x00000006,0x0000005b,0xbd5bd718, +0x0007002c,0x0000000c,0x0000005c,0x00000058, +0x00000059,0x0000005a,0x0000005b,0x0004002b, +0x00000006,0x0000005d,0xbc8cb783,0x0004002b, +0x00000006,0x0000005e,0x3d3b5630,0x0004002b, +0x00000006,0x0000005f,0xbd13d688,0x0004002b, +0x00000006,0x00000060,0xbd22ac93,0x0007002c, +0x0000000c,0x00000061,0x0000005d,0x0000005e, +0x0000005f,0x00000060,0x0004002b,0x00000006, +0x00000062,0xbce2fe12,0x0004002b,0x00000006, +0x00000063,0x3d9577ab,0x0004002b,0x00000006, +0x00000064,0xbc6dd072,0x0004002b,0x00000006, +0x00000065,0x3ccf2b90,0x0007002c,0x0000000c, +0x00000066,0x00000062,0x00000063,0x00000064, +0x00000065,0x0007002c,0x00000035,0x00000067, +0x00000057,0x0000005c,0x00000061,0x00000066, +0x0004003b,0x00000009,0x00000068,0x00000000, +0x0004002b,0x00000006,0x0000006e,0xbe101612, +0x0004002b,0x00000006,0x0000006f,0xbecd2f19, +0x0004002b,0x00000006,0x00000070,0xbcf7663e, +0x0004002b,0x00000006,0x00000071,0xbd7899a3, +0x0007002c,0x0000000c,0x00000072,0x0000006e, +0x0000006f,0x00000070,0x00000071,0x0004002b, +0x00000006,0x00000073,0xbe97952f,0x0004002b, +0x00000006,0x00000074,0xbe67be44,0x0004002b, +0x00000006,0x00000075,0x3d93c240,0x0004002b, +0x00000006,0x00000076,0xbeea6e18,0x0007002c, +0x0000000c,0x00000077,0x00000073,0x00000074, +0x00000075,0x00000076,0x0004002b,0x00000006, +0x00000078,0x3dc4a38d,0x0004002b,0x00000006, +0x00000079,0xbe248182,0x0004002b,0x00000006, +0x0000007a,0x3e7a49f0,0x0004002b,0x00000006, +0x0000007b,0x38b90047,0x0007002c,0x0000000c, +0x0000007c,0x00000078,0x00000079,0x0000007a, +0x0000007b,0x0004002b,0x00000006,0x0000007d, +0x3e16c8a0,0x0004002b,0x00000006,0x0000007e, +0x3ea6bf44,0x0004002b,0x00000006,0x0000007f, +0xbe5a67b0,0x0004002b,0x00000006,0x00000080, +0x3d0afb99,0x0007002c,0x0000000c,0x00000081, +0x0000007d,0x0000007e,0x0000007f,0x00000080, +0x0007002c,0x00000035,0x00000082,0x00000072, +0x00000077,0x0000007c,0x00000081,0x0004002b, +0x00000006,0x00000083,0x00000000,0x0004002b, +0x00000006,0x0000008a,0xbe174fad,0x0004002b, +0x00000006,0x0000008b,0xbe185c09,0x0004002b, +0x00000006,0x0000008c,0xbe4a1fa7,0x0004002b, +0x00000006,0x0000008d,0x3d92e6ef,0x0007002c, +0x0000000c,0x0000008e,0x0000008a,0x0000008b, +0x0000008c,0x0000008d,0x0004002b,0x00000006, +0x0000008f,0x3dacbc09,0x0004002b,0x00000006, +0x00000090,0x3f204183,0x0004002b,0x00000006, +0x00000091,0xbdf8d160,0x0004002b,0x00000006, +0x00000092,0xbe028f09,0x0007002c,0x0000000c, +0x00000093,0x0000008f,0x00000090,0x00000091, +0x00000092,0x0004002b,0x00000006,0x00000094, +0x3e719e2a,0x0004002b,0x00000006,0x00000095, +0x3e99b60f,0x0004002b,0x00000006,0x00000096, +0xbda90202,0x0004002b,0x00000006,0x00000097, +0xbc8164a9,0x0007002c,0x0000000c,0x00000098, +0x00000094,0x00000095,0x00000096,0x00000097, +0x0004002b,0x00000006,0x00000099,0x3d909e94, +0x0004002b,0x00000006,0x0000009a,0x3e3485d4, +0x0004002b,0x00000006,0x0000009b,0xbd7a782b, +0x0004002b,0x00000006,0x0000009c,0xbdb0107d, +0x0007002c,0x0000000c,0x0000009d,0x00000099, +0x0000009a,0x0000009b,0x0000009c,0x0007002c, +0x00000035,0x0000009e,0x0000008e,0x00000093, +0x00000098,0x0000009d,0x0004002b,0x00000006, +0x000000a4,0x3c8f4656,0x0004002b,0x00000006, +0x000000a5,0xbd6842b5,0x0004002b,0x00000006, +0x000000a6,0x3d27962a,0x0004002b,0x00000006, +0x000000a7,0x3cd37eea,0x0007002c,0x0000000c, +0x000000a8,0x000000a4,0x000000a5,0x000000a6, +0x000000a7,0x0004002b,0x00000006,0x000000a9, +0x3e1191ca,0x0004002b,0x00000006,0x000000aa, +0x3dfcd5a0,0x0004002b,0x00000006,0x000000ab, +0xbe304c59,0x0004002b,0x00000006,0x000000ac, +0x3e18cd8d,0x0007002c,0x0000000c,0x000000ad, +0x000000a9,0x000000aa,0x000000ab,0x000000ac, +0x0004002b,0x00000006,0x000000ae,0x3de16f14, +0x0004002b,0x00000006,0x000000af,0x3d4d6e39, +0x0004002b,0x00000006,0x000000b0,0x3de15f27, +0x0004002b,0x00000006,0x000000b1,0xbdde6dd5, +0x0007002c,0x0000000c,0x000000b2,0x000000ae, +0x000000af,0x000000b0,0x000000b1,0x0004002b, +0x00000006,0x000000b3,0xbd793da2,0x0004002b, +0x00000006,0x000000b4,0x3c0fe151,0x0004002b, +0x00000006,0x000000b5,0x3d92527f,0x0004002b, +0x00000006,0x000000b6,0xbe039aae,0x0007002c, +0x0000000c,0x000000b7,0x000000b3,0x000000b4, +0x000000b5,0x000000b6,0x0007002c,0x00000035, +0x000000b8,0x000000a8,0x000000ad,0x000000b2, +0x000000b7,0x0004002b,0x00000006,0x000000c0, +0xbae12727,0x0004002b,0x00000006,0x000000c1, +0xbe15da06,0x0004002b,0x00000006,0x000000c2, +0xbdde4d0a,0x0004002b,0x00000006,0x000000c3, +0x3e28fae5,0x0007002c,0x0000000c,0x000000c4, +0x000000c0,0x000000c1,0x000000c2,0x000000c3, +0x0004002b,0x00000006,0x000000c5,0x3da6ac16, +0x0004002b,0x00000006,0x000000c6,0x3de1b3c7, +0x0004002b,0x00000006,0x000000c7,0xbd6cebee, +0x0004002b,0x00000006,0x000000c8,0xbcbe15aa, +0x0007002c,0x0000000c,0x000000c9,0x000000c5, +0x000000c6,0x000000c7,0x000000c8,0x0004002b, +0x00000006,0x000000ca,0xbdfdede2,0x0004002b, +0x00000006,0x000000cb,0x3c7eb6d1,0x0004002b, +0x00000006,0x000000cc,0x3ddd00ae,0x0004002b, +0x00000006,0x000000cd,0xbd2c600d,0x0007002c, +0x0000000c,0x000000ce,0x000000ca,0x000000cb, +0x000000cc,0x000000cd,0x0004002b,0x00000006, +0x000000cf,0xbd9ee43e,0x0004002b,0x00000006, +0x000000d0,0x3c740673,0x0004002b,0x00000006, +0x000000d1,0xbd4dbde8,0x0004002b,0x00000006, +0x000000d2,0xbd8617fa,0x0007002c,0x0000000c, +0x000000d3,0x000000cf,0x000000d0,0x000000d1, +0x000000d2,0x0007002c,0x00000035,0x000000d4, +0x000000c4,0x000000c9,0x000000ce,0x000000d3, +0x0004002b,0x00000006,0x000000da,0x3dbc0a29, +0x0004002b,0x00000006,0x000000db,0x3d34827e, +0x0004002b,0x00000006,0x000000dc,0xbd534032, +0x0004002b,0x00000006,0x000000dd,0x3d2af8bf, +0x0007002c,0x0000000c,0x000000de,0x000000da, +0x000000db,0x000000dc,0x000000dd,0x0004002b, +0x00000006,0x000000df,0x3d10ad68,0x0004002b, +0x00000006,0x000000e0,0x3e1d481e,0x0004002b, +0x00000006,0x000000e1,0x3d341c5f,0x0004002b, +0x00000006,0x000000e2,0xbe03fa4e,0x0007002c, +0x0000000c,0x000000e3,0x000000df,0x000000e0, +0x000000e1,0x000000e2,0x0004002b,0x00000006, +0x000000e4,0x3ddc7bad,0x0004002b,0x00000006, +0x000000e5,0xbe05cf69,0x0004002b,0x00000006, +0x000000e6,0x3d92a08c,0x0004002b,0x00000006, +0x000000e7,0xbd8ba79a,0x0007002c,0x0000000c, +0x000000e8,0x000000e4,0x000000e5,0x000000e6, +0x000000e7,0x0004002b,0x00000006,0x000000e9, +0xbec27f36,0x0004002b,0x00000006,0x000000ea, +0x3dd1b359,0x0004002b,0x00000006,0x000000eb, +0xbdc6cb1b,0x0004002b,0x00000006,0x000000ec, +0x3bfcddc5,0x0007002c,0x0000000c,0x000000ed, +0x000000e9,0x000000ea,0x000000eb,0x000000ec, +0x0007002c,0x00000035,0x000000ee,0x000000de, +0x000000e3,0x000000e8,0x000000ed,0x0004002b, +0x00000006,0x000000f5,0x3d81f545,0x0004002b, +0x00000006,0x000000f6,0xbd6167c6,0x0004002b, +0x00000006,0x000000f7,0x3e54604e,0x0004002b, +0x00000006,0x000000f8,0x3d551741,0x0007002c, +0x0000000c,0x000000f9,0x000000f5,0x000000f6, +0x000000f7,0x000000f8,0x0004002b,0x00000006, +0x000000fa,0x3dee0958,0x0004002b,0x00000006, +0x000000fb,0xbe6330fc,0x0004002b,0x00000006, +0x000000fc,0x3ea3d2e2,0x0004002b,0x00000006, +0x000000fd,0x3d785182,0x0007002c,0x0000000c, +0x000000fe,0x000000fa,0x000000fb,0x000000fc, +0x000000fd,0x0004002b,0x00000006,0x000000ff, +0xbbbfbb4e,0x0004002b,0x00000006,0x00000100, +0xbd889c63,0x0004002b,0x00000006,0x00000101, +0xbd384951,0x0004002b,0x00000006,0x00000102, +0x3d90f483,0x0007002c,0x0000000c,0x00000103, +0x000000ff,0x00000100,0x00000101,0x00000102, +0x0004002b,0x00000006,0x00000104,0xbeaa2807, +0x0004002b,0x00000006,0x00000105,0xbd9c7201, +0x0004002b,0x00000006,0x00000106,0xbdcc5c42, +0x0004002b,0x00000006,0x00000107,0xbdf1de7f, +0x0007002c,0x0000000c,0x00000108,0x00000104, +0x00000105,0x00000106,0x00000107,0x0007002c, +0x00000035,0x00000109,0x000000f9,0x000000fe, +0x00000103,0x00000108,0x0004002b,0x00000006, +0x0000010f,0xbe9ec8d2,0x0004002b,0x00000006, +0x00000110,0x3e85f090,0x0004002b,0x00000006, +0x00000111,0x3d6f791b,0x0004002b,0x00000006, +0x00000112,0x3e299fed,0x0007002c,0x0000000c, +0x00000113,0x0000010f,0x00000110,0x00000111, +0x00000112,0x0004002b,0x00000006,0x00000114, +0xbbe2df90,0x0004002b,0x00000006,0x00000115, +0x3e83c1b2,0x0004002b,0x00000006,0x00000116, +0xbe37a211,0x0004002b,0x00000006,0x00000117, +0xbe8b3348,0x0007002c,0x0000000c,0x00000118, +0x00000114,0x00000115,0x00000116,0x00000117, +0x0004002b,0x00000006,0x00000119,0x3dc34b1f, +0x0004002b,0x00000006,0x0000011a,0x3d56ac68, +0x0004002b,0x00000006,0x0000011b,0x3df24bc1, +0x0004002b,0x00000006,0x0000011c,0x3d6eead9, +0x0007002c,0x0000000c,0x0000011d,0x00000119, +0x0000011a,0x0000011b,0x0000011c,0x0004002b, +0x00000006,0x0000011e,0x3f00f17d,0x0004002b, +0x00000006,0x0000011f,0xbf13897e,0x0004002b, +0x00000006,0x00000120,0xbe590cc7,0x0004002b, +0x00000006,0x00000121,0xbea0cbfc,0x0007002c, +0x0000000c,0x00000122,0x0000011e,0x0000011f, +0x00000120,0x00000121,0x0007002c,0x00000035, +0x00000123,0x00000113,0x00000118,0x0000011d, +0x00000122,0x0004002b,0x00000006,0x0000012a, +0xbe7fc529,0x0004002b,0x00000006,0x0000012b, +0xbc6fbef7,0x0004002b,0x00000006,0x0000012c, +0xbe8c5e61,0x0004002b,0x00000006,0x0000012d, +0x3e7be6c5,0x0007002c,0x0000000c,0x0000012e, +0x0000012a,0x0000012b,0x0000012c,0x0000012d, +0x0004002b,0x00000006,0x0000012f,0x3eb6691c, +0x0004002b,0x00000006,0x00000130,0xbf272206, +0x0004002b,0x00000006,0x00000131,0xbedb848c, +0x0004002b,0x00000006,0x00000132,0x3e528689, +0x0007002c,0x0000000c,0x00000133,0x0000012f, +0x00000130,0x00000131,0x00000132,0x0004002b, +0x00000006,0x00000134,0x3e32135a,0x0004002b, +0x00000006,0x00000135,0xbec56cf4,0x0004002b, +0x00000006,0x00000136,0xbdc4411f,0x0004002b, +0x00000006,0x00000137,0xbf34e845,0x0007002c, +0x0000000c,0x00000138,0x00000134,0x00000135, +0x00000136,0x00000137,0x0004002b,0x00000006, +0x00000139,0x3e7240ac,0x0004002b,0x00000006, +0x0000013a,0xbe9bfe16,0x0004002b,0x00000006, +0x0000013b,0xbe84a08c,0x0004002b,0x00000006, +0x0000013c,0xbd4b75a5,0x0007002c,0x0000000c, +0x0000013d,0x00000139,0x0000013a,0x0000013b, +0x0000013c,0x0007002c,0x00000035,0x0000013e, +0x0000012e,0x00000133,0x00000138,0x0000013d, +0x0004002b,0x00000006,0x00000144,0xbdacf5c4, +0x0004002b,0x00000006,0x00000145,0xbd03bb75, +0x0004002b,0x00000006,0x00000146,0xbdc2efdd, +0x0004002b,0x00000006,0x00000147,0x3d6c8d28, +0x0007002c,0x0000000c,0x00000148,0x00000144, +0x00000145,0x00000146,0x00000147,0x0004002b, +0x00000006,0x00000149,0xbe24746b,0x0004002b, +0x00000006,0x0000014a,0x3e8e22b9,0x0004002b, +0x00000006,0x0000014b,0xbe0ac098,0x0004002b, +0x00000006,0x0000014c,0xbdb43cb5,0x0007002c, +0x0000000c,0x0000014d,0x00000149,0x0000014a, +0x0000014b,0x0000014c,0x0004002b,0x00000006, +0x0000014e,0xbe02d4aa,0x0004002b,0x00000006, +0x0000014f,0xbd52c449,0x0004002b,0x00000006, +0x00000150,0x3e1bec38,0x0004002b,0x00000006, +0x00000151,0xbdd52db2,0x0007002c,0x0000000c, +0x00000152,0x0000014e,0x0000014f,0x00000150, +0x00000151,0x0004002b,0x00000006,0x00000153, +0xbe8db7ff,0x0004002b,0x00000006,0x00000154, +0xbe14b469,0x0004002b,0x00000006,0x00000155, +0x3c1202ed,0x0004002b,0x00000006,0x00000156, +0x3cbe0d20,0x0007002c,0x0000000c,0x00000157, +0x00000153,0x00000154,0x00000155,0x00000156, +0x0007002c,0x00000035,0x00000158,0x00000148, +0x0000014d,0x00000152,0x00000157,0x0004002b, +0x00000006,0x0000015f,0x3e85498b,0x0004002b, +0x00000006,0x00000160,0x3c892fe2,0x0004002b, +0x00000006,0x00000161,0xbe535c71,0x0004002b, +0x00000006,0x00000162,0x3e367bbf,0x0007002c, +0x0000000c,0x00000163,0x0000015f,0x00000160, +0x00000161,0x00000162,0x0004002b,0x00000006, +0x00000164,0x3efa60fe,0x0004002b,0x00000006, +0x00000165,0x3d65111f,0x0004002b,0x00000006, +0x00000166,0x3dfa17fc,0x0004002b,0x00000006, +0x00000167,0xbca5f5ba,0x0007002c,0x0000000c, +0x00000168,0x00000164,0x00000165,0x00000166, +0x00000167,0x0004002b,0x00000006,0x00000169, +0xbecfb27b,0x0004002b,0x00000006,0x0000016a, +0xbe3c5db3,0x0004002b,0x00000006,0x0000016b, +0x3e8e2191,0x0004002b,0x00000006,0x0000016c, +0x3b1f16ef,0x0007002c,0x0000000c,0x0000016d, +0x00000169,0x0000016a,0x0000016b,0x0000016c, +0x0004002b,0x00000006,0x0000016e,0xbe865fdc, +0x0004002b,0x00000006,0x0000016f,0xbd7db6c5, +0x0004002b,0x00000006,0x00000170,0x3c7b757e, +0x0004002b,0x00000006,0x00000171,0x3c4a3944, +0x0007002c,0x0000000c,0x00000172,0x0000016e, +0x0000016f,0x00000170,0x00000171,0x0007002c, +0x00000035,0x00000173,0x00000163,0x00000168, +0x0000016d,0x00000172,0x0004002b,0x00000006, +0x00000179,0x3da73f3a,0x0004002b,0x00000006, +0x0000017a,0xbc5d1891,0x0004002b,0x00000006, +0x0000017b,0x3d739dc9,0x0004002b,0x00000006, +0x0000017c,0xbd61cb2a,0x0007002c,0x0000000c, +0x0000017d,0x00000179,0x0000017a,0x0000017b, +0x0000017c,0x0004002b,0x00000006,0x0000017e, +0x3c5c40d3,0x0004002b,0x00000006,0x0000017f, +0xbd8591d8,0x0004002b,0x00000006,0x00000180, +0xbd66dd78,0x0004002b,0x00000006,0x00000181, +0xbbda0366,0x0007002c,0x0000000c,0x00000182, +0x0000017e,0x0000017f,0x00000180,0x00000181, +0x0004002b,0x00000006,0x00000183,0xb9d7b895, +0x0004002b,0x00000006,0x00000184,0x3c2d25b1, +0x0004002b,0x00000006,0x00000185,0x3e07a01e, +0x0004002b,0x00000006,0x00000186,0x3d3f629b, +0x0007002c,0x0000000c,0x00000187,0x00000183, +0x00000184,0x00000185,0x00000186,0x0004002b, +0x00000006,0x00000188,0x3cf6d5e9,0x0004002b, +0x00000006,0x00000189,0xbddbd4eb,0x0004002b, +0x00000006,0x0000018a,0xbd14dd28,0x0004002b, +0x00000006,0x0000018b,0xbd42368c,0x0007002c, +0x0000000c,0x0000018c,0x00000188,0x00000189, +0x0000018a,0x0000018b,0x0007002c,0x00000035, +0x0000018d,0x0000017d,0x00000182,0x00000187, +0x0000018c,0x0004002b,0x00000006,0x00000194, +0x3ca319b5,0x0004002b,0x00000006,0x00000195, +0x3db89714,0x0004002b,0x00000006,0x00000196, +0x3d37e6c9,0x0004002b,0x00000006,0x00000197, +0x3d4f078c,0x0007002c,0x0000000c,0x00000198, +0x00000194,0x00000195,0x00000196,0x00000197, +0x0004002b,0x00000006,0x00000199,0x3d33c3bd, +0x0004002b,0x00000006,0x0000019a,0xbd4aa9de, +0x0004002b,0x00000006,0x0000019b,0x3d947712, +0x0004002b,0x00000006,0x0000019c,0xbbe796e9, +0x0007002c,0x0000000c,0x0000019d,0x00000199, +0x0000019a,0x0000019b,0x0000019c,0x0004002b, +0x00000006,0x0000019e,0xba9eecca,0x0004002b, +0x00000006,0x0000019f,0x3cf1e4af,0x0004002b, +0x00000006,0x000001a0,0x3d9068dc,0x0004002b, +0x00000006,0x000001a1,0x3d637708,0x0007002c, +0x0000000c,0x000001a2,0x0000019e,0x0000019f, +0x000001a0,0x000001a1,0x0004002b,0x00000006, +0x000001a3,0xbd253ae0,0x0004002b,0x00000006, +0x000001a4,0xbe022b03,0x0004002b,0x00000006, +0x000001a5,0x3aeace22,0x0004002b,0x00000006, +0x000001a6,0x3e15bb1e,0x0007002c,0x0000000c, +0x000001a7,0x000001a3,0x000001a4,0x000001a5, +0x000001a6,0x0007002c,0x00000035,0x000001a8, +0x00000198,0x0000019d,0x000001a2,0x000001a7, +0x0004002b,0x00000006,0x000001ae,0xbe90c1fc, +0x0004002b,0x00000006,0x000001af,0x3e522a6d, +0x0004002b,0x00000006,0x000001b0,0x3b8c064d, +0x0004002b,0x00000006,0x000001b1,0xbecb36cd, +0x0007002c,0x0000000c,0x000001b2,0x000001ae, +0x000001af,0x000001b0,0x000001b1,0x0004002b, +0x00000006,0x000001b3,0xbda02daa,0x0004002b, +0x00000006,0x000001b4,0x3e48b8dd,0x0004002b, +0x00000006,0x000001b5,0xbd8a4f4e,0x0004002b, +0x00000006,0x000001b6,0x3b3740fc,0x0007002c, +0x0000000c,0x000001b7,0x000001b3,0x000001b4, +0x000001b5,0x000001b6,0x0004002b,0x00000006, +0x000001b8,0x3d53680d,0x0004002b,0x00000006, +0x000001b9,0xbd107145,0x0004002b,0x00000006, +0x000001ba,0x3d5fc67c,0x0004002b,0x00000006, +0x000001bb,0x3bd61bb7,0x0007002c,0x0000000c, +0x000001bc,0x000001b8,0x000001b9,0x000001ba, +0x000001bb,0x0004002b,0x00000006,0x000001bd, +0xbdd99326,0x0004002b,0x00000006,0x000001be, +0x3e0bb7bb,0x0004002b,0x00000006,0x000001bf, +0xbd5bef0f,0x0004002b,0x00000006,0x000001c0, +0x3e56d8e2,0x0007002c,0x0000000c,0x000001c1, +0x000001bd,0x000001be,0x000001bf,0x000001c0, +0x0007002c,0x00000035,0x000001c2,0x000001b2, +0x000001b7,0x000001bc,0x000001c1,0x0004002b, +0x00000006,0x000001c9,0x3b965377,0x0004002b, +0x00000006,0x000001ca,0x3e5d7bd7,0x0004002b, +0x00000006,0x000001cb,0xbe5d09c9,0x0004002b, +0x00000006,0x000001cc,0xbb9b1573,0x0007002c, +0x0000000c,0x000001cd,0x000001c9,0x000001ca, +0x000001cb,0x000001cc,0x0004002b,0x00000006, +0x000001ce,0x3e0029b3,0x0004002b,0x00000006, +0x000001cf,0x3e0309fd,0x0004002b,0x00000006, +0x000001d0,0xbdf38001,0x0004002b,0x00000006, +0x000001d1,0x3d068d22,0x0007002c,0x0000000c, +0x000001d2,0x000001ce,0x000001cf,0x000001d0, +0x000001d1,0x0004002b,0x00000006,0x000001d3, +0x3bf9295c,0x0004002b,0x00000006,0x000001d4, +0xbd66027f,0x0004002b,0x00000006,0x000001d5, +0x3d097714,0x0004002b,0x00000006,0x000001d6, +0x3eddd09a,0x0007002c,0x0000000c,0x000001d7, +0x000001d3,0x000001d4,0x000001d5,0x000001d6, +0x0004002b,0x00000006,0x000001d8,0x3b0ec82f, +0x0004002b,0x00000006,0x000001d9,0x3dacf542, +0x0004002b,0x00000006,0x000001da,0xbe5746c7, +0x0004002b,0x00000006,0x000001db,0xbc9affcc, +0x0007002c,0x0000000c,0x000001dc,0x000001d8, +0x000001d9,0x000001da,0x000001db,0x0007002c, +0x00000035,0x000001dd,0x000001cd,0x000001d2, +0x000001d7,0x000001dc,0x0004002b,0x00000006, +0x000001e3,0x3dbf18fd,0x0004002b,0x00000006, +0x000001e4,0x3e1e8a4a,0x0004002b,0x00000006, +0x000001e5,0xbd753a6a,0x0004002b,0x00000006, +0x000001e6,0x3d125142,0x0007002c,0x0000000c, +0x000001e7,0x000001e3,0x000001e4,0x000001e5, +0x000001e6,0x0004002b,0x00000006,0x000001e8, +0xbde9d35c,0x0004002b,0x00000006,0x000001e9, +0x3d5bb6ed,0x0004002b,0x00000006,0x000001ea, +0xbc82619c,0x0004002b,0x00000006,0x000001eb, +0xbd367aea,0x0007002c,0x0000000c,0x000001ec, +0x000001e8,0x000001e9,0x000001ea,0x000001eb, +0x0004002b,0x00000006,0x000001ed,0x3e40d7cc, +0x0004002b,0x00000006,0x000001ee,0xbe1e6aaf, +0x0004002b,0x00000006,0x000001ef,0x3d595785, +0x0004002b,0x00000006,0x000001f0,0x3bc28cb0, +0x0007002c,0x0000000c,0x000001f1,0x000001ed, +0x000001ee,0x000001ef,0x000001f0,0x0004002b, +0x00000006,0x000001f2,0x3d76cbc1,0x0004002b, +0x00000006,0x000001f3,0xbd3269a8,0x0004002b, +0x00000006,0x000001f4,0x3c08a077,0x0004002b, +0x00000006,0x000001f5,0x3c9d3acb,0x0007002c, +0x0000000c,0x000001f6,0x000001f2,0x000001f3, +0x000001f4,0x000001f5,0x0007002c,0x00000035, +0x000001f7,0x000001e7,0x000001ec,0x000001f1, +0x000001f6,0x0004002b,0x00000006,0x000001fe, +0xbd0fc962,0x0004002b,0x00000006,0x000001ff, +0x3e590983,0x0004002b,0x00000006,0x00000200, +0xbdac6d3d,0x0004002b,0x00000006,0x00000201, +0x3c02316a,0x0007002c,0x0000000c,0x00000202, +0x000001fe,0x000001ff,0x00000200,0x00000201, +0x0004002b,0x00000006,0x00000203,0x3d8bfc27, +0x0004002b,0x00000006,0x00000204,0xbe29ad85, +0x0004002b,0x00000006,0x00000205,0x3d7a49c9, +0x0004002b,0x00000006,0x00000206,0xbbd0a039, +0x0007002c,0x0000000c,0x00000207,0x00000203, +0x00000204,0x00000205,0x00000206,0x0004002b, +0x00000006,0x00000208,0x3d072da0,0x0004002b, +0x00000006,0x00000209,0xbe396d85,0x0004002b, +0x00000006,0x0000020a,0x3db2b404,0x0004002b, +0x00000006,0x0000020b,0x3e1821f0,0x0007002c, +0x0000000c,0x0000020c,0x00000208,0x00000209, +0x0000020a,0x0000020b,0x0004002b,0x00000006, +0x0000020d,0xbe05b6f2,0x0004002b,0x00000006, +0x0000020e,0x3b87ab5a,0x0004002b,0x00000006, +0x0000020f,0x3cb6eb2a,0x0004002b,0x00000006, +0x00000210,0xbc67d39e,0x0007002c,0x0000000c, +0x00000211,0x0000020d,0x0000020e,0x0000020f, +0x00000210,0x0007002c,0x00000035,0x00000212, +0x00000202,0x00000207,0x0000020c,0x00000211, +0x0007002c,0x0000000c,0x00000219,0x00000083, +0x00000083,0x00000083,0x00000083,0x0004002b, +0x00000006,0x0000021b,0x3f13b4b5,0x0004002b, +0x00000006,0x0000021c,0x3e2fb99c,0x0004002b, +0x00000006,0x0000021d,0xbda82572,0x0004002b, +0x00000006,0x0000021e,0x3e563c4d,0x0007002c, +0x0000000c,0x0000021f,0x0000021b,0x0000021c, +0x0000021d,0x0000021e,0x00040015,0x00000227, +0x00000020,0x00000000,0x00040017,0x00000228, +0x00000227,0x00000003,0x00040020,0x00000229, +0x00000001,0x00000228,0x0004003b,0x00000229, +0x0000022a,0x00000001,0x00040017,0x0000022b, +0x00000227,0x00000002,0x00020014,0x0000022f, +0x0004002b,0x00000227,0x00000230,0x00000000, +0x00040020,0x00000234,0x00000009,0x00000016, +0x0004002b,0x00000227,0x0000023b,0x00000001, +0x00090019,0x00000245,0x00000006,0x00000001, +0x00000000,0x00000000,0x00000000,0x00000002, +0x00000002,0x00040020,0x00000246,0x00000000, +0x00000245,0x0004003b,0x00000246,0x00000247, +0x00000000,0x0004002b,0x00000227,0x0000024b, +0x00000010,0x0006002c,0x00000228,0x0000024c, +0x0000024b,0x0000024b,0x0000023b,0x0004002b, +0x00000016,0x000003b8,0xffffffff,0x0005002c, +0x00000017,0x000003b9,0x000003b8,0x000003b8, +0x0005002c,0x00000017,0x000003ba,0x00000026, +0x00000026,0x0005002c,0x00000017,0x000003bb, +0x000003b8,0x0000001e,0x0005002c,0x00000017, +0x000003bc,0x000003b8,0x00000026,0x0005002c, +0x00000017,0x000003bd,0x0000001e,0x000003b8, +0x0005002c,0x00000017,0x000003be,0x0000001e, +0x00000026,0x0005002c,0x00000017,0x000003bf, +0x00000026,0x000003b8,0x0005002c,0x00000017, +0x000003c0,0x00000026,0x0000001e,0x00050036, +0x00000002,0x00000004,0x00000000,0x00000003, +0x000200f8,0x00000005,0x000300f7,0x0000024e, +0x00000000,0x000300fb,0x00000230,0x0000024f, +0x000200f8,0x0000024f,0x0004003d,0x00000228, +0x0000022c,0x0000022a,0x0007004f,0x0000022b, +0x0000022d,0x0000022c,0x0000022c,0x00000000, +0x00000001,0x0004007c,0x00000017,0x0000022e, +0x0000022d,0x00050051,0x00000016,0x00000233, +0x0000022e,0x00000000,0x00060041,0x00000234, +0x00000235,0x00000022,0x0000001e,0x00000230, +0x0004003d,0x00000016,0x00000236,0x00000235, +0x000500af,0x0000022f,0x00000237,0x00000233, +0x00000236,0x000400a8,0x0000022f,0x00000238, +0x00000237,0x000300f7,0x0000023a,0x00000000, +0x000400fa,0x00000238,0x00000239,0x0000023a, +0x000200f8,0x00000239,0x00050051,0x00000016, +0x0000023d,0x0000022e,0x00000001,0x00060041, +0x00000234,0x0000023e,0x00000022,0x0000001e, +0x0000023b,0x0004003d,0x00000016,0x0000023f, +0x0000023e,0x000500af,0x0000022f,0x00000240, +0x0000023d,0x0000023f,0x000200f9,0x0000023a, +0x000200f8,0x0000023a,0x000700f5,0x0000022f, +0x00000241,0x00000237,0x0000024f,0x00000240, +0x00000239,0x000300f7,0x00000243,0x00000000, +0x000400fa,0x00000241,0x00000242,0x00000243, +0x000200f8,0x00000242,0x000200f9,0x0000024e, +0x000200f8,0x00000243,0x0004003d,0x00000245, +0x00000248,0x00000247,0x0004003d,0x00000008, +0x000002ba,0x0000004b,0x00050080,0x00000017, +0x000002be,0x0000022e,0x000003b9,0x00050041, +0x00000023,0x000002bf,0x00000022,0x0000001e, +0x0004003d,0x00000017,0x000002c0,0x000002bf, +0x00050082,0x00000017,0x000002c2,0x000002c0, +0x000003ba,0x0008000c,0x00000017,0x000002c3, +0x00000001,0x0000002d,0x000002be,0x0000001f, +0x000002c2,0x00040064,0x00000007,0x000002c4, +0x000002ba,0x0007005f,0x0000000c,0x000002c5, +0x000002c4,0x000002c3,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x0000026a,0x0000004a, +0x000002c5,0x00050081,0x0000000c,0x0000026c, +0x00000034,0x0000026a,0x0004003d,0x00000008, +0x000002c8,0x00000068,0x00040064,0x00000007, +0x000002d2,0x000002c8,0x0007005f,0x0000000c, +0x000002d3,0x000002d2,0x000002c3,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x0000026e, +0x00000067,0x000002d3,0x00050081,0x0000000c, +0x00000270,0x0000026c,0x0000026e,0x0004003d, +0x00000008,0x000002d6,0x0000004b,0x00050080, +0x00000017,0x000002da,0x0000022e,0x000003bb, +0x0008000c,0x00000017,0x000002df,0x00000001, +0x0000002d,0x000002da,0x0000001f,0x000002c2, +0x00040064,0x00000007,0x000002e0,0x000002d6, +0x0007005f,0x0000000c,0x000002e1,0x000002e0, +0x000002df,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x00000272,0x00000082,0x000002e1, +0x00050081,0x0000000c,0x00000274,0x00000270, +0x00000272,0x0004003d,0x00000008,0x000002e4, +0x00000068,0x00040064,0x00000007,0x000002ee, +0x000002e4,0x0007005f,0x0000000c,0x000002ef, +0x000002ee,0x000002df,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x00000276,0x0000009e, +0x000002ef,0x00050081,0x0000000c,0x00000278, +0x00000274,0x00000276,0x0004003d,0x00000008, +0x000002f2,0x0000004b,0x00050080,0x00000017, +0x000002f6,0x0000022e,0x000003bc,0x0008000c, +0x00000017,0x000002fb,0x00000001,0x0000002d, +0x000002f6,0x0000001f,0x000002c2,0x00040064, +0x00000007,0x000002fc,0x000002f2,0x0007005f, +0x0000000c,0x000002fd,0x000002fc,0x000002fb, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x0000027a,0x000000b8,0x000002fd,0x00050081, +0x0000000c,0x0000027c,0x00000278,0x0000027a, +0x0004003d,0x00000008,0x00000300,0x00000068, +0x00040064,0x00000007,0x0000030a,0x00000300, +0x0007005f,0x0000000c,0x0000030b,0x0000030a, +0x000002fb,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x0000027e,0x000000d4,0x0000030b, +0x00050081,0x0000000c,0x00000280,0x0000027c, +0x0000027e,0x0004003d,0x00000008,0x0000030e, +0x0000004b,0x00050080,0x00000017,0x00000312, +0x0000022e,0x000003bd,0x0008000c,0x00000017, +0x00000317,0x00000001,0x0000002d,0x00000312, +0x0000001f,0x000002c2,0x00040064,0x00000007, +0x00000318,0x0000030e,0x0007005f,0x0000000c, +0x00000319,0x00000318,0x00000317,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x00000282, +0x000000ee,0x00000319,0x00050081,0x0000000c, +0x00000284,0x00000280,0x00000282,0x0004003d, +0x00000008,0x0000031c,0x00000068,0x00040064, +0x00000007,0x00000326,0x0000031c,0x0007005f, +0x0000000c,0x00000327,0x00000326,0x00000317, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x00000286,0x00000109,0x00000327,0x00050081, +0x0000000c,0x00000288,0x00000284,0x00000286, +0x0004003d,0x00000008,0x0000032a,0x0000004b, +0x0008000c,0x00000017,0x00000333,0x00000001, +0x0000002d,0x0000022e,0x0000001f,0x000002c2, +0x00040064,0x00000007,0x00000334,0x0000032a, +0x0007005f,0x0000000c,0x00000335,0x00000334, +0x00000333,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x0000028a,0x00000123,0x00000335, +0x00050081,0x0000000c,0x0000028c,0x00000288, +0x0000028a,0x0004003d,0x00000008,0x00000338, +0x00000068,0x00040064,0x00000007,0x00000342, +0x00000338,0x0007005f,0x0000000c,0x00000343, +0x00000342,0x00000333,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x0000028e,0x0000013e, +0x00000343,0x00050081,0x0000000c,0x00000290, +0x0000028c,0x0000028e,0x0004003d,0x00000008, +0x00000346,0x0000004b,0x00050080,0x00000017, +0x0000034a,0x0000022e,0x000003be,0x0008000c, +0x00000017,0x0000034f,0x00000001,0x0000002d, +0x0000034a,0x0000001f,0x000002c2,0x00040064, +0x00000007,0x00000350,0x00000346,0x0007005f, +0x0000000c,0x00000351,0x00000350,0x0000034f, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x00000292,0x00000158,0x00000351,0x00050081, +0x0000000c,0x00000294,0x00000290,0x00000292, +0x0004003d,0x00000008,0x00000354,0x00000068, +0x00040064,0x00000007,0x0000035e,0x00000354, +0x0007005f,0x0000000c,0x0000035f,0x0000035e, +0x0000034f,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x00000296,0x00000173,0x0000035f, +0x00050081,0x0000000c,0x00000298,0x00000294, +0x00000296,0x0004003d,0x00000008,0x00000362, +0x0000004b,0x00050080,0x00000017,0x00000366, +0x0000022e,0x000003bf,0x0008000c,0x00000017, +0x0000036b,0x00000001,0x0000002d,0x00000366, +0x0000001f,0x000002c2,0x00040064,0x00000007, +0x0000036c,0x00000362,0x0007005f,0x0000000c, +0x0000036d,0x0000036c,0x0000036b,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x0000029a, +0x0000018d,0x0000036d,0x00050081,0x0000000c, +0x0000029c,0x00000298,0x0000029a,0x0004003d, +0x00000008,0x00000370,0x00000068,0x00040064, +0x00000007,0x0000037a,0x00000370,0x0007005f, +0x0000000c,0x0000037b,0x0000037a,0x0000036b, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x0000029e,0x000001a8,0x0000037b,0x00050081, +0x0000000c,0x000002a0,0x0000029c,0x0000029e, +0x0004003d,0x00000008,0x0000037e,0x0000004b, +0x00050080,0x00000017,0x00000382,0x0000022e, +0x000003c0,0x0008000c,0x00000017,0x00000387, +0x00000001,0x0000002d,0x00000382,0x0000001f, +0x000002c2,0x00040064,0x00000007,0x00000388, +0x0000037e,0x0007005f,0x0000000c,0x00000389, +0x00000388,0x00000387,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x000002a2,0x000001c2, +0x00000389,0x00050081,0x0000000c,0x000002a4, +0x000002a0,0x000002a2,0x0004003d,0x00000008, +0x0000038c,0x00000068,0x00040064,0x00000007, +0x00000396,0x0000038c,0x0007005f,0x0000000c, +0x00000397,0x00000396,0x00000387,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x000002a6, +0x000001dd,0x00000397,0x00050081,0x0000000c, +0x000002a8,0x000002a4,0x000002a6,0x0004003d, +0x00000008,0x0000039a,0x0000004b,0x00050080, +0x00000017,0x0000039e,0x0000022e,0x000003ba, +0x0008000c,0x00000017,0x000003a3,0x00000001, +0x0000002d,0x0000039e,0x0000001f,0x000002c2, +0x00040064,0x00000007,0x000003a4,0x0000039a, +0x0007005f,0x0000000c,0x000003a5,0x000003a4, +0x000003a3,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x000002aa,0x000001f7,0x000003a5, +0x00050081,0x0000000c,0x000002ac,0x000002a8, +0x000002aa,0x0004003d,0x00000008,0x000003a8, +0x00000068,0x00040064,0x00000007,0x000003b2, +0x000003a8,0x0007005f,0x0000000c,0x000003b3, +0x000003b2,0x000003a3,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x000002ae,0x00000212, +0x000003b3,0x00050081,0x0000000c,0x000002b0, +0x000002ac,0x000002ae,0x0007000c,0x0000000c, +0x000002b2,0x00000001,0x00000028,0x000002b0, +0x00000219,0x0007000c,0x0000000c,0x000002b4, +0x00000001,0x00000025,0x000002b0,0x00000219, +0x00050085,0x0000000c,0x000002b5,0x0000021f, +0x000002b4,0x00050081,0x0000000c,0x000002b6, +0x000002b2,0x000002b5,0x00040063,0x00000248, +0x0000022e,0x000002b6,0x000200f9,0x0000024e, +0x000200f8,0x0000024e,0x000100fd,0x00010038} diff --git a/app/src/shaders/fsrcnnx/pass_11.comp b/app/src/shaders/fsrcnnx/pass_11.comp new file mode 100644 index 0000000..8b9be12 --- /dev/null +++ b/app/src/shaders/fsrcnnx/pass_11.comp @@ -0,0 +1,32 @@ +#version 450 +// Generated by tools/gen_fsrcnnx.js from third_party/FSRCNNX_x2_8-0-4-1.glsl +// (FSRCNNX by igv, LGPL-3.0). Layer: sub-band residuals 1. Do not edit. +layout(local_size_x = 16, local_size_y = 16) in; +layout(binding = 0, rgba16f) uniform writeonly image2D dst; +layout(binding = 1) uniform sampler2D in0; +layout(binding = 2) uniform sampler2D in1; +layout(binding = 3) uniform sampler2D in2; +layout(push_constant) uniform Params { ivec2 size; } p; + +ivec2 at_; +vec4 fetch_(sampler2D s, vec2 o) { return texelFetch(s, clamp(at_ + ivec2(o), ivec2(0), p.size - 1), 0); } +#define MODEL1_texOff(o) fetch_(in0, vec2(o)) +#define MODEL2_texOff(o) fetch_(in1, vec2(o)) +#define FEATURE1_texOff(o) fetch_(in2, vec2(o)) + +vec4 hook() +{ +vec4 res = vec4(0.0245648548007011,-0.4467784762382507,0.0197526942938566,-0.0110000418499112); +res += mat4(0.0302665308117867,-0.9262221455574036,-0.1161134764552116,-0.0506900474429131,0.2716045379638672,-0.0485871583223343,0.0044713355600834,-0.4274623394012451,0.0749531090259552,-0.3700785338878632,0.0350039415061474,-0.0540786534547806,-0.0607390031218529,-0.8019900321960449,0.0923245251178741,0.1258827745914459) * MODEL1_texOff(0); +res += mat4(-0.0649135261774063,0.0815236791968346,0.0067334296181798,0.1277425885200500,-0.0051357815973461,-0.1485908329486847,0.0074226572178304,0.0050623500719666,0.0588018335402012,-0.0692552924156189,0.1288725286722183,-0.0989386290311813,0.0427936837077141,0.0967708528041840,-0.0455632135272026,-0.0711275041103363) * MODEL2_texOff(0); +res += FEATURE1_texOff(0); +res = max(res, vec4(0.0)) + vec4(0.9927186965942383,0.0570580027997494,1.3226752281188965,1.0069466829299927) * min(res, vec4(0.0)); +return res; +} + +void main() +{ + at_ = ivec2(gl_GlobalInvocationID.xy); + if (at_.x >= p.size.x || at_.y >= p.size.y) return; + imageStore(dst, at_, hook()); +} diff --git a/app/src/shaders/fsrcnnx/pass_11.spv.inc b/app/src/shaders/fsrcnnx/pass_11.spv.inc new file mode 100644 index 0000000..0dadc34 --- /dev/null +++ b/app/src/shaders/fsrcnnx/pass_11.spv.inc @@ -0,0 +1,180 @@ +{0x07230203,0x00010000,0x000d000b,0x000000f5, +0x00000000,0x00020011,0x00000001,0x0006000b, +0x00000001,0x4c534c47,0x6474732e,0x3035342e, +0x00000000,0x0003000e,0x00000000,0x00000001, +0x0006000f,0x00000005,0x00000004,0x6e69616d, +0x00000000,0x00000085,0x00060010,0x00000004, +0x00000011,0x00000010,0x00000010,0x00000001, +0x00030047,0x00000020,0x00000002,0x00050048, +0x00000020,0x00000000,0x00000023,0x00000000, +0x00040047,0x0000004b,0x00000021,0x00000001, +0x00040047,0x0000004b,0x00000022,0x00000000, +0x00040047,0x00000068,0x00000021,0x00000002, +0x00040047,0x00000068,0x00000022,0x00000000, +0x00040047,0x0000006e,0x00000021,0x00000003, +0x00040047,0x0000006e,0x00000022,0x00000000, +0x00040047,0x00000085,0x0000000b,0x0000001c, +0x00030047,0x000000a2,0x00000019,0x00040047, +0x000000a2,0x00000021,0x00000000,0x00040047, +0x000000a2,0x00000022,0x00000000,0x00040047, +0x000000a7,0x0000000b,0x00000019,0x00020013, +0x00000002,0x00030021,0x00000003,0x00000002, +0x00030016,0x00000006,0x00000020,0x00090019, +0x00000007,0x00000006,0x00000001,0x00000000, +0x00000000,0x00000000,0x00000001,0x00000000, +0x0003001b,0x00000008,0x00000007,0x00040020, +0x00000009,0x00000000,0x00000008,0x00040017, +0x0000000c,0x00000006,0x00000004,0x00040015, +0x00000016,0x00000020,0x00000001,0x00040017, +0x00000017,0x00000016,0x00000002,0x0004002b, +0x00000016,0x0000001e,0x00000000,0x0005002c, +0x00000017,0x0000001f,0x0000001e,0x0000001e, +0x0003001e,0x00000020,0x00000017,0x00040020, +0x00000021,0x00000009,0x00000020,0x0004003b, +0x00000021,0x00000022,0x00000009,0x00040020, +0x00000023,0x00000009,0x00000017,0x0004002b, +0x00000016,0x00000026,0x00000001,0x0004002b, +0x00000006,0x00000030,0x3cc93c3c,0x0004002b, +0x00000006,0x00000031,0xbee4c026,0x0004002b, +0x00000006,0x00000032,0x3ca1d067,0x0004002b, +0x00000006,0x00000033,0xbc343985,0x0007002c, +0x0000000c,0x00000034,0x00000030,0x00000031, +0x00000032,0x00000033,0x00040018,0x00000035, +0x0000000c,0x00000004,0x0004002b,0x00000006, +0x00000036,0x3cf7f184,0x0004002b,0x00000006, +0x00000037,0xbf6d1ce5,0x0004002b,0x00000006, +0x00000038,0xbdedcce7,0x0004002b,0x00000006, +0x00000039,0xbd4fa05e,0x0007002c,0x0000000c, +0x0000003a,0x00000036,0x00000037,0x00000038, +0x00000039,0x0004002b,0x00000006,0x0000003b, +0x3e8b0fc0,0x0004002b,0x00000006,0x0000003c, +0xbd470354,0x0004002b,0x00000006,0x0000003d, +0x3b928448,0x0004002b,0x00000006,0x0000003e, +0xbedadc58,0x0007002c,0x0000000c,0x0000003f, +0x0000003b,0x0000003c,0x0000003d,0x0000003e, +0x0004002b,0x00000006,0x00000040,0x3d998104, +0x0004002b,0x00000006,0x00000041,0xbebd7aef, +0x0004002b,0x00000006,0x00000042,0x3d0f604b, +0x0004002b,0x00000006,0x00000043,0xbd5d8194, +0x0007002c,0x0000000c,0x00000044,0x00000040, +0x00000041,0x00000042,0x00000043,0x0004002b, +0x00000006,0x00000045,0xbd78c976,0x0004002b, +0x00000006,0x00000046,0xbf4d4f38,0x0004002b, +0x00000006,0x00000047,0x3dbd14a4,0x0004002b, +0x00000006,0x00000048,0x3e00e76a,0x0007002c, +0x0000000c,0x00000049,0x00000045,0x00000046, +0x00000047,0x00000048,0x0007002c,0x00000035, +0x0000004a,0x0000003a,0x0000003f,0x00000044, +0x00000049,0x0004003b,0x00000009,0x0000004b, +0x00000000,0x0004002b,0x00000006,0x0000004c, +0x00000000,0x0004002b,0x00000006,0x00000053, +0xbd84f162,0x0004002b,0x00000006,0x00000054, +0x3da6f5e3,0x0004002b,0x00000006,0x00000055, +0x3bdca41a,0x0004002b,0x00000006,0x00000056, +0x3e02cef4,0x0007002c,0x0000000c,0x00000057, +0x00000053,0x00000054,0x00000055,0x00000056, +0x0004002b,0x00000006,0x00000058,0xbba84a0f, +0x0004002b,0x00000006,0x00000059,0xbe182832, +0x0004002b,0x00000006,0x0000005a,0x3bf339c3, +0x0004002b,0x00000006,0x0000005b,0x3ba5e212, +0x0007002c,0x0000000c,0x0000005c,0x00000058, +0x00000059,0x0000005a,0x0000005b,0x0004002b, +0x00000006,0x0000005d,0x3d70da31,0x0004002b, +0x00000006,0x0000005e,0xbd8dd5b8,0x0004002b, +0x00000006,0x0000005f,0x3e03f729,0x0004002b, +0x00000006,0x00000060,0xbdcaa056,0x0007002c, +0x0000000c,0x00000061,0x0000005d,0x0000005e, +0x0000005f,0x00000060,0x0004002b,0x00000006, +0x00000062,0x3d2f486e,0x0004002b,0x00000006, +0x00000063,0x3dc62fcc,0x0004002b,0x00000006, +0x00000064,0xbd3aa07e,0x0004002b,0x00000006, +0x00000065,0xbd91ab4c,0x0007002c,0x0000000c, +0x00000066,0x00000062,0x00000063,0x00000064, +0x00000065,0x0007002c,0x00000035,0x00000067, +0x00000057,0x0000005c,0x00000061,0x00000066, +0x0004003b,0x00000009,0x00000068,0x00000000, +0x0004003b,0x00000009,0x0000006e,0x00000000, +0x0007002c,0x0000000c,0x00000074,0x0000004c, +0x0000004c,0x0000004c,0x0000004c,0x0004002b, +0x00000006,0x00000076,0x3f7e22d0,0x0004002b, +0x00000006,0x00000077,0x3d69b5a7,0x0004002b, +0x00000006,0x00000078,0x3fa94d6c,0x0004002b, +0x00000006,0x00000079,0x3f80e3a1,0x0007002c, +0x0000000c,0x0000007a,0x00000076,0x00000077, +0x00000078,0x00000079,0x00040015,0x00000082, +0x00000020,0x00000000,0x00040017,0x00000083, +0x00000082,0x00000003,0x00040020,0x00000084, +0x00000001,0x00000083,0x0004003b,0x00000084, +0x00000085,0x00000001,0x00040017,0x00000086, +0x00000082,0x00000002,0x00020014,0x0000008a, +0x0004002b,0x00000082,0x0000008b,0x00000000, +0x00040020,0x0000008f,0x00000009,0x00000016, +0x0004002b,0x00000082,0x00000096,0x00000001, +0x00090019,0x000000a0,0x00000006,0x00000001, +0x00000000,0x00000000,0x00000000,0x00000002, +0x00000002,0x00040020,0x000000a1,0x00000000, +0x000000a0,0x0004003b,0x000000a1,0x000000a2, +0x00000000,0x0004002b,0x00000082,0x000000a6, +0x00000010,0x0006002c,0x00000083,0x000000a7, +0x000000a6,0x000000a6,0x00000096,0x0005002c, +0x00000017,0x000000f4,0x00000026,0x00000026, +0x00050036,0x00000002,0x00000004,0x00000000, +0x00000003,0x000200f8,0x00000005,0x000300f7, +0x000000a8,0x00000000,0x000300fb,0x0000008b, +0x000000a9,0x000200f8,0x000000a9,0x0004003d, +0x00000083,0x00000087,0x00000085,0x0007004f, +0x00000086,0x00000088,0x00000087,0x00000087, +0x00000000,0x00000001,0x0004007c,0x00000017, +0x00000089,0x00000088,0x00050051,0x00000016, +0x0000008e,0x00000089,0x00000000,0x00060041, +0x0000008f,0x00000090,0x00000022,0x0000001e, +0x0000008b,0x0004003d,0x00000016,0x00000091, +0x00000090,0x000500af,0x0000008a,0x00000092, +0x0000008e,0x00000091,0x000400a8,0x0000008a, +0x00000093,0x00000092,0x000300f7,0x00000095, +0x00000000,0x000400fa,0x00000093,0x00000094, +0x00000095,0x000200f8,0x00000094,0x00050051, +0x00000016,0x00000098,0x00000089,0x00000001, +0x00060041,0x0000008f,0x00000099,0x00000022, +0x0000001e,0x00000096,0x0004003d,0x00000016, +0x0000009a,0x00000099,0x000500af,0x0000008a, +0x0000009b,0x00000098,0x0000009a,0x000200f9, +0x00000095,0x000200f8,0x00000095,0x000700f5, +0x0000008a,0x0000009c,0x00000092,0x000000a9, +0x0000009b,0x00000094,0x000300f7,0x0000009e, +0x00000000,0x000400fa,0x0000009c,0x0000009d, +0x0000009e,0x000200f8,0x0000009d,0x000200f9, +0x000000a8,0x000200f8,0x0000009e,0x0004003d, +0x000000a0,0x000000a3,0x000000a2,0x0004003d, +0x00000008,0x000000c8,0x0000004b,0x00050041, +0x00000023,0x000000cd,0x00000022,0x0000001e, +0x0004003d,0x00000017,0x000000ce,0x000000cd, +0x00050082,0x00000017,0x000000d0,0x000000ce, +0x000000f4,0x0008000c,0x00000017,0x000000d1, +0x00000001,0x0000002d,0x00000089,0x0000001f, +0x000000d0,0x00040064,0x00000007,0x000000d2, +0x000000c8,0x0007005f,0x0000000c,0x000000d3, +0x000000d2,0x000000d1,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x000000b5,0x0000004a, +0x000000d3,0x00050081,0x0000000c,0x000000b7, +0x00000034,0x000000b5,0x0004003d,0x00000008, +0x000000d6,0x00000068,0x00040064,0x00000007, +0x000000e0,0x000000d6,0x0007005f,0x0000000c, +0x000000e1,0x000000e0,0x000000d1,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x000000b9, +0x00000067,0x000000e1,0x00050081,0x0000000c, +0x000000bb,0x000000b7,0x000000b9,0x0004003d, +0x00000008,0x000000e4,0x0000006e,0x00040064, +0x00000007,0x000000ee,0x000000e4,0x0007005f, +0x0000000c,0x000000ef,0x000000ee,0x000000d1, +0x00000002,0x0000001e,0x00050081,0x0000000c, +0x000000be,0x000000bb,0x000000ef,0x0007000c, +0x0000000c,0x000000c0,0x00000001,0x00000028, +0x000000be,0x00000074,0x0007000c,0x0000000c, +0x000000c2,0x00000001,0x00000025,0x000000be, +0x00000074,0x00050085,0x0000000c,0x000000c3, +0x0000007a,0x000000c2,0x00050081,0x0000000c, +0x000000c4,0x000000c0,0x000000c3,0x00040063, +0x000000a3,0x00000089,0x000000c4,0x000200f9, +0x000000a8,0x000200f8,0x000000a8,0x000100fd, +0x00010038} diff --git a/app/src/shaders/fsrcnnx/pass_12.comp b/app/src/shaders/fsrcnnx/pass_12.comp new file mode 100644 index 0000000..18170d2 --- /dev/null +++ b/app/src/shaders/fsrcnnx/pass_12.comp @@ -0,0 +1,32 @@ +#version 450 +// Generated by tools/gen_fsrcnnx.js from third_party/FSRCNNX_x2_8-0-4-1.glsl +// (FSRCNNX by igv, LGPL-3.0). Layer: sub-band residuals 2. Do not edit. +layout(local_size_x = 16, local_size_y = 16) in; +layout(binding = 0, rgba16f) uniform writeonly image2D dst; +layout(binding = 1) uniform sampler2D in0; +layout(binding = 2) uniform sampler2D in1; +layout(binding = 3) uniform sampler2D in2; +layout(push_constant) uniform Params { ivec2 size; } p; + +ivec2 at_; +vec4 fetch_(sampler2D s, vec2 o) { return texelFetch(s, clamp(at_ + ivec2(o), ivec2(0), p.size - 1), 0); } +#define MODEL1_texOff(o) fetch_(in0, vec2(o)) +#define MODEL2_texOff(o) fetch_(in1, vec2(o)) +#define FEATURE2_texOff(o) fetch_(in2, vec2(o)) + +vec4 hook() +{ +vec4 res = vec4(-0.0425243787467480,-0.3715015351772308,-0.0256227850914001,-0.2774516046047211); +res += mat4(0.0238118842244148,0.0295480657368898,-0.0066418983042240,0.1021223962306976,-0.0568209178745747,-0.4355100393295288,-0.2700522541999817,-0.2060186564922333,-0.0689613372087479,-0.1689691990613937,-0.0306748505681753,-0.2461252212524414,-0.0057375836186111,-0.1892303228378296,-0.0285871494561434,-0.5032613277435303) * MODEL1_texOff(0); +res += mat4(0.5463213324546814,0.0972800329327583,0.0307560767978430,0.0678058937191963,-0.0356063023209572,-0.7013865113258362,0.1890443563461304,-0.1036657467484474,-0.1745826154947281,-0.2942218780517578,-0.0485423319041729,-0.2983124554157257,-0.0524431839585304,-0.3261034786701202,0.3217246532440186,0.1958018541336060) * MODEL2_texOff(0); +res += FEATURE2_texOff(0); +res = max(res, vec4(0.0)) + vec4(0.1391339898109436,0.0960328355431557,0.6235341429710388,0.1177272796630859) * min(res, vec4(0.0)); +return res; +} + +void main() +{ + at_ = ivec2(gl_GlobalInvocationID.xy); + if (at_.x >= p.size.x || at_.y >= p.size.y) return; + imageStore(dst, at_, hook()); +} diff --git a/app/src/shaders/fsrcnnx/pass_12.spv.inc b/app/src/shaders/fsrcnnx/pass_12.spv.inc new file mode 100644 index 0000000..66544f6 --- /dev/null +++ b/app/src/shaders/fsrcnnx/pass_12.spv.inc @@ -0,0 +1,180 @@ +{0x07230203,0x00010000,0x000d000b,0x000000f5, +0x00000000,0x00020011,0x00000001,0x0006000b, +0x00000001,0x4c534c47,0x6474732e,0x3035342e, +0x00000000,0x0003000e,0x00000000,0x00000001, +0x0006000f,0x00000005,0x00000004,0x6e69616d, +0x00000000,0x00000085,0x00060010,0x00000004, +0x00000011,0x00000010,0x00000010,0x00000001, +0x00030047,0x00000020,0x00000002,0x00050048, +0x00000020,0x00000000,0x00000023,0x00000000, +0x00040047,0x0000004b,0x00000021,0x00000001, +0x00040047,0x0000004b,0x00000022,0x00000000, +0x00040047,0x00000068,0x00000021,0x00000002, +0x00040047,0x00000068,0x00000022,0x00000000, +0x00040047,0x0000006e,0x00000021,0x00000003, +0x00040047,0x0000006e,0x00000022,0x00000000, +0x00040047,0x00000085,0x0000000b,0x0000001c, +0x00030047,0x000000a2,0x00000019,0x00040047, +0x000000a2,0x00000021,0x00000000,0x00040047, +0x000000a2,0x00000022,0x00000000,0x00040047, +0x000000a7,0x0000000b,0x00000019,0x00020013, +0x00000002,0x00030021,0x00000003,0x00000002, +0x00030016,0x00000006,0x00000020,0x00090019, +0x00000007,0x00000006,0x00000001,0x00000000, +0x00000000,0x00000000,0x00000001,0x00000000, +0x0003001b,0x00000008,0x00000007,0x00040020, +0x00000009,0x00000000,0x00000008,0x00040017, +0x0000000c,0x00000006,0x00000004,0x00040015, +0x00000016,0x00000020,0x00000001,0x00040017, +0x00000017,0x00000016,0x00000002,0x0004002b, +0x00000016,0x0000001e,0x00000000,0x0005002c, +0x00000017,0x0000001f,0x0000001e,0x0000001e, +0x0003001e,0x00000020,0x00000017,0x00040020, +0x00000021,0x00000009,0x00000020,0x0004003b, +0x00000021,0x00000022,0x00000009,0x00040020, +0x00000023,0x00000009,0x00000017,0x0004002b, +0x00000016,0x00000026,0x00000001,0x0004002b, +0x00000006,0x00000030,0xbd2e2e0b,0x0004002b, +0x00000006,0x00000031,0xbebe3573,0x0004002b, +0x00000006,0x00000032,0xbcd1e6e0,0x0004002b, +0x00000006,0x00000033,0xbe8e0e23,0x0007002c, +0x0000000c,0x00000034,0x00000030,0x00000031, +0x00000032,0x00000033,0x00040018,0x00000035, +0x0000000c,0x00000004,0x0004002b,0x00000006, +0x00000036,0x3cc31124,0x0004002b,0x00000006, +0x00000037,0x3cf20ec9,0x0004002b,0x00000006, +0x00000038,0xbbd9a448,0x0004002b,0x00000006, +0x00000039,0x3dd1258c,0x0007002c,0x0000000c, +0x0000003a,0x00000036,0x00000037,0x00000038, +0x00000039,0x0004002b,0x00000006,0x0000003b, +0xbd68bd0d,0x0004002b,0x00000006,0x0000003c, +0xbedefb2c,0x0004002b,0x00000006,0x0000003d, +0xbe8a444a,0x0004002b,0x00000006,0x0000003e, +0xbe52f68e,0x0007002c,0x0000000c,0x0000003f, +0x0000003b,0x0000003c,0x0000003d,0x0000003e, +0x0004002b,0x00000006,0x00000040,0xbd8d3b9a, +0x0004002b,0x00000006,0x00000041,0xbe2d0643, +0x0004002b,0x00000006,0x00000042,0xbcfb49d3, +0x0004002b,0x00000006,0x00000043,0xbe7c0840, +0x0007002c,0x0000000c,0x00000044,0x00000040, +0x00000041,0x00000042,0x00000043,0x0004002b, +0x00000006,0x00000045,0xbbbc0257,0x0004002b, +0x00000006,0x00000046,0xbe41c598,0x0004002b, +0x00000006,0x00000047,0xbcea2f99,0x0004002b, +0x00000006,0x00000048,0xbf00d5bc,0x0007002c, +0x0000000c,0x00000049,0x00000045,0x00000046, +0x00000047,0x00000048,0x0007002c,0x00000035, +0x0000004a,0x0000003a,0x0000003f,0x00000044, +0x00000049,0x0004003b,0x00000009,0x0000004b, +0x00000000,0x0004002b,0x00000006,0x0000004c, +0x00000000,0x0004002b,0x00000006,0x00000053, +0x3f0bdbb7,0x0004002b,0x00000006,0x00000054, +0x3dc73ac1,0x0004002b,0x00000006,0x00000055, +0x3cfbf42b,0x0004002b,0x00000006,0x00000056, +0x3d8addd1,0x0007002c,0x0000000c,0x00000057, +0x00000053,0x00000054,0x00000055,0x00000056, +0x0004002b,0x00000006,0x00000058,0xbd11d7ea, +0x0004002b,0x00000006,0x00000059,0xbf338e11, +0x0004002b,0x00000006,0x0000005a,0x3e4194d8, +0x0004002b,0x00000006,0x0000005b,0xbdd44eb5, +0x0007002c,0x0000000c,0x0000005c,0x00000058, +0x00000059,0x0000005a,0x0000005b,0x0004002b, +0x00000006,0x0000005d,0xbe32c5c9,0x0004002b, +0x00000006,0x0000005e,0xbe96a440,0x0004002b, +0x00000006,0x0000005f,0xbd46d453,0x0004002b, +0x00000006,0x00000060,0xbe98bc69,0x0007002c, +0x0000000c,0x00000061,0x0000005d,0x0000005e, +0x0000005f,0x00000060,0x0004002b,0x00000006, +0x00000062,0xbd56ceaa,0x0004002b,0x00000006, +0x00000063,0xbea6f709,0x0004002b,0x00000006, +0x00000064,0x3ea4b918,0x0004002b,0x00000006, +0x00000065,0x3e488048,0x0007002c,0x0000000c, +0x00000066,0x00000062,0x00000063,0x00000064, +0x00000065,0x0007002c,0x00000035,0x00000067, +0x00000057,0x0000005c,0x00000061,0x00000066, +0x0004003b,0x00000009,0x00000068,0x00000000, +0x0004003b,0x00000009,0x0000006e,0x00000000, +0x0007002c,0x0000000c,0x00000074,0x0000004c, +0x0000004c,0x0000004c,0x0000004c,0x0004002b, +0x00000006,0x00000076,0x3e0e7924,0x0004002b, +0x00000006,0x00000077,0x3dc4acdd,0x0004002b, +0x00000006,0x00000078,0x3f1f9fef,0x0004002b, +0x00000006,0x00000079,0x3df11b00,0x0007002c, +0x0000000c,0x0000007a,0x00000076,0x00000077, +0x00000078,0x00000079,0x00040015,0x00000082, +0x00000020,0x00000000,0x00040017,0x00000083, +0x00000082,0x00000003,0x00040020,0x00000084, +0x00000001,0x00000083,0x0004003b,0x00000084, +0x00000085,0x00000001,0x00040017,0x00000086, +0x00000082,0x00000002,0x00020014,0x0000008a, +0x0004002b,0x00000082,0x0000008b,0x00000000, +0x00040020,0x0000008f,0x00000009,0x00000016, +0x0004002b,0x00000082,0x00000096,0x00000001, +0x00090019,0x000000a0,0x00000006,0x00000001, +0x00000000,0x00000000,0x00000000,0x00000002, +0x00000002,0x00040020,0x000000a1,0x00000000, +0x000000a0,0x0004003b,0x000000a1,0x000000a2, +0x00000000,0x0004002b,0x00000082,0x000000a6, +0x00000010,0x0006002c,0x00000083,0x000000a7, +0x000000a6,0x000000a6,0x00000096,0x0005002c, +0x00000017,0x000000f4,0x00000026,0x00000026, +0x00050036,0x00000002,0x00000004,0x00000000, +0x00000003,0x000200f8,0x00000005,0x000300f7, +0x000000a8,0x00000000,0x000300fb,0x0000008b, +0x000000a9,0x000200f8,0x000000a9,0x0004003d, +0x00000083,0x00000087,0x00000085,0x0007004f, +0x00000086,0x00000088,0x00000087,0x00000087, +0x00000000,0x00000001,0x0004007c,0x00000017, +0x00000089,0x00000088,0x00050051,0x00000016, +0x0000008e,0x00000089,0x00000000,0x00060041, +0x0000008f,0x00000090,0x00000022,0x0000001e, +0x0000008b,0x0004003d,0x00000016,0x00000091, +0x00000090,0x000500af,0x0000008a,0x00000092, +0x0000008e,0x00000091,0x000400a8,0x0000008a, +0x00000093,0x00000092,0x000300f7,0x00000095, +0x00000000,0x000400fa,0x00000093,0x00000094, +0x00000095,0x000200f8,0x00000094,0x00050051, +0x00000016,0x00000098,0x00000089,0x00000001, +0x00060041,0x0000008f,0x00000099,0x00000022, +0x0000001e,0x00000096,0x0004003d,0x00000016, +0x0000009a,0x00000099,0x000500af,0x0000008a, +0x0000009b,0x00000098,0x0000009a,0x000200f9, +0x00000095,0x000200f8,0x00000095,0x000700f5, +0x0000008a,0x0000009c,0x00000092,0x000000a9, +0x0000009b,0x00000094,0x000300f7,0x0000009e, +0x00000000,0x000400fa,0x0000009c,0x0000009d, +0x0000009e,0x000200f8,0x0000009d,0x000200f9, +0x000000a8,0x000200f8,0x0000009e,0x0004003d, +0x000000a0,0x000000a3,0x000000a2,0x0004003d, +0x00000008,0x000000c8,0x0000004b,0x00050041, +0x00000023,0x000000cd,0x00000022,0x0000001e, +0x0004003d,0x00000017,0x000000ce,0x000000cd, +0x00050082,0x00000017,0x000000d0,0x000000ce, +0x000000f4,0x0008000c,0x00000017,0x000000d1, +0x00000001,0x0000002d,0x00000089,0x0000001f, +0x000000d0,0x00040064,0x00000007,0x000000d2, +0x000000c8,0x0007005f,0x0000000c,0x000000d3, +0x000000d2,0x000000d1,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x000000b5,0x0000004a, +0x000000d3,0x00050081,0x0000000c,0x000000b7, +0x00000034,0x000000b5,0x0004003d,0x00000008, +0x000000d6,0x00000068,0x00040064,0x00000007, +0x000000e0,0x000000d6,0x0007005f,0x0000000c, +0x000000e1,0x000000e0,0x000000d1,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x000000b9, +0x00000067,0x000000e1,0x00050081,0x0000000c, +0x000000bb,0x000000b7,0x000000b9,0x0004003d, +0x00000008,0x000000e4,0x0000006e,0x00040064, +0x00000007,0x000000ee,0x000000e4,0x0007005f, +0x0000000c,0x000000ef,0x000000ee,0x000000d1, +0x00000002,0x0000001e,0x00050081,0x0000000c, +0x000000be,0x000000bb,0x000000ef,0x0007000c, +0x0000000c,0x000000c0,0x00000001,0x00000028, +0x000000be,0x00000074,0x0007000c,0x0000000c, +0x000000c2,0x00000001,0x00000025,0x000000be, +0x00000074,0x00050085,0x0000000c,0x000000c3, +0x0000007a,0x000000c2,0x00050081,0x0000000c, +0x000000c4,0x000000c0,0x000000c3,0x00040063, +0x000000a3,0x00000089,0x000000c4,0x000200f9, +0x000000a8,0x000200f8,0x000000a8,0x000100fd, +0x00010038} diff --git a/app/src/shaders/fsrcnnx/pass_13.comp b/app/src/shaders/fsrcnnx/pass_13.comp new file mode 100644 index 0000000..207b35f --- /dev/null +++ b/app/src/shaders/fsrcnnx/pass_13.comp @@ -0,0 +1,45 @@ +#version 450 +// Generated by tools/gen_fsrcnnx.js from third_party/FSRCNNX_x2_8-0-4-1.glsl +// (FSRCNNX by igv, LGPL-3.0). Layer: sub-pixel convolution 1. Do not edit. +layout(local_size_x = 16, local_size_y = 16) in; +layout(binding = 0, rgba16f) uniform writeonly image2D dst; +layout(binding = 1) uniform sampler2D in0; +layout(binding = 2) uniform sampler2D in1; +layout(binding = 3) uniform sampler2D in2; +layout(push_constant) uniform Params { ivec2 size; } p; + +ivec2 at_; +vec4 fetch_(sampler2D s, vec2 o) { return texelFetch(s, clamp(at_ + ivec2(o), ivec2(0), p.size - 1), 0); } +#define RES1_texOff(o) fetch_(in0, vec2(o)) +#define RES2_texOff(o) fetch_(in1, vec2(o)) + +vec4 hook() +{ +vec4 res = vec4(0.2010385394096375,0.2058132737874985,0.1918809115886688,0.1961363703012466); +res += mat4x4(-0.0005980331334285,-0.0095877395942807,-0.0149448839947581,-0.0026380482595414,0.0320665836334229,-0.0706205591559410,-0.0054677254520357,0.0215112231671810,-0.0025710910558701,-0.0000433265340689,0.0044494951143861,-0.0034823501482606,-0.0050858515314758,0.0109513988718390,0.0208286065608263,-0.0032168829347938) * RES1_texOff(vec2(-1,-1)); +res += mat4x4(-0.0145305208861828,0.0246876608580351,-0.0038286084309220,-0.0033089490607381,-0.0920709222555161,-0.0767898634076118,0.0012083095498383,-0.0751532614231110,0.0001302754972130,-0.0107085108757019,-0.0010383903281763,-0.0059571005403996,0.0809685289859772,0.0414833538234234,0.0227938480675220,-0.0211347509175539) * RES2_texOff(vec2(-1,-1)); +res += mat4x4(0.0160999298095703,0.0364215746521950,-0.0377063788473606,-0.0449111759662628,-0.0476365163922310,0.1522845029830933,-0.0131391752511263,-0.0476671792566776,-0.0378389135003090,0.0235454943031073,0.0224007442593575,-0.0010372076649219,-0.0089435689151287,-0.0293026417493820,0.0274190884083509,0.0469092652201653) * RES1_texOff(vec2(-1,0)); +res += mat4x4(0.0297575183212757,-0.0132508194074035,-0.0044682323932648,-0.0096222748979926,0.2525918781757355,0.1873829364776611,-0.5599535703659058,-0.2372044622898102,0.0033207221422344,0.0256173480302095,0.0294605866074562,0.0323960892856121,-0.1679904460906982,-0.1278967708349228,0.3168168365955353,0.1978507637977600) * RES2_texOff(vec2(-1,0)); +res += mat4x4(-0.0047590560279787,-0.0149335600435734,0.0033453819341958,-0.0012247267877683,0.1112466752529144,0.0147760482504964,0.0031189601868391,0.0391573049128056,-0.0028154491446912,-0.0036881719715893,-0.0116015253588557,-0.0037573333829641,0.0047581391409039,0.0071071563288569,-0.0033221673220396,0.0004882142529823) * RES1_texOff(vec2(-1,1)); +res += mat4x4(-0.0025197160430253,-0.0018677815096453,0.0038254233077168,0.0041981274262071,-0.1321131736040115,-0.0494364202022552,0.0760654658079147,-0.1386690139770508,-0.0016222692793235,-0.0060105528682470,0.0010201989207417,0.0092753591015935,-0.0194614846259356,0.0087382243946195,-0.0606758072972298,0.0156162241473794) * RES2_texOff(vec2(-1,1)); +res += mat4x4(-0.0073722628876567,0.0012844242155552,0.0241398401558399,-0.0075527969747782,-0.0865194946527481,-0.0610522404313087,0.0289319511502981,-0.0994452014565468,0.0281447004526854,-0.0250582899898291,0.0044891634024680,-0.0246205236762762,0.0112307453528047,-0.0010844616917893,-0.0223584957420826,0.0177635718137026) * RES1_texOff(vec2(0,-1)); +res += mat4x4(-0.0585863515734673,0.0953190475702286,-0.0555586628615856,0.1033507287502289,0.1560877263545990,-0.0690897777676582,-0.0341389514505863,-0.0661668032407761,0.0531073249876499,-0.0266165956854820,-0.0203275382518768,0.0017760475166142,-0.1300747394561768,0.1810652017593384,0.0381597876548767,0.1397419273853302) * RES2_texOff(vec2(0,-1)); +res += mat4x4(0.6259804368019104,0.6062518954277039,0.5450409054756165,0.5966195464134216,-0.0423948727548122,0.0760537460446358,-0.0113651463761926,0.3007817566394806,-0.3218322694301605,0.2713021934032440,-0.3143473267555237,0.2303840517997742,0.3493050038814545,0.3590726852416992,0.4138027429580688,0.3391666412353516) * RES1_texOff(vec2(0,0)); +res += mat4x4(0.0790478289127350,-0.0978994593024254,0.0779844969511032,-0.0823706611990929,0.0094470111653209,0.1671760678291321,0.1201528310775757,-0.2016288936138153,0.3667598366737366,0.3651430010795593,-0.3612343966960907,-0.2978236973285675,-0.4231655597686768,0.0091423410922289,-0.1918412446975708,0.4224558770656586) * RES2_texOff(vec2(0,0)); +res += mat4x4(-0.0186564289033413,0.0274957418441772,-0.0064405309967697,0.0056951809674501,0.4864942431449890,-0.2563461959362030,0.4357284605503082,-0.2976118028163910,0.0374982468783855,0.0167757049202919,0.0305800959467888,0.0232830215245485,0.0138373551890254,-0.0191283021122217,0.0032355054281652,0.0055057541467249) * RES1_texOff(vec2(0,1)); +res += mat4x4(-0.0276355985552073,0.0048149987123907,-0.0251619722694159,-0.0057246969081461,0.0271473955363035,-0.0042668608948588,-0.0594691745936871,0.2255926281213760,-0.0203660242259502,0.0721646770834923,0.0137230781838298,-0.0650938376784325,-0.3049557507038116,0.2035628110170364,-0.2509683668613434,0.1962853819131851) * RES2_texOff(vec2(0,1)); +res += mat4x4(0.0109980758279562,-0.0053752651438117,-0.0112550277262926,0.0024017230607569,0.0362104885280132,0.0084348218515515,-0.0106990104541183,-0.0207723993808031,-0.0014961160486564,0.0066790678538382,0.0028113177977502,0.0025022011250257,-0.0093937022611499,0.0016421369509771,0.0035362334456295,-0.0058064293116331) * RES1_texOff(vec2(1,-1)); +res += mat4x4(0.0138889988884330,-0.0078343702480197,0.0061464929021895,0.0202130675315857,-0.0257590841501951,-0.0366640128195286,0.0250097587704659,-0.0498071312904358,-0.0103149358183146,-0.0001786737266229,-0.0099909817799926,0.0062733208760619,0.0131437368690968,-0.0005469865864143,-0.0388854071497917,0.0612070746719837) * RES2_texOff(vec2(1,-1)); +res += mat4x4(0.0052813654765487,0.0215748809278011,0.0107395220547915,-0.0079439217224717,0.0382786765694618,0.0697424262762070,-0.0415962152183056,0.0657853558659554,0.0209470037370920,-0.0218399092555046,-0.0447359494864941,0.0407319553196430,-0.0040902681648731,-0.0196106657385826,-0.0018554026028141,0.0203906055539846) * RES1_texOff(vec2(1,0)); +res += mat4x4(-0.0106181986629963,0.0084018819034100,0.0131329754367471,-0.0198754761368036,0.1117177084088326,0.0990846082568169,-0.0732304081320763,0.0163581725209951,-0.0648830309510231,-0.0451613292098045,0.0206844564527273,0.0031441387254745,-0.0106161693111062,-0.0567689687013626,0.0782861113548279,-0.0306094046682119) * RES2_texOff(vec2(1,0)); +res += mat4x4(0.0012452082009986,-0.0026056850329041,-0.0096226977184415,-0.0037850935477763,-0.0190967041999102,0.0534373670816422,0.1599360853433609,0.0834670960903168,-0.0070255175232887,0.0012873009545729,0.0030876772943884,-0.0093916896730661,-0.0033529615029693,0.0043485122732818,0.0089034689590335,-0.0067489291541278) * RES1_texOff(vec2(1,1)); +res += mat4x4(0.0004713654634543,-0.0034161377698183,-0.0026913962792605,0.0053522582165897,-0.0040974905714393,0.0273330621421337,-0.0333138220012188,-0.0701237097382545,0.0082997502759099,-0.0183656588196754,-0.0122841577976942,-0.0052855615504086,-0.0023795007728040,-0.0438593104481697,-0.1101513057947159,-0.0182559806853533) * RES2_texOff(vec2(1,1)); +return vec4(res); +} + +void main() +{ + at_ = ivec2(gl_GlobalInvocationID.xy); + if (at_.x >= p.size.x || at_.y >= p.size.y) return; + imageStore(dst, at_, hook()); +} diff --git a/app/src/shaders/fsrcnnx/pass_13.spv.inc b/app/src/shaders/fsrcnnx/pass_13.spv.inc new file mode 100644 index 0000000..02616c6 --- /dev/null +++ b/app/src/shaders/fsrcnnx/pass_13.spv.inc @@ -0,0 +1,689 @@ +{0x07230203,0x00010000,0x000d000b,0x000003af, +0x00000000,0x00020011,0x00000001,0x0006000b, +0x00000001,0x4c534c47,0x6474732e,0x3035342e, +0x00000000,0x0003000e,0x00000000,0x00000001, +0x0006000f,0x00000005,0x00000004,0x6e69616d, +0x00000000,0x0000021e,0x00060010,0x00000004, +0x00000011,0x00000010,0x00000010,0x00000001, +0x00030047,0x00000020,0x00000002,0x00050048, +0x00000020,0x00000000,0x00000023,0x00000000, +0x00040047,0x0000004b,0x00000021,0x00000001, +0x00040047,0x0000004b,0x00000022,0x00000000, +0x00040047,0x00000068,0x00000021,0x00000002, +0x00040047,0x00000068,0x00000022,0x00000000, +0x00040047,0x0000021e,0x0000000b,0x0000001c, +0x00030047,0x0000023b,0x00000019,0x00040047, +0x0000023b,0x00000021,0x00000000,0x00040047, +0x0000023b,0x00000022,0x00000000,0x00040047, +0x00000240,0x0000000b,0x00000019,0x00020013, +0x00000002,0x00030021,0x00000003,0x00000002, +0x00030016,0x00000006,0x00000020,0x00090019, +0x00000007,0x00000006,0x00000001,0x00000000, +0x00000000,0x00000000,0x00000001,0x00000000, +0x0003001b,0x00000008,0x00000007,0x00040020, +0x00000009,0x00000000,0x00000008,0x00040017, +0x0000000c,0x00000006,0x00000004,0x00040015, +0x00000016,0x00000020,0x00000001,0x00040017, +0x00000017,0x00000016,0x00000002,0x0004002b, +0x00000016,0x0000001e,0x00000000,0x0005002c, +0x00000017,0x0000001f,0x0000001e,0x0000001e, +0x0003001e,0x00000020,0x00000017,0x00040020, +0x00000021,0x00000009,0x00000020,0x0004003b, +0x00000021,0x00000022,0x00000009,0x00040020, +0x00000023,0x00000009,0x00000017,0x0004002b, +0x00000016,0x00000026,0x00000001,0x0004002b, +0x00000006,0x00000030,0x3e4ddd0c,0x0004002b, +0x00000006,0x00000031,0x3e52c0b7,0x0004002b, +0x00000006,0x00000032,0x3e447c6e,0x0004002b, +0x00000006,0x00000033,0x3e48d7f9,0x0007002c, +0x0000000c,0x00000034,0x00000030,0x00000031, +0x00000032,0x00000033,0x00040018,0x00000035, +0x0000000c,0x00000004,0x0004002b,0x00000006, +0x00000036,0xba1cc553,0x0004002b,0x00000006, +0x00000037,0xbc1d15e5,0x0004002b,0x00000006, +0x00000038,0xbc74db63,0x0004002b,0x00000006, +0x00000039,0xbb2ce31b,0x0007002c,0x0000000c, +0x0000003a,0x00000036,0x00000037,0x00000038, +0x00000039,0x0004002b,0x00000006,0x0000003b, +0x3d035840,0x0004002b,0x00000006,0x0000003c, +0xbd90a183,0x0004002b,0x00000006,0x0000003d, +0xbbb32a9b,0x0004002b,0x00000006,0x0000003e, +0x3cb0384e,0x0007002c,0x0000000c,0x0000003f, +0x0000003b,0x0000003c,0x0000003d,0x0000003e, +0x0004002b,0x00000006,0x00000040,0xbb287fc0, +0x0004002b,0x00000006,0x00000041,0xb835b983, +0x0004002b,0x00000006,0x00000042,0x3b91cd12, +0x0004002b,0x00000006,0x00000043,0xbb643824, +0x0007002c,0x0000000c,0x00000044,0x00000040, +0x00000041,0x00000042,0x00000043,0x0004002b, +0x00000006,0x00000045,0xbba6a737,0x0004002b, +0x00000006,0x00000046,0x3c336d7f,0x0004002b, +0x00000006,0x00000047,0x3caaa0c1,0x0004002b, +0x00000006,0x00000048,0xbb52d257,0x0007002c, +0x0000000c,0x00000049,0x00000045,0x00000046, +0x00000047,0x00000048,0x0007002c,0x00000035, +0x0000004a,0x0000003a,0x0000003f,0x00000044, +0x00000049,0x0004003b,0x00000009,0x0000004b, +0x00000000,0x0004002b,0x00000006,0x00000053, +0xbc6e116c,0x0004002b,0x00000006,0x00000054, +0x3cca3dc7,0x0004002b,0x00000006,0x00000055, +0xbb7ae964,0x0004002b,0x00000006,0x00000056, +0xbb58daf4,0x0007002c,0x0000000c,0x00000057, +0x00000053,0x00000054,0x00000055,0x00000056, +0x0004002b,0x00000006,0x00000058,0xbdbc8fae, +0x0004002b,0x00000006,0x00000059,0xbd9d4401, +0x0004002b,0x00000006,0x0000005a,0x3a9e6024, +0x0004002b,0x00000006,0x0000005b,0xbd99e9f4, +0x0007002c,0x0000000c,0x0000005c,0x00000058, +0x00000059,0x0000005a,0x0000005b,0x0004002b, +0x00000006,0x0000005d,0x39089a90,0x0004002b, +0x00000006,0x0000005e,0xbc2f72c0,0x0004002b, +0x00000006,0x0000005f,0xba881a99,0x0004002b, +0x00000006,0x00000060,0xbbc333c8,0x0007002c, +0x0000000c,0x00000061,0x0000005d,0x0000005e, +0x0000005f,0x00000060,0x0004002b,0x00000006, +0x00000062,0x3da5d2d4,0x0004002b,0x00000006, +0x00000063,0x3d29ea73,0x0004002b,0x00000006, +0x00000064,0x3cbaba2a,0x0004002b,0x00000006, +0x00000065,0xbcad22c9,0x0007002c,0x0000000c, +0x00000066,0x00000062,0x00000063,0x00000064, +0x00000065,0x0007002c,0x00000035,0x00000067, +0x00000057,0x0000005c,0x00000061,0x00000066, +0x0004003b,0x00000009,0x00000068,0x00000000, +0x0004002b,0x00000006,0x0000006e,0x3c83e400, +0x0004002b,0x00000006,0x0000006f,0x3d152eca, +0x0004002b,0x00000006,0x00000070,0xbd1a7201, +0x0004002b,0x00000006,0x00000071,0xbd37f4c8, +0x0007002c,0x0000000c,0x00000072,0x0000006e, +0x0000006f,0x00000070,0x00000071,0x0004002b, +0x00000006,0x00000073,0xbd431e82,0x0004002b, +0x00000006,0x00000074,0x3e1bf078,0x0004002b, +0x00000006,0x00000075,0xbc5745b2,0x0004002b, +0x00000006,0x00000076,0xbd433ea9,0x0007002c, +0x0000000c,0x00000077,0x00000073,0x00000074, +0x00000075,0x00000076,0x0004002b,0x00000006, +0x00000078,0xbd1afcfa,0x0004002b,0x00000006, +0x00000079,0x3cc0e27b,0x0004002b,0x00000006, +0x0000007a,0x3cb781c4,0x0004002b,0x00000006, +0x0000007b,0xba87f2ea,0x0007002c,0x0000000c, +0x0000007c,0x00000078,0x00000079,0x0000007a, +0x0000007b,0x0004002b,0x00000006,0x0000007d, +0xbc12880c,0x0004002b,0x00000006,0x0000007e, +0xbcf00c18,0x0004002b,0x00000006,0x0000007f, +0x3ce09dff,0x0004002b,0x00000006,0x00000080, +0x3d4023ee,0x0007002c,0x0000000c,0x00000081, +0x0000007d,0x0000007e,0x0000007f,0x00000080, +0x0007002c,0x00000035,0x00000082,0x00000072, +0x00000077,0x0000007c,0x00000081,0x0004002b, +0x00000006,0x0000008a,0x3cf3c60a,0x0004002b, +0x00000006,0x0000008b,0xbc5919f7,0x0004002b, +0x00000006,0x0000008c,0xbb926a40,0x0004002b, +0x00000006,0x0000008d,0xbc1da6bf,0x0007002c, +0x0000000c,0x0000008e,0x0000008a,0x0000008b, +0x0000008c,0x0000008d,0x0004002b,0x00000006, +0x0000008f,0x3e8153b9,0x0004002b,0x00000006, +0x00000090,0x3e3fe150,0x0004002b,0x00000006, +0x00000091,0xbf0f591e,0x0004002b,0x00000006, +0x00000092,0xbe72e5ba,0x0007002c,0x0000000c, +0x00000093,0x0000008f,0x00000090,0x00000091, +0x00000092,0x0004002b,0x00000006,0x00000094, +0x3b59a079,0x0004002b,0x00000006,0x00000095, +0x3cd1db79,0x0004002b,0x00000006,0x00000096, +0x3cf15754,0x0004002b,0x00000006,0x00000097, +0x3d04b1c3,0x0007002c,0x0000000c,0x00000098, +0x00000094,0x00000095,0x00000096,0x00000097, +0x0004002b,0x00000006,0x00000099,0xbe2c05b0, +0x0004002b,0x00000006,0x0000009a,0xbe02f75f, +0x0004002b,0x00000006,0x0000009b,0x3ea235d1, +0x0004002b,0x00000006,0x0000009c,0x3e4a9964, +0x0007002c,0x0000000c,0x0000009d,0x00000099, +0x0000009a,0x0000009b,0x0000009c,0x0007002c, +0x00000035,0x0000009e,0x0000008e,0x00000093, +0x00000098,0x0000009d,0x0004002b,0x00000006, +0x000000a4,0xbb9bf1db,0x0004002b,0x00000006, +0x000000a5,0xbc74abe4,0x0004002b,0x00000006, +0x000000a6,0x3b5b3e32,0x0004002b,0x00000006, +0x000000a7,0xbaa08703,0x0007002c,0x0000000c, +0x000000a8,0x000000a4,0x000000a5,0x000000a6, +0x000000a7,0x0004002b,0x00000006,0x000000a9, +0x3de3d54c,0x0004002b,0x00000006,0x000000aa, +0x3c72173d,0x0004002b,0x00000006,0x000000ab, +0x3b4c6778,0x0004002b,0x00000006,0x000000ac, +0x3d206369,0x0007002c,0x0000000c,0x000000ad, +0x000000a9,0x000000aa,0x000000ab,0x000000ac, +0x0004002b,0x00000006,0x000000ae,0xbb388366, +0x0004002b,0x00000006,0x000000af,0xbb71b542, +0x0004002b,0x00000006,0x000000b0,0xbc3e1453, +0x0004002b,0x00000006,0x000000b1,0xbb763d98, +0x0007002c,0x0000000c,0x000000b2,0x000000ae, +0x000000af,0x000000b0,0x000000b1,0x0004002b, +0x00000006,0x000000b3,0x3b9bea2a,0x0004002b, +0x00000006,0x000000b4,0x3be8e326,0x0004002b, +0x00000006,0x000000b5,0xbb59b8b8,0x0004002b, +0x00000006,0x000000b6,0x39fff702,0x0007002c, +0x0000000c,0x000000b7,0x000000b3,0x000000b4, +0x000000b5,0x000000b6,0x0007002c,0x00000035, +0x000000b8,0x000000a8,0x000000ad,0x000000b2, +0x000000b7,0x0004002b,0x00000006,0x000000c0, +0xbb2521d2,0x0004002b,0x00000006,0x000000c1, +0xbaf4d059,0x0004002b,0x00000006,0x000000c2, +0x3b7ab3f4,0x0004002b,0x00000006,0x000000c3, +0x3b899072,0x0007002c,0x0000000c,0x000000c4, +0x000000c0,0x000000c1,0x000000c2,0x000000c3, +0x0004002b,0x00000006,0x000000c5,0xbe0748ad, +0x0004002b,0x00000006,0x000000c6,0xbd4a7dd8, +0x0004002b,0x00000006,0x000000c7,0x3d9bc836, +0x0004002b,0x00000006,0x000000c8,0xbe0dff40, +0x0007002c,0x0000000c,0x000000c9,0x000000c5, +0x000000c6,0x000000c7,0x000000c8,0x0004002b, +0x00000006,0x000000ca,0xbad4a253,0x0004002b, +0x00000006,0x000000cb,0xbbc4f42c,0x0004002b, +0x00000006,0x000000cc,0x3a85b832,0x0004002b, +0x00000006,0x000000cd,0x3c17f7ad,0x0007002c, +0x0000000c,0x000000ce,0x000000ca,0x000000cb, +0x000000cc,0x000000cd,0x0004002b,0x00000006, +0x000000cf,0xbc9f6db1,0x0004002b,0x00000006, +0x000000d0,0x3c0f2ac5,0x0004002b,0x00000006, +0x000000d1,0xbd788732,0x0004002b,0x00000006, +0x000000d2,0x3c7fdb31,0x0007002c,0x0000000c, +0x000000d3,0x000000cf,0x000000d0,0x000000d1, +0x000000d2,0x0007002c,0x00000035,0x000000d4, +0x000000c4,0x000000c9,0x000000ce,0x000000d3, +0x0004002b,0x00000006,0x000000da,0xbbf19306, +0x0004002b,0x00000006,0x000000db,0x3aa85a20, +0x0004002b,0x00000006,0x000000dc,0x3cc5c0ea, +0x0004002b,0x00000006,0x000000dd,0xbbf77d74, +0x0007002c,0x0000000c,0x000000de,0x000000da, +0x000000db,0x000000dc,0x000000dd,0x0004002b, +0x00000006,0x000000df,0xbdb13122,0x0004002b, +0x00000006,0x000000e0,0xbd7a11ea,0x0004002b, +0x00000006,0x000000e1,0x3ced02b3,0x0004002b, +0x00000006,0x000000e2,0xbdcba9ed,0x0007002c, +0x0000000c,0x000000e3,0x000000df,0x000000e0, +0x000000e1,0x000000e2,0x0004002b,0x00000006, +0x000000e4,0x3ce68fb7,0x0004002b,0x00000006, +0x000000e5,0xbccd470b,0x0004002b,0x00000006, +0x000000e6,0x3b9319d5,0x0004002b,0x00000006, +0x000000e7,0xbcc9b0fb,0x0007002c,0x0000000c, +0x000000e8,0x000000e4,0x000000e5,0x000000e6, +0x000000e7,0x0004002b,0x00000006,0x000000e9, +0x3c380129,0x0004002b,0x00000006,0x000000ea, +0xba8e247f,0x0004002b,0x00000006,0x000000eb, +0xbcb7292a,0x0004002b,0x00000006,0x000000ec, +0x3c9184e9,0x0007002c,0x0000000c,0x000000ed, +0x000000e9,0x000000ea,0x000000eb,0x000000ec, +0x0007002c,0x00000035,0x000000ee,0x000000de, +0x000000e3,0x000000e8,0x000000ed,0x0004002b, +0x00000006,0x000000f5,0xbd6ff83e,0x0004002b, +0x00000006,0x000000f6,0x3dc336a2,0x0004002b, +0x00000006,0x000000f7,0xbd63917b,0x0004002b, +0x00000006,0x000000f8,0x3dd3a98c,0x0007002c, +0x0000000c,0x000000f9,0x000000f5,0x000000f6, +0x000000f7,0x000000f8,0x0004002b,0x00000006, +0x000000fa,0x3e1fd576,0x0004002b,0x00000006, +0x000000fb,0xbd8d7ef1,0x0004002b,0x00000006, +0x000000fc,0xbd0bd549,0x0004002b,0x00000006, +0x000000fd,0xbd878276,0x0007002c,0x0000000c, +0x000000fe,0x000000fa,0x000000fb,0x000000fc, +0x000000fd,0x0004002b,0x00000006,0x000000ff, +0x3d598711,0x0004002b,0x00000006,0x00000100, +0xbcda0b0c,0x0004002b,0x00000006,0x00000101, +0xbca685f0,0x0004002b,0x00000006,0x00000102, +0x3ae8ca44,0x0007002c,0x0000000c,0x00000103, +0x000000ff,0x00000100,0x00000101,0x00000102, +0x0004002b,0x00000006,0x00000104,0xbe053250, +0x0004002b,0x00000006,0x00000105,0x3e396928, +0x0004002b,0x00000006,0x00000106,0x3d1c4d70, +0x0004002b,0x00000006,0x00000107,0x3e0f1882, +0x0007002c,0x0000000c,0x00000108,0x00000104, +0x00000105,0x00000106,0x00000107,0x0007002c, +0x00000035,0x00000109,0x000000f9,0x000000fe, +0x00000103,0x00000108,0x0004002b,0x00000006, +0x0000010f,0x3f204041,0x0004002b,0x00000006, +0x00000110,0x3f1b3353,0x0004002b,0x00000006, +0x00000111,0x3f0b87cd,0x0004002b,0x00000006, +0x00000112,0x3f18bc0f,0x0007002c,0x0000000c, +0x00000113,0x0000010f,0x00000110,0x00000111, +0x00000112,0x0004002b,0x00000006,0x00000114, +0xbd2da63f,0x0004002b,0x00000006,0x00000115, +0x3d9bc211,0x0004002b,0x00000006,0x00000116, +0xbc3a34e1,0x0004002b,0x00000006,0x00000117, +0x3e9a0011,0x0007002c,0x0000000c,0x00000118, +0x00000114,0x00000115,0x00000116,0x00000117, +0x0004002b,0x00000006,0x00000119,0xbea4c733, +0x0004002b,0x00000006,0x0000011a,0x3e8ae81f, +0x0004002b,0x00000006,0x0000011b,0xbea0f222, +0x0004002b,0x00000006,0x0000011c,0x3e6be9cc, +0x0007002c,0x0000000c,0x0000011d,0x00000119, +0x0000011a,0x0000011b,0x0000011c,0x0004002b, +0x00000006,0x0000011e,0x3eb2d81b,0x0004002b, +0x00000006,0x0000011f,0x3eb7d860,0x0004002b, +0x00000006,0x00000120,0x3ed3ddf4,0x0004002b, +0x00000006,0x00000121,0x3eada740,0x0007002c, +0x0000000c,0x00000122,0x0000011e,0x0000011f, +0x00000120,0x00000121,0x0007002c,0x00000035, +0x00000123,0x00000113,0x00000118,0x0000011d, +0x00000122,0x0004002b,0x00000006,0x0000012a, +0x3da1e3d4,0x0004002b,0x00000006,0x0000012b, +0xbdc87f83,0x0004002b,0x00000006,0x0000012c, +0x3d9fb656,0x0004002b,0x00000006,0x0000012d, +0xbda8b1f3,0x0007002c,0x0000000c,0x0000012e, +0x0000012a,0x0000012b,0x0000012c,0x0000012d, +0x0004002b,0x00000006,0x0000012f,0x3c1ac7a3, +0x0004002b,0x00000006,0x00000130,0x3e2b3034, +0x0004002b,0x00000006,0x00000131,0x3df612b0, +0x0004002b,0x00000006,0x00000132,0xbe4e77ce, +0x0007002c,0x0000000c,0x00000133,0x0000012f, +0x00000130,0x00000131,0x00000132,0x0004002b, +0x00000006,0x00000134,0x3ebbc7f2,0x0004002b, +0x00000006,0x00000135,0x3ebaf406,0x0004002b, +0x00000006,0x00000136,0xbeb8f3b7,0x0004002b, +0x00000006,0x00000137,0xbe987c59,0x0007002c, +0x0000000c,0x00000138,0x00000134,0x00000135, +0x00000136,0x00000137,0x0004002b,0x00000006, +0x00000139,0xbed8a928,0x0004002b,0x00000006, +0x0000013a,0x3c15c9c2,0x0004002b,0x00000006, +0x0000013b,0xbe447208,0x0004002b,0x00000006, +0x0000013c,0x3ed84c23,0x0007002c,0x0000000c, +0x0000013d,0x00000139,0x0000013a,0x0000013b, +0x0000013c,0x0007002c,0x00000035,0x0000013e, +0x0000012e,0x00000133,0x00000138,0x0000013d, +0x0004002b,0x00000006,0x00000144,0xbc98d55e, +0x0004002b,0x00000006,0x00000145,0x3ce13ec0, +0x0004002b,0x00000006,0x00000146,0xbbd30b17, +0x0004002b,0x00000006,0x00000147,0x3bba9ea4, +0x0007002c,0x0000000c,0x00000148,0x00000144, +0x00000145,0x00000146,0x00000147,0x0004002b, +0x00000006,0x00000149,0x3ef915c6,0x0004002b, +0x00000006,0x0000014a,0xbe833fcf,0x0004002b, +0x00000006,0x0000014b,0x3edf17cd,0x0004002b, +0x00000006,0x0000014c,0xbe986093,0x0007002c, +0x0000000c,0x0000014d,0x00000149,0x0000014a, +0x0000014b,0x0000014c,0x0004002b,0x00000006, +0x0000014e,0x3d1997c3,0x0004002b,0x00000006, +0x0000014f,0x3c896d34,0x0004002b,0x00000006, +0x00000150,0x3cfa831c,0x0004002b,0x00000006, +0x00000151,0x3cbebc09,0x0007002c,0x0000000c, +0x00000152,0x0000014e,0x0000014f,0x00000150, +0x00000151,0x0004002b,0x00000006,0x00000153, +0x3c62b613,0x0004002b,0x00000006,0x00000154, +0xbc9cb2f5,0x0004002b,0x00000006,0x00000155, +0x3b540ac6,0x0004002b,0x00000006,0x00000156, +0x3bb4699d,0x0007002c,0x0000000c,0x00000157, +0x00000153,0x00000154,0x00000155,0x00000156, +0x0007002c,0x00000035,0x00000158,0x00000148, +0x0000014d,0x00000152,0x00000157,0x0004002b, +0x00000006,0x0000015f,0xbce2640d,0x0004002b, +0x00000006,0x00000160,0x3b9dc723,0x0004002b, +0x00000006,0x00000161,0xbcce207b,0x0004002b, +0x00000006,0x00000162,0xbbbb963d,0x0007002c, +0x0000000c,0x00000163,0x0000015f,0x00000160, +0x00000161,0x00000162,0x0004002b,0x00000006, +0x00000164,0x3cde6437,0x0004002b,0x00000006, +0x00000165,0xbb8bd106,0x0004002b,0x00000006, +0x00000166,0xbd7395f3,0x0004002b,0x00000006, +0x00000167,0x3e6701c1,0x0007002c,0x0000000c, +0x00000168,0x00000164,0x00000165,0x00000166, +0x00000167,0x0004002b,0x00000006,0x00000169, +0xbca6d6a6,0x0004002b,0x00000006,0x0000016a, +0x3d93cb13,0x0004002b,0x00000006,0x0000016b, +0x3c60d6c3,0x0004002b,0x00000006,0x0000016c, +0xbd854feb,0x0007002c,0x0000000c,0x0000016d, +0x00000169,0x0000016a,0x0000016b,0x0000016c, +0x0004002b,0x00000006,0x0000016e,0xbe9c2329, +0x0004002b,0x00000006,0x0000016f,0x3e5072c5, +0x0004002b,0x00000006,0x00000170,0xbe807eed, +0x0004002b,0x00000006,0x00000171,0x3e48ff09, +0x0007002c,0x0000000c,0x00000172,0x0000016e, +0x0000016f,0x00000170,0x00000171,0x0007002c, +0x00000035,0x00000173,0x00000163,0x00000168, +0x0000016d,0x00000172,0x0004002b,0x00000006, +0x00000179,0x3c343146,0x0004002b,0x00000006, +0x0000017a,0xbbb022fe,0x0004002b,0x00000006, +0x0000017b,0xbc386702,0x0004002b,0x00000006, +0x0000017c,0x3b1d663a,0x0007002c,0x0000000c, +0x0000017d,0x00000179,0x0000017a,0x0000017b, +0x0000017c,0x0004002b,0x00000006,0x0000017e, +0x3d145173,0x0004002b,0x00000006,0x0000017f, +0x3c0a3235,0x0004002b,0x00000006,0x00000180, +0xbc2f4ae7,0x0004002b,0x00000006,0x00000181, +0xbcaa2ae1,0x0007002c,0x0000000c,0x00000182, +0x0000017e,0x0000017f,0x00000180,0x00000181, +0x0004002b,0x00000006,0x00000183,0xbac41953, +0x0004002b,0x00000006,0x00000184,0x3bdadc15, +0x0004002b,0x00000006,0x00000185,0x3b383e16, +0x0004002b,0x00000006,0x00000186,0x3b23fbf8, +0x0007002c,0x0000000c,0x00000187,0x00000183, +0x00000184,0x00000185,0x00000186,0x0004002b, +0x00000006,0x00000188,0xbc19e80b,0x0004002b, +0x00000006,0x00000189,0x3ad73cf9,0x0004002b, +0x00000006,0x0000018a,0x3b67c027,0x0004002b, +0x00000006,0x0000018b,0xbbbe43dc,0x0007002c, +0x0000000c,0x0000018c,0x00000188,0x00000189, +0x0000018a,0x0000018b,0x0007002c,0x00000035, +0x0000018d,0x0000017d,0x00000182,0x00000187, +0x0000018c,0x0004002b,0x00000006,0x00000194, +0x3c638eaf,0x0004002b,0x00000006,0x00000195, +0xbc005bbb,0x0004002b,0x00000006,0x00000196, +0x3bc96885,0x0004002b,0x00000006,0x00000197, +0x3ca595e0,0x0007002c,0x0000000c,0x00000198, +0x00000194,0x00000195,0x00000196,0x00000197, +0x0004002b,0x00000006,0x00000199,0xbcd304b7, +0x0004002b,0x00000006,0x0000019a,0xbd162d01, +0x0004002b,0x00000006,0x0000019b,0x3ccce144, +0x0004002b,0x00000006,0x0000019c,0xbd4c0290, +0x0007002c,0x0000000c,0x0000019d,0x00000199, +0x0000019a,0x0000019b,0x0000019c,0x0004002b, +0x00000006,0x0000019e,0xbc28fffa,0x0004002b, +0x00000006,0x0000019f,0xb93b5a5d,0x0004002b, +0x00000006,0x000001a0,0xbc23b137,0x0004002b, +0x00000006,0x000001a1,0x3bcd906e,0x0007002c, +0x0000000c,0x000001a2,0x0000019e,0x0000019f, +0x000001a0,0x000001a1,0x0004002b,0x00000006, +0x000001a3,0x3c5758d4,0x0004002b,0x00000006, +0x000001a4,0xba0f63a6,0x0004002b,0x00000006, +0x000001a5,0xbd1f464e,0x0004002b,0x00000006, +0x000001a6,0x3d7ab445,0x0007002c,0x0000000c, +0x000001a7,0x000001a3,0x000001a4,0x000001a5, +0x000001a6,0x0007002c,0x00000035,0x000001a8, +0x00000198,0x0000019d,0x000001a2,0x000001a7, +0x0004002b,0x00000006,0x000001ae,0x3bad0f4e, +0x0004002b,0x00000006,0x000001af,0x3cb0bdce, +0x0004002b,0x00000006,0x000001b0,0x3c2ff4d2, +0x0004002b,0x00000006,0x000001b1,0xbc022739, +0x0007002c,0x0000000c,0x000001b2,0x000001ae, +0x000001af,0x000001b0,0x000001b1,0x0004002b, +0x00000006,0x000001b3,0x3d1cca1a,0x0004002b, +0x00000006,0x000001b4,0x3d8ed51e,0x0004002b, +0x00000006,0x000001b5,0xbd2a60cb,0x0004002b, +0x00000006,0x000001b6,0x3d86ba79,0x0007002c, +0x0000000c,0x000001b7,0x000001b3,0x000001b4, +0x000001b5,0x000001b6,0x0004002b,0x00000006, +0x000001b8,0x3cab990d,0x0004002b,0x00000006, +0x000001b9,0xbcb2e99c,0x0004002b,0x00000006, +0x000001ba,0xbd373d0b,0x0004002b,0x00000006, +0x000001bb,0x3d26d68d,0x0007002c,0x0000000c, +0x000001bc,0x000001b8,0x000001b9,0x000001ba, +0x000001bb,0x0004002b,0x00000006,0x000001bd, +0xbb8607a8,0x0004002b,0x00000006,0x000001be, +0xbca0a68c,0x0004002b,0x00000006,0x000001bf, +0xbaf330fb,0x0004002b,0x00000006,0x000001c0, +0x3ca70a33,0x0007002c,0x0000000c,0x000001c1, +0x000001bd,0x000001be,0x000001bf,0x000001c0, +0x0007002c,0x00000035,0x000001c2,0x000001b2, +0x000001b7,0x000001bc,0x000001c1,0x0004002b, +0x00000006,0x000001c9,0xbc2df7f4,0x0004002b, +0x00000006,0x000001ca,0x3c09a80c,0x0004002b, +0x00000006,0x000001cb,0x3c572bb1,0x0004002b, +0x00000006,0x000001cc,0xbca2d1e5,0x0007002c, +0x0000000c,0x000001cd,0x000001c9,0x000001ca, +0x000001cb,0x000001cc,0x0004002b,0x00000006, +0x000001ce,0x3de4cc41,0x0004002b,0x00000006, +0x000001cf,0x3dcaecdf,0x0004002b,0x00000006, +0x000001d0,0xbd95f9d3,0x0004002b,0x00000006, +0x000001d1,0x3c860193,0x0007002c,0x0000000c, +0x000001d2,0x000001ce,0x000001cf,0x000001d0, +0x000001d1,0x0004002b,0x00000006,0x000001d3, +0xbd84e165,0x0004002b,0x00000006,0x000001d4, +0xbd38fb16,0x0004002b,0x00000006,0x000001d5, +0x3ca97273,0x0004002b,0x00000006,0x000001d6, +0x3b4e0de5,0x0007002c,0x0000000c,0x000001d7, +0x000001d3,0x000001d4,0x000001d5,0x000001d6, +0x0004002b,0x00000006,0x000001d8,0xbc2def71, +0x0004002b,0x00000006,0x000001d9,0xbd688694, +0x0004002b,0x00000006,0x000001da,0x3da05478, +0x0004002b,0x00000006,0x000001db,0xbcfac093, +0x0007002c,0x0000000c,0x000001dc,0x000001d8, +0x000001d9,0x000001da,0x000001db,0x0007002c, +0x00000035,0x000001dd,0x000001cd,0x000001d2, +0x000001d7,0x000001dc,0x0004002b,0x00000006, +0x000001e3,0x3aa33641,0x0004002b,0x00000006, +0x000001e4,0xbb2ac424,0x0004002b,0x00000006, +0x000001e5,0xbc1da885,0x0004002b,0x00000006, +0x000001e6,0xbb780f55,0x0007002c,0x0000000c, +0x000001e7,0x000001e3,0x000001e4,0x000001e5, +0x000001e6,0x0004002b,0x00000006,0x000001e8, +0xbc9c70b1,0x0004002b,0x00000006,0x000001e9, +0x3d5ae124,0x0004002b,0x00000006,0x000001ea, +0x3e23c649,0x0004002b,0x00000006,0x000001eb, +0x3daaf0cc,0x0007002c,0x0000000c,0x000001ec, +0x000001e8,0x000001e9,0x000001ea,0x000001eb, +0x0004002b,0x00000006,0x000001ed,0xbbe63650, +0x0004002b,0x00000006,0x000001ee,0x3aa8baa7, +0x0004002b,0x00000006,0x000001ef,0x3b4a5aa1, +0x0004002b,0x00000006,0x000001f0,0xbc19df9a, +0x0007002c,0x0000000c,0x000001f1,0x000001ed, +0x000001ee,0x000001ef,0x000001f0,0x0004002b, +0x00000006,0x000001f2,0xbb5bbd5c,0x0004002b, +0x00000006,0x000001f3,0x3b8e7df7,0x0004002b, +0x00000006,0x000001f4,0x3c11dfdb,0x0004002b, +0x00000006,0x000001f5,0xbbdd261f,0x0007002c, +0x0000000c,0x000001f6,0x000001f2,0x000001f3, +0x000001f4,0x000001f5,0x0007002c,0x00000035, +0x000001f7,0x000001e7,0x000001ec,0x000001f1, +0x000001f6,0x0004002b,0x00000006,0x000001fe, +0x39f7219a,0x0004002b,0x00000006,0x000001ff, +0xbb5fe148,0x0004002b,0x00000006,0x00000200, +0xbb306223,0x0004002b,0x00000006,0x00000201, +0x3baf61ff,0x0007002c,0x0000000c,0x00000202, +0x000001fe,0x000001ff,0x00000200,0x00000201, +0x0004002b,0x00000006,0x00000203,0xbb86443e, +0x0004002b,0x00000006,0x00000204,0x3cdfe996, +0x0004002b,0x00000006,0x00000205,0xbd087413, +0x0004002b,0x00000006,0x00000206,0xbd8f9d05, +0x0007002c,0x0000000c,0x00000207,0x00000203, +0x00000204,0x00000205,0x00000206,0x0004002b, +0x00000006,0x00000208,0x3c07fbad,0x0004002b, +0x00000006,0x00000209,0xbc967394,0x0004002b, +0x00000006,0x0000020a,0xbc49437e,0x0004002b, +0x00000006,0x0000020b,0xbbad3281,0x0007002c, +0x0000000c,0x0000020c,0x00000208,0x00000209, +0x0000020a,0x0000020b,0x0004002b,0x00000006, +0x0000020d,0xbb1bf166,0x0004002b,0x00000006, +0x0000020e,0xbd33a5d2,0x0004002b,0x00000006, +0x0000020f,0xbde19702,0x0004002b,0x00000006, +0x00000210,0xbc958d91,0x0007002c,0x0000000c, +0x00000211,0x0000020d,0x0000020e,0x0000020f, +0x00000210,0x0007002c,0x00000035,0x00000212, +0x00000202,0x00000207,0x0000020c,0x00000211, +0x00040015,0x0000021b,0x00000020,0x00000000, +0x00040017,0x0000021c,0x0000021b,0x00000003, +0x00040020,0x0000021d,0x00000001,0x0000021c, +0x0004003b,0x0000021d,0x0000021e,0x00000001, +0x00040017,0x0000021f,0x0000021b,0x00000002, +0x00020014,0x00000223,0x0004002b,0x0000021b, +0x00000224,0x00000000,0x00040020,0x00000228, +0x00000009,0x00000016,0x0004002b,0x0000021b, +0x0000022f,0x00000001,0x00090019,0x00000239, +0x00000006,0x00000001,0x00000000,0x00000000, +0x00000000,0x00000002,0x00000002,0x00040020, +0x0000023a,0x00000000,0x00000239,0x0004003b, +0x0000023a,0x0000023b,0x00000000,0x0004002b, +0x0000021b,0x0000023f,0x00000010,0x0006002c, +0x0000021c,0x00000240,0x0000023f,0x0000023f, +0x0000022f,0x0004002b,0x00000016,0x000003a6, +0xffffffff,0x0005002c,0x00000017,0x000003a7, +0x000003a6,0x000003a6,0x0005002c,0x00000017, +0x000003a8,0x00000026,0x00000026,0x0005002c, +0x00000017,0x000003a9,0x000003a6,0x0000001e, +0x0005002c,0x00000017,0x000003aa,0x000003a6, +0x00000026,0x0005002c,0x00000017,0x000003ab, +0x0000001e,0x000003a6,0x0005002c,0x00000017, +0x000003ac,0x0000001e,0x00000026,0x0005002c, +0x00000017,0x000003ad,0x00000026,0x000003a6, +0x0005002c,0x00000017,0x000003ae,0x00000026, +0x0000001e,0x00050036,0x00000002,0x00000004, +0x00000000,0x00000003,0x000200f8,0x00000005, +0x000300f7,0x00000242,0x00000000,0x000300fb, +0x00000224,0x00000243,0x000200f8,0x00000243, +0x0004003d,0x0000021c,0x00000220,0x0000021e, +0x0007004f,0x0000021f,0x00000221,0x00000220, +0x00000220,0x00000000,0x00000001,0x0004007c, +0x00000017,0x00000222,0x00000221,0x00050051, +0x00000016,0x00000227,0x00000222,0x00000000, +0x00060041,0x00000228,0x00000229,0x00000022, +0x0000001e,0x00000224,0x0004003d,0x00000016, +0x0000022a,0x00000229,0x000500af,0x00000223, +0x0000022b,0x00000227,0x0000022a,0x000400a8, +0x00000223,0x0000022c,0x0000022b,0x000300f7, +0x0000022e,0x00000000,0x000400fa,0x0000022c, +0x0000022d,0x0000022e,0x000200f8,0x0000022d, +0x00050051,0x00000016,0x00000231,0x00000222, +0x00000001,0x00060041,0x00000228,0x00000232, +0x00000022,0x0000001e,0x0000022f,0x0004003d, +0x00000016,0x00000233,0x00000232,0x000500af, +0x00000223,0x00000234,0x00000231,0x00000233, +0x000200f9,0x0000022e,0x000200f8,0x0000022e, +0x000700f5,0x00000223,0x00000235,0x0000022b, +0x00000243,0x00000234,0x0000022d,0x000300f7, +0x00000237,0x00000000,0x000400fa,0x00000235, +0x00000236,0x00000237,0x000200f8,0x00000236, +0x000200f9,0x00000242,0x000200f8,0x00000237, +0x0004003d,0x00000239,0x0000023c,0x0000023b, +0x0004003d,0x00000008,0x000002a8,0x0000004b, +0x00050080,0x00000017,0x000002ac,0x00000222, +0x000003a7,0x00050041,0x00000023,0x000002ad, +0x00000022,0x0000001e,0x0004003d,0x00000017, +0x000002ae,0x000002ad,0x00050082,0x00000017, +0x000002b0,0x000002ae,0x000003a8,0x0008000c, +0x00000017,0x000002b1,0x00000001,0x0000002d, +0x000002ac,0x0000001f,0x000002b0,0x00040064, +0x00000007,0x000002b2,0x000002a8,0x0007005f, +0x0000000c,0x000002b3,0x000002b2,0x000002b1, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x0000025e,0x0000004a,0x000002b3,0x00050081, +0x0000000c,0x00000260,0x00000034,0x0000025e, +0x0004003d,0x00000008,0x000002b6,0x00000068, +0x00040064,0x00000007,0x000002c0,0x000002b6, +0x0007005f,0x0000000c,0x000002c1,0x000002c0, +0x000002b1,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x00000262,0x00000067,0x000002c1, +0x00050081,0x0000000c,0x00000264,0x00000260, +0x00000262,0x0004003d,0x00000008,0x000002c4, +0x0000004b,0x00050080,0x00000017,0x000002c8, +0x00000222,0x000003a9,0x0008000c,0x00000017, +0x000002cd,0x00000001,0x0000002d,0x000002c8, +0x0000001f,0x000002b0,0x00040064,0x00000007, +0x000002ce,0x000002c4,0x0007005f,0x0000000c, +0x000002cf,0x000002ce,0x000002cd,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x00000266, +0x00000082,0x000002cf,0x00050081,0x0000000c, +0x00000268,0x00000264,0x00000266,0x0004003d, +0x00000008,0x000002d2,0x00000068,0x00040064, +0x00000007,0x000002dc,0x000002d2,0x0007005f, +0x0000000c,0x000002dd,0x000002dc,0x000002cd, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x0000026a,0x0000009e,0x000002dd,0x00050081, +0x0000000c,0x0000026c,0x00000268,0x0000026a, +0x0004003d,0x00000008,0x000002e0,0x0000004b, +0x00050080,0x00000017,0x000002e4,0x00000222, +0x000003aa,0x0008000c,0x00000017,0x000002e9, +0x00000001,0x0000002d,0x000002e4,0x0000001f, +0x000002b0,0x00040064,0x00000007,0x000002ea, +0x000002e0,0x0007005f,0x0000000c,0x000002eb, +0x000002ea,0x000002e9,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x0000026e,0x000000b8, +0x000002eb,0x00050081,0x0000000c,0x00000270, +0x0000026c,0x0000026e,0x0004003d,0x00000008, +0x000002ee,0x00000068,0x00040064,0x00000007, +0x000002f8,0x000002ee,0x0007005f,0x0000000c, +0x000002f9,0x000002f8,0x000002e9,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x00000272, +0x000000d4,0x000002f9,0x00050081,0x0000000c, +0x00000274,0x00000270,0x00000272,0x0004003d, +0x00000008,0x000002fc,0x0000004b,0x00050080, +0x00000017,0x00000300,0x00000222,0x000003ab, +0x0008000c,0x00000017,0x00000305,0x00000001, +0x0000002d,0x00000300,0x0000001f,0x000002b0, +0x00040064,0x00000007,0x00000306,0x000002fc, +0x0007005f,0x0000000c,0x00000307,0x00000306, +0x00000305,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x00000276,0x000000ee,0x00000307, +0x00050081,0x0000000c,0x00000278,0x00000274, +0x00000276,0x0004003d,0x00000008,0x0000030a, +0x00000068,0x00040064,0x00000007,0x00000314, +0x0000030a,0x0007005f,0x0000000c,0x00000315, +0x00000314,0x00000305,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x0000027a,0x00000109, +0x00000315,0x00050081,0x0000000c,0x0000027c, +0x00000278,0x0000027a,0x0004003d,0x00000008, +0x00000318,0x0000004b,0x0008000c,0x00000017, +0x00000321,0x00000001,0x0000002d,0x00000222, +0x0000001f,0x000002b0,0x00040064,0x00000007, +0x00000322,0x00000318,0x0007005f,0x0000000c, +0x00000323,0x00000322,0x00000321,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x0000027e, +0x00000123,0x00000323,0x00050081,0x0000000c, +0x00000280,0x0000027c,0x0000027e,0x0004003d, +0x00000008,0x00000326,0x00000068,0x00040064, +0x00000007,0x00000330,0x00000326,0x0007005f, +0x0000000c,0x00000331,0x00000330,0x00000321, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x00000282,0x0000013e,0x00000331,0x00050081, +0x0000000c,0x00000284,0x00000280,0x00000282, +0x0004003d,0x00000008,0x00000334,0x0000004b, +0x00050080,0x00000017,0x00000338,0x00000222, +0x000003ac,0x0008000c,0x00000017,0x0000033d, +0x00000001,0x0000002d,0x00000338,0x0000001f, +0x000002b0,0x00040064,0x00000007,0x0000033e, +0x00000334,0x0007005f,0x0000000c,0x0000033f, +0x0000033e,0x0000033d,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x00000286,0x00000158, +0x0000033f,0x00050081,0x0000000c,0x00000288, +0x00000284,0x00000286,0x0004003d,0x00000008, +0x00000342,0x00000068,0x00040064,0x00000007, +0x0000034c,0x00000342,0x0007005f,0x0000000c, +0x0000034d,0x0000034c,0x0000033d,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x0000028a, +0x00000173,0x0000034d,0x00050081,0x0000000c, +0x0000028c,0x00000288,0x0000028a,0x0004003d, +0x00000008,0x00000350,0x0000004b,0x00050080, +0x00000017,0x00000354,0x00000222,0x000003ad, +0x0008000c,0x00000017,0x00000359,0x00000001, +0x0000002d,0x00000354,0x0000001f,0x000002b0, +0x00040064,0x00000007,0x0000035a,0x00000350, +0x0007005f,0x0000000c,0x0000035b,0x0000035a, +0x00000359,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x0000028e,0x0000018d,0x0000035b, +0x00050081,0x0000000c,0x00000290,0x0000028c, +0x0000028e,0x0004003d,0x00000008,0x0000035e, +0x00000068,0x00040064,0x00000007,0x00000368, +0x0000035e,0x0007005f,0x0000000c,0x00000369, +0x00000368,0x00000359,0x00000002,0x0000001e, +0x00050091,0x0000000c,0x00000292,0x000001a8, +0x00000369,0x00050081,0x0000000c,0x00000294, +0x00000290,0x00000292,0x0004003d,0x00000008, +0x0000036c,0x0000004b,0x00050080,0x00000017, +0x00000370,0x00000222,0x000003ae,0x0008000c, +0x00000017,0x00000375,0x00000001,0x0000002d, +0x00000370,0x0000001f,0x000002b0,0x00040064, +0x00000007,0x00000376,0x0000036c,0x0007005f, +0x0000000c,0x00000377,0x00000376,0x00000375, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x00000296,0x000001c2,0x00000377,0x00050081, +0x0000000c,0x00000298,0x00000294,0x00000296, +0x0004003d,0x00000008,0x0000037a,0x00000068, +0x00040064,0x00000007,0x00000384,0x0000037a, +0x0007005f,0x0000000c,0x00000385,0x00000384, +0x00000375,0x00000002,0x0000001e,0x00050091, +0x0000000c,0x0000029a,0x000001dd,0x00000385, +0x00050081,0x0000000c,0x0000029c,0x00000298, +0x0000029a,0x0004003d,0x00000008,0x00000388, +0x0000004b,0x00050080,0x00000017,0x0000038c, +0x00000222,0x000003a8,0x0008000c,0x00000017, +0x00000391,0x00000001,0x0000002d,0x0000038c, +0x0000001f,0x000002b0,0x00040064,0x00000007, +0x00000392,0x00000388,0x0007005f,0x0000000c, +0x00000393,0x00000392,0x00000391,0x00000002, +0x0000001e,0x00050091,0x0000000c,0x0000029e, +0x000001f7,0x00000393,0x00050081,0x0000000c, +0x000002a0,0x0000029c,0x0000029e,0x0004003d, +0x00000008,0x00000396,0x00000068,0x00040064, +0x00000007,0x000003a0,0x00000396,0x0007005f, +0x0000000c,0x000003a1,0x000003a0,0x00000391, +0x00000002,0x0000001e,0x00050091,0x0000000c, +0x000002a2,0x00000212,0x000003a1,0x00050081, +0x0000000c,0x000002a4,0x000002a0,0x000002a2, +0x00040063,0x0000023c,0x00000222,0x000002a4, +0x000200f9,0x00000242,0x000200f8,0x00000242, +0x000100fd,0x00010038} diff --git a/app/src/shaders/fsrcnnx/passes.inc b/app/src/shaders/fsrcnnx/passes.inc new file mode 100644 index 0000000..394fc9d --- /dev/null +++ b/app/src/shaders/fsrcnnx/passes.inc @@ -0,0 +1,55 @@ +// Generated by tools/gen_fsrcnnx.js: the FSRCNNX layers, in order. Do not edit. +static const uint32_t kFsrcnnx_pass_01[] = +#include "shaders/fsrcnnx/pass_01.spv.inc" +; +static const uint32_t kFsrcnnx_pass_02[] = +#include "shaders/fsrcnnx/pass_02.spv.inc" +; +static const uint32_t kFsrcnnx_pass_03[] = +#include "shaders/fsrcnnx/pass_03.spv.inc" +; +static const uint32_t kFsrcnnx_pass_04[] = +#include "shaders/fsrcnnx/pass_04.spv.inc" +; +static const uint32_t kFsrcnnx_pass_05[] = +#include "shaders/fsrcnnx/pass_05.spv.inc" +; +static const uint32_t kFsrcnnx_pass_06[] = +#include "shaders/fsrcnnx/pass_06.spv.inc" +; +static const uint32_t kFsrcnnx_pass_07[] = +#include "shaders/fsrcnnx/pass_07.spv.inc" +; +static const uint32_t kFsrcnnx_pass_08[] = +#include "shaders/fsrcnnx/pass_08.spv.inc" +; +static const uint32_t kFsrcnnx_pass_09[] = +#include "shaders/fsrcnnx/pass_09.spv.inc" +; +static const uint32_t kFsrcnnx_pass_10[] = +#include "shaders/fsrcnnx/pass_10.spv.inc" +; +static const uint32_t kFsrcnnx_pass_11[] = +#include "shaders/fsrcnnx/pass_11.spv.inc" +; +static const uint32_t kFsrcnnx_pass_12[] = +#include "shaders/fsrcnnx/pass_12.spv.inc" +; +static const uint32_t kFsrcnnx_pass_13[] = +#include "shaders/fsrcnnx/pass_13.spv.inc" +; +static const FsrcnnxLayer kFsrcnnxLayers[] = { + {"feature map 1", kFsrcnnx_pass_01, sizeof(kFsrcnnx_pass_01), "FEATURE1", {"LUMA", nullptr, nullptr}}, + {"feature map 2", kFsrcnnx_pass_02, sizeof(kFsrcnnx_pass_02), "FEATURE2", {"LUMA", nullptr, nullptr}}, + {"mapping 1_1", kFsrcnnx_pass_03, sizeof(kFsrcnnx_pass_03), "MODEL21", {"FEATURE1", "FEATURE2", nullptr}}, + {"mapping 1_2", kFsrcnnx_pass_04, sizeof(kFsrcnnx_pass_04), "MODEL22", {"FEATURE1", "FEATURE2", nullptr}}, + {"mapping 2_1", kFsrcnnx_pass_05, sizeof(kFsrcnnx_pass_05), "MODEL1", {"MODEL21", "MODEL22", nullptr}}, + {"mapping 2_2", kFsrcnnx_pass_06, sizeof(kFsrcnnx_pass_06), "MODEL2", {"MODEL21", "MODEL22", nullptr}}, + {"mapping 3_1", kFsrcnnx_pass_07, sizeof(kFsrcnnx_pass_07), "MODEL21", {"MODEL1", "MODEL2", nullptr}}, + {"mapping 3_2", kFsrcnnx_pass_08, sizeof(kFsrcnnx_pass_08), "MODEL22", {"MODEL1", "MODEL2", nullptr}}, + {"mapping 4_1", kFsrcnnx_pass_09, sizeof(kFsrcnnx_pass_09), "MODEL1", {"MODEL21", "MODEL22", nullptr}}, + {"mapping 4_2", kFsrcnnx_pass_10, sizeof(kFsrcnnx_pass_10), "MODEL2", {"MODEL21", "MODEL22", nullptr}}, + {"sub-band residuals 1", kFsrcnnx_pass_11, sizeof(kFsrcnnx_pass_11), "RES1", {"MODEL1", "MODEL2", "FEATURE1"}}, + {"sub-band residuals 2", kFsrcnnx_pass_12, sizeof(kFsrcnnx_pass_12), "RES2", {"MODEL1", "MODEL2", "FEATURE2"}}, + {"sub-pixel convolution 1", kFsrcnnx_pass_13, sizeof(kFsrcnnx_pass_13), "SUBCONV1", {"RES1", "RES2", nullptr}}, +}; diff --git a/app/src/shaders/fsrcnnx_luma.comp b/app/src/shaders/fsrcnnx_luma.comp new file mode 100644 index 0000000..0e111df --- /dev/null +++ b/app/src/shaders/fsrcnnx_luma.comp @@ -0,0 +1,17 @@ +#version 450 +// AI upscaler, input: the picture's luma for the FSRCNNX network (fsrcnnx/), +// which works on brightness only. +layout(local_size_x = 16, local_size_y = 16) in; + +layout(binding = 0, rgba16f) uniform writeonly image2D dst; +layout(binding = 1) uniform sampler2D src; // the cleaned-up picture, stream size + +layout(push_constant) uniform Params { ivec2 size; } p; + +void main() +{ + ivec2 at = ivec2(gl_GlobalInvocationID.xy); + if (at.x >= p.size.x || at.y >= p.size.y) return; + vec3 c = texelFetch(src, at, 0).rgb; + imageStore(dst, at, vec4(dot(c, vec3(0.2126, 0.7152, 0.0722)), 0.0, 0.0, 1.0)); +} diff --git a/app/src/shaders/fsrcnnx_luma.spv.inc b/app/src/shaders/fsrcnnx_luma.spv.inc new file mode 100644 index 0000000..eaa49cb --- /dev/null +++ b/app/src/shaders/fsrcnnx_luma.spv.inc @@ -0,0 +1,92 @@ +{0x07230203,0x00010000,0x000d000b,0x0000004c, +0x00000000,0x00020011,0x00000001,0x0006000b, +0x00000001,0x4c534c47,0x6474732e,0x3035342e, +0x00000000,0x0003000e,0x00000000,0x00000001, +0x0006000f,0x00000005,0x00000004,0x6e69616d, +0x00000000,0x0000000d,0x00060010,0x00000004, +0x00000011,0x00000010,0x00000010,0x00000001, +0x00040047,0x0000000d,0x0000000b,0x0000001c, +0x00030047,0x00000017,0x00000002,0x00050048, +0x00000017,0x00000000,0x00000023,0x00000000, +0x00040047,0x00000033,0x00000021,0x00000001, +0x00040047,0x00000033,0x00000022,0x00000000, +0x00030047,0x0000003c,0x00000019,0x00040047, +0x0000003c,0x00000021,0x00000000,0x00040047, +0x0000003c,0x00000022,0x00000000,0x00040047, +0x00000049,0x0000000b,0x00000019,0x00020013, +0x00000002,0x00030021,0x00000003,0x00000002, +0x00040015,0x00000006,0x00000020,0x00000001, +0x00040017,0x00000007,0x00000006,0x00000002, +0x00040015,0x0000000a,0x00000020,0x00000000, +0x00040017,0x0000000b,0x0000000a,0x00000003, +0x00040020,0x0000000c,0x00000001,0x0000000b, +0x0004003b,0x0000000c,0x0000000d,0x00000001, +0x00040017,0x0000000e,0x0000000a,0x00000002, +0x00020014,0x00000012,0x0004002b,0x0000000a, +0x00000013,0x00000000,0x0003001e,0x00000017, +0x00000007,0x00040020,0x00000018,0x00000009, +0x00000017,0x0004003b,0x00000018,0x00000019, +0x00000009,0x0004002b,0x00000006,0x0000001a, +0x00000000,0x00040020,0x0000001b,0x00000009, +0x00000006,0x0004002b,0x0000000a,0x00000022, +0x00000001,0x00030016,0x0000002c,0x00000020, +0x00040017,0x0000002d,0x0000002c,0x00000003, +0x00090019,0x00000030,0x0000002c,0x00000001, +0x00000000,0x00000000,0x00000000,0x00000001, +0x00000000,0x0003001b,0x00000031,0x00000030, +0x00040020,0x00000032,0x00000000,0x00000031, +0x0004003b,0x00000032,0x00000033,0x00000000, +0x00040017,0x00000037,0x0000002c,0x00000004, +0x00090019,0x0000003a,0x0000002c,0x00000001, +0x00000000,0x00000000,0x00000000,0x00000002, +0x00000002,0x00040020,0x0000003b,0x00000000, +0x0000003a,0x0004003b,0x0000003b,0x0000003c, +0x00000000,0x0004002b,0x0000002c,0x00000040, +0x3e59b3d0,0x0004002b,0x0000002c,0x00000041, +0x3f371759,0x0004002b,0x0000002c,0x00000042, +0x3d93dd98,0x0006002c,0x0000002d,0x00000043, +0x00000040,0x00000041,0x00000042,0x0004002b, +0x0000002c,0x00000045,0x00000000,0x0004002b, +0x0000002c,0x00000046,0x3f800000,0x0004002b, +0x0000000a,0x00000048,0x00000010,0x0006002c, +0x0000000b,0x00000049,0x00000048,0x00000048, +0x00000022,0x00050036,0x00000002,0x00000004, +0x00000000,0x00000003,0x000200f8,0x00000005, +0x000300f7,0x0000004a,0x00000000,0x000300fb, +0x00000013,0x0000004b,0x000200f8,0x0000004b, +0x0004003d,0x0000000b,0x0000000f,0x0000000d, +0x0007004f,0x0000000e,0x00000010,0x0000000f, +0x0000000f,0x00000000,0x00000001,0x0004007c, +0x00000007,0x00000011,0x00000010,0x00050051, +0x00000006,0x00000016,0x00000011,0x00000000, +0x00060041,0x0000001b,0x0000001c,0x00000019, +0x0000001a,0x00000013,0x0004003d,0x00000006, +0x0000001d,0x0000001c,0x000500af,0x00000012, +0x0000001e,0x00000016,0x0000001d,0x000400a8, +0x00000012,0x0000001f,0x0000001e,0x000300f7, +0x00000021,0x00000000,0x000400fa,0x0000001f, +0x00000020,0x00000021,0x000200f8,0x00000020, +0x00050051,0x00000006,0x00000024,0x00000011, +0x00000001,0x00060041,0x0000001b,0x00000025, +0x00000019,0x0000001a,0x00000022,0x0004003d, +0x00000006,0x00000026,0x00000025,0x000500af, +0x00000012,0x00000027,0x00000024,0x00000026, +0x000200f9,0x00000021,0x000200f8,0x00000021, +0x000700f5,0x00000012,0x00000028,0x0000001e, +0x0000004b,0x00000027,0x00000020,0x000300f7, +0x0000002a,0x00000000,0x000400fa,0x00000028, +0x00000029,0x0000002a,0x000200f8,0x00000029, +0x000200f9,0x0000004a,0x000200f8,0x0000002a, +0x0004003d,0x00000031,0x00000034,0x00000033, +0x00040064,0x00000030,0x00000036,0x00000034, +0x0007005f,0x00000037,0x00000038,0x00000036, +0x00000011,0x00000002,0x0000001a,0x0008004f, +0x0000002d,0x00000039,0x00000038,0x00000038, +0x00000000,0x00000001,0x00000002,0x0004003d, +0x0000003a,0x0000003d,0x0000003c,0x00050094, +0x0000002c,0x00000044,0x00000039,0x00000043, +0x00070050,0x00000037,0x00000047,0x00000044, +0x00000045,0x00000045,0x00000046,0x00040063, +0x0000003d,0x00000011,0x00000047,0x000200f9, +0x0000004a,0x000200f8,0x0000004a,0x000100fd, +0x00010038} diff --git a/app/src/shaders/fsrcnnx_out.comp b/app/src/shaders/fsrcnnx_out.comp new file mode 100644 index 0000000..8e6a8de --- /dev/null +++ b/app/src/shaders/fsrcnnx_out.comp @@ -0,0 +1,26 @@ +#version 450 +// AI upscaler, output at twice the stream's size. The network's last layer +// gives four luma values per source pixel (one per 2x2 output pixel, mpv's +// "aggregation" step); the colour comes from a bilinear 2x of the picture, +// whose luma is replaced by the network's. +layout(local_size_x = 16, local_size_y = 16) in; + +layout(binding = 0, rgba8) uniform writeonly image2D dst; +layout(binding = 1) uniform sampler2D subconv; // FSRCNNX SUBCONV1, stream size +layout(binding = 2) uniform sampler2D colour; // the cleaned-up picture, stream size, linear + +layout(push_constant) uniform Params { ivec2 src_size; } p; + +void main() +{ + ivec2 at = ivec2(gl_GlobalInvocationID.xy); + ivec2 size = p.src_size * 2; + if (at.x >= size.x || at.y >= size.y) return; + ivec2 idx = at & 1; + vec4 s = texelFetch(subconv, at >> 1, 0); + float y_net = s[idx.x * 2 + idx.y]; + vec3 rgb = textureLod(colour, (vec2(at) + 0.5) / vec2(size), 0.0).rgb; + const vec3 k = vec3(0.2126, 0.7152, 0.0722); + rgb += y_net - dot(rgb, k); + imageStore(dst, at, vec4(clamp(rgb, 0.0, 1.0), 1.0)); +} diff --git a/app/src/shaders/fsrcnnx_out.spv.inc b/app/src/shaders/fsrcnnx_out.spv.inc new file mode 100644 index 0000000..761c393 --- /dev/null +++ b/app/src/shaders/fsrcnnx_out.spv.inc @@ -0,0 +1,137 @@ +{0x07230203,0x00010000,0x000d000b,0x0000008c, +0x00000000,0x00020011,0x00000001,0x0006000b, +0x00000001,0x4c534c47,0x6474732e,0x3035342e, +0x00000000,0x0003000e,0x00000000,0x00000001, +0x0006000f,0x00000005,0x00000004,0x6e69616d, +0x00000000,0x0000000d,0x00060010,0x00000004, +0x00000011,0x00000010,0x00000010,0x00000001, +0x00040047,0x0000000d,0x0000000b,0x0000001c, +0x00030047,0x00000013,0x00000002,0x00050048, +0x00000013,0x00000000,0x00000023,0x00000000, +0x00040047,0x0000003e,0x00000021,0x00000001, +0x00040047,0x0000003e,0x00000022,0x00000000, +0x00040047,0x00000052,0x00000021,0x00000002, +0x00040047,0x00000052,0x00000022,0x00000000, +0x00030047,0x0000006d,0x00000019,0x00040047, +0x0000006d,0x00000021,0x00000000,0x00040047, +0x0000006d,0x00000022,0x00000000,0x00040047, +0x0000007a,0x0000000b,0x00000019,0x00020013, +0x00000002,0x00030021,0x00000003,0x00000002, +0x00040015,0x00000006,0x00000020,0x00000001, +0x00040017,0x00000007,0x00000006,0x00000002, +0x00040015,0x0000000a,0x00000020,0x00000000, +0x00040017,0x0000000b,0x0000000a,0x00000003, +0x00040020,0x0000000c,0x00000001,0x0000000b, +0x0004003b,0x0000000c,0x0000000d,0x00000001, +0x00040017,0x0000000e,0x0000000a,0x00000002, +0x0003001e,0x00000013,0x00000007,0x00040020, +0x00000014,0x00000009,0x00000013,0x0004003b, +0x00000014,0x00000015,0x00000009,0x0004002b, +0x00000006,0x00000016,0x00000000,0x00040020, +0x00000017,0x00000009,0x00000007,0x0004002b, +0x00000006,0x0000001a,0x00000002,0x00020014, +0x0000001d,0x0004002b,0x0000000a,0x0000001e, +0x00000000,0x0004002b,0x0000000a,0x00000028, +0x00000001,0x0004002b,0x00000006,0x00000034, +0x00000001,0x00030016,0x00000037,0x00000020, +0x00040017,0x00000038,0x00000037,0x00000004, +0x00040020,0x00000039,0x00000007,0x00000038, +0x00090019,0x0000003b,0x00000037,0x00000001, +0x00000000,0x00000000,0x00000000,0x00000001, +0x00000000,0x0003001b,0x0000003c,0x0000003b, +0x00040020,0x0000003d,0x00000000,0x0000003c, +0x0004003b,0x0000003d,0x0000003e,0x00000000, +0x00040020,0x00000045,0x00000007,0x00000037, +0x00040017,0x0000004f,0x00000037,0x00000003, +0x0004003b,0x0000003d,0x00000052,0x00000000, +0x00040017,0x00000055,0x00000037,0x00000002, +0x0004002b,0x00000037,0x00000057,0x3f000000, +0x0004002b,0x00000037,0x0000005d,0x00000000, +0x0004002b,0x00000037,0x00000062,0x3e59b3d0, +0x0004002b,0x00000037,0x00000063,0x3f371759, +0x0004002b,0x00000037,0x00000064,0x3d93dd98, +0x0006002c,0x0000004f,0x00000065,0x00000062, +0x00000063,0x00000064,0x00090019,0x0000006b, +0x00000037,0x00000001,0x00000000,0x00000000, +0x00000000,0x00000002,0x00000004,0x00040020, +0x0000006c,0x00000000,0x0000006b,0x0004003b, +0x0000006c,0x0000006d,0x00000000,0x0004002b, +0x00000037,0x00000071,0x3f800000,0x0004002b, +0x0000000a,0x00000079,0x00000010,0x0006002c, +0x0000000b,0x0000007a,0x00000079,0x00000079, +0x00000028,0x0005002c,0x00000007,0x00000087, +0x0000001a,0x0000001a,0x0005002c,0x00000007, +0x00000088,0x00000034,0x00000034,0x0005002c, +0x00000055,0x00000089,0x00000057,0x00000057, +0x0006002c,0x0000004f,0x0000008a,0x0000005d, +0x0000005d,0x0000005d,0x0006002c,0x0000004f, +0x0000008b,0x00000071,0x00000071,0x00000071, +0x00050036,0x00000002,0x00000004,0x00000000, +0x00000003,0x000200f8,0x00000005,0x0004003b, +0x00000039,0x0000003a,0x00000007,0x000300f7, +0x0000007b,0x00000000,0x000300fb,0x0000001e, +0x0000007c,0x000200f8,0x0000007c,0x0004003d, +0x0000000b,0x0000000f,0x0000000d,0x0007004f, +0x0000000e,0x00000010,0x0000000f,0x0000000f, +0x00000000,0x00000001,0x0004007c,0x00000007, +0x00000011,0x00000010,0x00050041,0x00000017, +0x00000018,0x00000015,0x00000016,0x0004003d, +0x00000007,0x00000019,0x00000018,0x00050084, +0x00000007,0x0000001c,0x00000019,0x00000087, +0x00050051,0x00000006,0x00000021,0x00000011, +0x00000000,0x00050051,0x00000006,0x00000023, +0x0000001c,0x00000000,0x000500af,0x0000001d, +0x00000024,0x00000021,0x00000023,0x000400a8, +0x0000001d,0x00000025,0x00000024,0x000300f7, +0x00000027,0x00000000,0x000400fa,0x00000025, +0x00000026,0x00000027,0x000200f8,0x00000026, +0x00050051,0x00000006,0x0000002a,0x00000011, +0x00000001,0x00050051,0x00000006,0x0000002c, +0x0000001c,0x00000001,0x000500af,0x0000001d, +0x0000002d,0x0000002a,0x0000002c,0x000200f9, +0x00000027,0x000200f8,0x00000027,0x000700f5, +0x0000001d,0x0000002e,0x00000024,0x0000007c, +0x0000002d,0x00000026,0x000300f7,0x00000030, +0x00000000,0x000400fa,0x0000002e,0x0000002f, +0x00000030,0x000200f8,0x0000002f,0x000200f9, +0x0000007b,0x000200f8,0x00000030,0x000500c7, +0x00000007,0x00000036,0x00000011,0x00000088, +0x0004003d,0x0000003c,0x0000003f,0x0000003e, +0x000500c3,0x00000007,0x00000042,0x00000011, +0x00000088,0x00040064,0x0000003b,0x00000043, +0x0000003f,0x0007005f,0x00000038,0x00000044, +0x00000043,0x00000042,0x00000002,0x00000016, +0x0003003e,0x0000003a,0x00000044,0x00050051, +0x00000006,0x00000048,0x00000036,0x00000000, +0x00050084,0x00000006,0x00000049,0x00000048, +0x0000001a,0x00050051,0x00000006,0x0000004b, +0x00000036,0x00000001,0x00050080,0x00000006, +0x0000004c,0x00000049,0x0000004b,0x00050041, +0x00000045,0x0000004d,0x0000003a,0x0000004c, +0x0004003d,0x00000037,0x0000004e,0x0000004d, +0x0004003d,0x0000003c,0x00000053,0x00000052, +0x0004006f,0x00000055,0x00000056,0x00000011, +0x00050081,0x00000055,0x00000059,0x00000056, +0x00000089,0x0004006f,0x00000055,0x0000005b, +0x0000001c,0x00050088,0x00000055,0x0000005c, +0x00000059,0x0000005b,0x00070058,0x00000038, +0x0000005e,0x00000053,0x0000005c,0x00000002, +0x0000005d,0x0008004f,0x0000004f,0x0000005f, +0x0000005e,0x0000005e,0x00000000,0x00000001, +0x00000002,0x00050094,0x00000037,0x00000066, +0x0000005f,0x00000065,0x00050083,0x00000037, +0x00000067,0x0000004e,0x00000066,0x00060050, +0x0000004f,0x00000069,0x00000067,0x00000067, +0x00000067,0x00050081,0x0000004f,0x0000006a, +0x0000005f,0x00000069,0x0004003d,0x0000006b, +0x0000006e,0x0000006d,0x0008000c,0x0000004f, +0x00000074,0x00000001,0x0000002b,0x0000006a, +0x0000008a,0x0000008b,0x00050051,0x00000037, +0x00000075,0x00000074,0x00000000,0x00050051, +0x00000037,0x00000076,0x00000074,0x00000001, +0x00050051,0x00000037,0x00000077,0x00000074, +0x00000002,0x00070050,0x00000038,0x00000078, +0x00000075,0x00000076,0x00000077,0x00000071, +0x00040063,0x0000006e,0x00000011,0x00000078, +0x000200f9,0x0000007b,0x000200f8,0x0000007b, +0x000100fd,0x00010038} diff --git a/app/src/shaders/third_party/FSRCNNX_x2_8-0-4-1.glsl b/app/src/shaders/third_party/FSRCNNX_x2_8-0-4-1.glsl new file mode 100644 index 0000000..873b298 --- /dev/null +++ b/app/src/shaders/third_party/FSRCNNX_x2_8-0-4-1.glsl @@ -0,0 +1,426 @@ +// Copyright (C) 2017-2021 igv +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3.0 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 +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this program. If not, see . + +//!HOOK LUMA +//!WHEN OUTPUT.w LUMA.w / 1.300 > OUTPUT.h LUMA.h / 1.300 > * +//!DESC feature map 1 +//!BIND LUMA +//!SAVE FEATURE1 +//!COMPONENTS 4 +vec4 hook() +{ +vec4 res = vec4(-0.1572492271661758,-0.0120896836742759,0.0061487639322877,-0.2852848768234253); +res += vec4(-0.0047900392673910,0.0537447109818459,-0.0000247144635068,0.0066653941757977) * float(LUMA_texOff(vec2(-2,-2))); +res += vec4(0.0073144687339664,-0.0309004038572311,-0.0109181385487318,-0.0092840325087309) * float(LUMA_texOff(vec2(-2,-1))); +res += vec4(0.0591700896620750,0.1974907070398331,-0.0197357516735792,-0.0546554848551750) * float(LUMA_texOff(vec2(-2,0))); +res += vec4(-0.0011764382943511,-0.0299451071768999,0.0229587312787771,0.0021908886265010) * float(LUMA_texOff(vec2(-2,1))); +res += vec4(0.0098101310431957,0.0080995410680771,-0.0030452020000666,-0.0132035519927740) * float(LUMA_texOff(vec2(-2,2))); +res += vec4(-0.0168330334126949,-0.0743711441755295,-0.0259261634200811,0.0234480481594801) * float(LUMA_texOff(vec2(-1,-2))); +res += vec4(0.0239933785051107,0.1896541714668274,0.0207756329327822,-0.0370332375168800) * float(LUMA_texOff(vec2(-1,-1))); +res += vec4(0.0094799501821399,-0.0652511194348335,-0.0004292793164495,-0.0726212188601494) * float(LUMA_texOff(vec2(-1,0))); +res += vec4(0.0297284796833992,-0.1210186630487442,-0.0202929321676493,-0.0574462898075581) * float(LUMA_texOff(vec2(-1,1))); +res += vec4(-0.0318185277283192,0.0840775370597839,0.0110451309010386,0.0415569432079792) * float(LUMA_texOff(vec2(-1,2))); +res += vec4(-0.0253141783177853,0.1168256178498268,0.1159729585051537,0.0963164269924164) * float(LUMA_texOff(vec2(0,-2))); +res += vec4(-0.1103615835309029,-0.0276833958923817,-0.4999594092369080,0.1053867191076279) * float(LUMA_texOff(vec2(0,-1))); +res += vec4(1.1100435256958008,0.0646764487028122,0.0154005717486143,0.8891586661338806) * float(LUMA_texOff(vec2(0,0))); +res += vec4(0.1229330673813820,0.1719468832015991,0.5730338096618652,-0.1645544171333313) * float(LUMA_texOff(vec2(0,1))); +res += vec4(-0.0090442728251219,-0.3023961782455444,-0.1589493155479431,0.0418574027717113) * float(LUMA_texOff(vec2(0,2))); +res += vec4(0.0031942036002874,-0.1310926079750061,0.0075543406419456,-0.0016449346439913) * float(LUMA_texOff(vec2(1,-2))); +res += vec4(-0.0995150282979012,-0.0701921209692955,-0.0130895879119635,0.1344170123338699) * float(LUMA_texOff(vec2(1,-1))); +res += vec4(0.0060519003309309,-0.1533465683460236,0.0114194005727768,0.0264683905988932) * float(LUMA_texOff(vec2(1,0))); +res += vec4(0.0244008023291826,0.1881769001483917,-0.0206351149827242,-0.0628309547901154) * float(LUMA_texOff(vec2(1,1))); +res += vec4(0.0075713125988841,0.0508594363927841,0.0430423170328140,-0.0124188791960478) * float(LUMA_texOff(vec2(1,2))); +res += vec4(-0.0166875869035721,-0.0047865519300103,0.0006719123339280,0.0316803231835365) * float(LUMA_texOff(vec2(2,-2))); +res += vec4(-0.0058461269363761,0.0990798473358154,-0.0177743826061487,-0.0066122291609645) * float(LUMA_texOff(vec2(2,-1))); +res += vec4(-0.0972401946783066,-0.0225446373224258,-0.0037693574558944,0.1953062713146210) * float(LUMA_texOff(vec2(2,0))); +res += vec4(-0.0216837190091610,-0.1824268400669098,0.0069816261529922,0.0283037684857845) * float(LUMA_texOff(vec2(2,1))); +res += vec4(-0.0025767991319299,0.0459827110171318,-0.0080216089263558,0.0084134787321091) * float(LUMA_texOff(vec2(2,2))); +return res; +} + +//!HOOK LUMA +//!WHEN OUTPUT.w LUMA.w / 1.300 > OUTPUT.h LUMA.h / 1.300 > * +//!DESC feature map 2 +//!BIND LUMA +//!SAVE FEATURE2 +//!COMPONENTS 4 +vec4 hook() +{ +vec4 res = vec4(0.0541447550058365,0.0088306749239564,-0.0112389577552676,-0.0127860950306058); +res += vec4(0.0142660010606050,0.0137931071221828,0.0061188107356429,-0.0104134222492576) * float(LUMA_texOff(vec2(-2,-2))); +res += vec4(0.0147292809560895,-0.0289912857115269,0.0266769435256720,0.0933856964111328) * float(LUMA_texOff(vec2(-2,-1))); +res += vec4(-0.1734338253736496,0.1116316691040993,-0.1973157376050949,-0.0581855811178684) * float(LUMA_texOff(vec2(-2,0))); +res += vec4(0.0347507223486900,-0.0341566652059555,0.0061667622067034,0.0075258882716298) * float(LUMA_texOff(vec2(-2,1))); +res += vec4(0.0069884369149804,-0.0194250214844942,0.0080830128863454,-0.0036874092184007) * float(LUMA_texOff(vec2(-2,2))); +res += vec4(0.0233764201402664,0.0344744995236397,0.0162145942449570,0.0979529991745949) * float(LUMA_texOff(vec2(-1,-2))); +res += vec4(0.1280796974897385,-0.1018339172005653,-0.0132977198809385,-0.0019474622095004) * float(LUMA_texOff(vec2(-1,-1))); +res += vec4(0.4286882579326630,0.1222677752375603,0.7046694159507751,0.0945475697517395) * float(LUMA_texOff(vec2(-1,0))); +res += vec4(0.1107441782951355,-0.0134433070197701,-0.0174900908023119,-0.1686445474624634) * float(LUMA_texOff(vec2(-1,1))); +res += vec4(0.0321478620171547,0.0065357843413949,0.0300805997103453,0.0420113280415535) * float(LUMA_texOff(vec2(-1,2))); +res += vec4(-0.1240341588854790,0.0950303301215172,-0.0129648456349969,-0.2681856453418732) * float(LUMA_texOff(vec2(0,-2))); +res += vec4(0.4846960902214050,0.0351924635469913,0.0223043337464333,-0.1273630708456039) * float(LUMA_texOff(vec2(0,-1))); +res += vec4(-1.9379507303237915,-0.2444442063570023,0.0291962660849094,-0.3835578560829163) * float(LUMA_texOff(vec2(0,0))); +res += vec4(0.6396278142929077,-0.0765938311815262,-0.0552659817039967,0.4393545985221863) * float(LUMA_texOff(vec2(0,1))); +res += vec4(-0.1969728022813797,-0.0607173256576061,0.0131113547831774,0.0542017817497253) * float(LUMA_texOff(vec2(0,2))); +res += vec4(0.0091696009039879,-0.0031533432193100,-0.0368777588009834,-0.0459998287260532) * float(LUMA_texOff(vec2(1,-2))); +res += vec4(0.1096992492675781,0.2597902715206146,0.0304869692772627,-0.0195200722664595) * float(LUMA_texOff(vec2(1,-1))); +res += vec4(0.2889648377895355,-0.4275591969490051,-0.7414156794548035,0.2695442438125610) * float(LUMA_texOff(vec2(1,0))); +res += vec4(0.0892018377780914,-0.0229137558490038,0.0244414471089840,-0.1926898956298828) * float(LUMA_texOff(vec2(1,1))); +res += vec4(0.0576358586549759,0.0027846973389387,-0.0036861505359411,-0.0253547113388777) * float(LUMA_texOff(vec2(1,2))); +res += vec4(0.0159624069929123,0.0319602824747562,0.0019470085389912,0.0089780492708087) * float(LUMA_texOff(vec2(2,-2))); +res += vec4(0.0552792511880398,0.0543054342269897,0.0134062822908163,0.0545728243887424) * float(LUMA_texOff(vec2(2,-1))); +res += vec4(-0.1170092225074768,0.1963327825069427,0.1503890156745911,0.1891828328371048) * float(LUMA_texOff(vec2(2,0))); +res += vec4(-0.0084421783685684,0.1297017931938171,-0.0330600887537003,-0.0942063704133034) * float(LUMA_texOff(vec2(2,1))); +res += vec4(0.0118440408259630,-0.0337875857949257,0.0055063469335437,0.0254479162395000) * float(LUMA_texOff(vec2(2,2))); +return res; +} + +//!HOOK LUMA +//!WHEN OUTPUT.w LUMA.w / 1.300 > OUTPUT.h LUMA.h / 1.300 > * +//!DESC mapping 1_1 +//!BIND FEATURE1 +//!BIND FEATURE2 +//!SAVE MODEL21 +//!COMPONENTS 4 +vec4 hook() +{ +vec4 res = vec4(-0.0445119962096214,-0.7632357478141785,0.0156328510493040,-0.2424548566341400); +res += mat4(0.1279004216194153,-0.0275541823357344,0.2275633513927460,0.2241709381341934,0.0197204202413559,-0.0456816256046295,-0.1296672523021698,0.0564568229019642,-0.0241488646715879,-0.0237508192658424,-0.1899632662534714,0.4177669584751129,-0.1814560592174530,-0.0526473335921764,0.1154382973909378,-0.0715614855289459) * FEATURE1_texOff(vec2(-1,-1)); +res += mat4(-0.0660311505198479,0.0416736751794815,0.3146112561225891,0.1472041457891464,-0.3456672728061676,-0.0055983816273510,0.0022350433282554,0.0819796621799469,0.0057485047727823,0.1532524228096008,0.0204557459801435,-0.2500547170639038,-0.0524359568953514,-0.1911625266075134,-0.1078366711735725,-0.1296254843473434) * FEATURE2_texOff(vec2(-1,-1)); +res += mat4(0.0904538556933403,-0.0150672039017081,0.3322310745716095,0.0638923197984695,0.5975797176361084,-0.2452044337987900,-0.4947478473186493,-0.0783191770315170,0.5771877169609070,-0.0870653912425041,-0.8966570496559143,-0.2140965163707733,-0.0493861362338066,-0.0380848757922649,-0.1345319598913193,-0.0186063013970852) * FEATURE1_texOff(vec2(-1,0)); +res += mat4(-0.2523841261863708,0.1387074738740921,0.7878478765487671,-0.2251627445220947,0.2277439534664154,0.5417668819427490,0.0866540968418121,-0.1707777529954910,-0.0598246827721596,-0.4717158675193787,-1.2242834568023682,0.0454643070697784,-0.3503442704677582,0.0573085807263851,0.2530198395252228,-0.0207283068448305) * FEATURE2_texOff(vec2(-1,0)); +res += mat4(0.0168380383402109,-0.2142438590526581,-0.0207892972975969,0.3628533780574799,0.2431225180625916,0.3098322153091431,0.4073205888271332,-0.2762102782726288,-0.0197229012846947,0.1305596232414246,-0.5697882771492004,-0.2976251542568207,-0.0551432967185974,0.2614036500453949,-0.1410341411828995,-0.2906406223773956) * FEATURE1_texOff(vec2(-1,1)); +res += mat4(-0.0498303361237049,0.0224859956651926,0.1952174901962280,-0.0311204437166452,0.2501715123653412,-0.5893352627754211,-1.0793941020965576,0.0160885509103537,0.5081620812416077,0.0482814386487007,0.0546359121799469,-0.0501569248735905,0.1400523334741592,-0.0106841633096337,-0.0940591320395470,-0.1791856139898300) * FEATURE2_texOff(vec2(-1,1)); +res += mat4(0.0393299944698811,0.2232691347599030,-0.1055066883563995,-0.1607919186353683,-0.1567825973033905,-0.0042221010662615,-0.0548228211700916,0.2352052628993988,0.1483389288187027,0.7503526806831360,0.0797731876373291,-0.0049001369625330,-0.0242983382195234,-0.0308702979236841,0.0828925222158432,0.0561857633292675) * FEATURE1_texOff(vec2(0,-1)); +res += mat4(0.0926392748951912,-0.0418718457221985,-0.3060409128665924,-0.1883587390184402,0.0284292586147785,-0.3584854304790497,-0.7909982800483704,-0.0187337957322598,-0.2496993243694305,-0.7520986795425415,0.3771523833274841,-0.0259053874760866,0.0337998159229755,0.2209153026342392,0.0708771497011185,-0.2814430892467499) * FEATURE2_texOff(vec2(0,-1)); +res += mat4(-0.5287809371948242,0.5777525901794434,0.0880500450730324,-0.8452472090721130,-0.3393408954143524,-0.2273543328046799,-0.1298527419567108,0.4990308582782745,1.2613251209259033,-0.7636719942092896,1.5694186687469482,-0.4087363779544830,0.0874531939625740,0.7067158818244934,-0.3419588804244995,-0.3265531957149506) * FEATURE1_texOff(vec2(0,0)); +res += mat4(0.8229957222938538,-0.1236215904355049,-0.1859253048896790,1.6684840917587280,0.2000777721405029,-0.1239093989133835,1.5623438358306885,0.1779983490705490,0.1017884835600853,-0.3707404434680939,1.0626678466796875,-0.3124029338359833,0.0659058541059494,-0.3585464656352997,-0.1866402775049210,0.6733445525169373) * FEATURE2_texOff(vec2(0,0)); +res += mat4(-0.5544115900993347,-0.1892931908369064,0.2460739761590958,-0.1056193932890892,-0.4318082630634308,0.1257930994033813,-0.2672747671604156,-0.1690235435962677,0.0018221997888759,-0.4397548139095306,-0.3007801771163940,0.1068472340703011,0.3506655991077423,0.1143834441900253,0.1363849341869354,-0.1417382210493088) * FEATURE1_texOff(vec2(0,1)); +res += mat4(-0.0505668744444847,0.1831464916467667,0.3957343697547913,-0.2295413911342621,-0.3892803490161896,0.5436951518058777,0.1217770799994469,0.0223295800387859,-0.4462866187095642,-0.4055982232093811,-0.3771279454231262,0.0807068347930908,0.2116729617118835,0.0281026475131512,-0.0229265503585339,0.2868605256080627) * FEATURE2_texOff(vec2(0,1)); +res += mat4(0.1962712109088898,-0.2373334914445877,-2.5208437442779541,-0.1988540291786194,0.2224564403295517,-0.1783192902803421,-0.3962321281433105,-0.1685980409383774,0.1910390257835388,0.2554391324520111,0.4586416482925415,0.2779130041599274,-0.2002453953027725,-0.0061091855168343,1.3808131217956543,0.0434907525777817) * FEATURE1_texOff(vec2(1,-1)); +res += mat4(-0.0307611189782619,-0.0524470545351505,-0.5897512435913086,-0.0816674903035164,0.4052906930446625,0.2542210817337036,-1.9041002988815308,0.0835462361574173,-0.2484460622072220,-0.0184739269316196,0.4510098397731781,0.2587619423866272,0.1537084281444550,0.1503131389617920,-0.0742949545383453,0.0613216012716293) * FEATURE2_texOff(vec2(1,-1)); +res += mat4(0.1772638261318207,0.0948876664042473,0.0083848545327783,-0.2919732332229614,0.2566950321197510,0.0288751143962145,-0.4624863862991333,-0.0608786940574646,0.3310996592044830,-0.0104284398257732,0.6334818005561829,-0.0027201652992517,-0.0342350602149963,0.1938806027173996,-0.2464301586151123,0.0125883584842086) * FEATURE1_texOff(vec2(1,0)); +res += mat4(0.4839433431625366,-0.0502159744501114,-1.1114163398742676,-0.3965759575366974,0.2117286175489426,0.0414481423795223,-0.1332397013902664,-0.0549883767962456,-0.1275007277727127,0.7844302654266357,-0.0095163453370333,0.0961041301488876,-0.4759134948253632,-0.4284025132656097,-0.2072399407625198,-0.3953579664230347) * FEATURE2_texOff(vec2(1,0)); +res += mat4(0.1605869531631470,-0.1715892106294632,0.0865620598196983,-0.0464400537312031,-0.2688548862934113,0.1722514480352402,0.0167612321674824,-0.0032994034700096,-0.3451044559478760,-0.2280300110578537,-0.0029796555172652,-0.1597652435302734,0.0500137843191624,0.1023071259260178,-0.0407028235495090,0.2228624969720840) * FEATURE1_texOff(vec2(1,1)); +res += mat4(0.6999920010566711,0.0839441940188408,0.0815469548106194,-0.1509176045656204,-0.0690853074193001,-0.3200871348381042,0.0780162736773491,-0.1449639797210693,0.2868815064430237,0.3962450027465820,-0.3439113497734070,0.2657423913478851,0.0988137871026993,0.3471299111843109,-0.2186402678489685,-0.0648017078638077) * FEATURE2_texOff(vec2(1,1)); +res = max(res, vec4(0.0)) + vec4(1.0311057567596436,0.1051208898425102,0.1158760935068130,0.0466635078191757) * min(res, vec4(0.0)); +return res; +} + +//!HOOK LUMA +//!WHEN OUTPUT.w LUMA.w / 1.300 > OUTPUT.h LUMA.h / 1.300 > * +//!DESC mapping 1_2 +//!BIND FEATURE1 +//!BIND FEATURE2 +//!SAVE MODEL22 +//!COMPONENTS 4 +vec4 hook() +{ +vec4 res = vec4(0.0713458731770515,-0.1403961777687073,-0.0019562745001167,0.0153338573873043); +res += mat4(-0.0950641855597496,-0.1496641039848328,-0.0653550028800964,0.0655386000871658,-0.0118882004171610,0.2012491524219513,-0.2844599783420563,-0.4794720113277435,0.1128025799989700,-0.0173030979931355,-0.0558849945664406,-0.2957552075386047,0.0128202112391591,0.0199047476053238,-0.0091027505695820,-0.0789640173316002) * FEATURE1_texOff(vec2(-1,-1)); +res += mat4(0.1597457975149155,-0.0476507246494293,0.1466529071331024,0.0859163030982018,0.0797316282987595,-0.3380981683731079,0.2370245009660721,-0.1145931258797646,-0.0352988094091415,-0.0444888733327389,-0.2100716233253479,0.1305520236492157,-0.1359029710292816,0.1097442805767059,0.0449938289821148,-0.1155664771795273) * FEATURE2_texOff(vec2(-1,-1)); +res += mat4(-0.0333916284143925,0.2415594160556793,0.0520512908697128,0.1228107511997223,-0.0491011217236519,0.4408806562423706,0.4631956815719604,0.2014560103416443,-0.3688595592975616,0.0367180295288563,0.2484581321477890,-0.1113442853093147,0.1283355057239532,0.0418004281818867,-0.0171243026852608,-0.1231943219900131) * FEATURE1_texOff(vec2(-1,0)); +res += mat4(0.3493446409702301,0.4550022482872009,0.0368724688887596,0.0748724937438965,0.5001406073570251,0.0145555436611176,0.1236629858613014,0.3143120706081390,-0.1951988488435745,-0.0157914645969868,0.0937998965382576,-0.2233840376138687,0.5033411383628845,-0.3183194100856781,-0.2259195148944855,0.3639536798000336) * FEATURE2_texOff(vec2(-1,0)); +res += mat4(-0.0742707476019859,-0.1287801116704941,-0.2533137500286102,0.0666435658931732,-0.0185621567070484,0.1427449285984039,-0.0724751204252243,-0.0781485065817833,-0.2270648330450058,-0.2314778864383698,0.3814929425716400,-0.1655400246381760,0.0408568829298019,-0.1139645278453827,0.1797397136688232,-0.0245632305741310) * FEATURE1_texOff(vec2(-1,1)); +res += mat4(0.1184135973453522,0.0439366139471531,0.0225226897746325,-0.0038526873104274,0.1292685419321060,0.0629177838563919,0.3455114960670471,-0.1857204884290695,-0.4921502172946930,-0.1171003505587578,0.0188624169677496,-0.1101682260632515,0.0676844567060471,0.5154085755348206,-0.0898379907011986,0.3413280248641968) * FEATURE2_texOff(vec2(-1,1)); +res += mat4(-0.2631838321685791,0.0215514600276947,0.3092688918113708,-0.0200904365628958,0.0678770467638969,0.1769931465387344,-0.3653681278228760,-0.3274513185024261,0.4608019888401031,-0.1544784456491470,0.1189439669251442,0.7015876173973083,0.2732816934585571,-0.0545057803392410,-0.3474545478820801,-0.0253226496279240) * FEATURE1_texOff(vec2(0,-1)); +res += mat4(0.0994316861033440,0.0642566010355949,0.2031503319740295,0.2276959568262100,-0.1094077304005623,0.4463521838188171,0.0921792611479759,-0.3033096492290497,-0.0953373983502388,-0.1331395804882050,0.2615413069725037,-0.2874414622783661,-0.0389687754213810,0.0338272154331207,0.2804331183433533,-0.3443813025951385) * FEATURE2_texOff(vec2(0,-1)); +res += mat4(-0.1806042939424515,-0.4840798676013947,0.4222546219825745,0.1238701492547989,0.0117481639608741,-0.5986865758895874,0.3057619929313660,0.1934896260499954,-0.7086342573165894,-0.8567376136779785,0.6944998502731323,-1.4599204063415527,0.0886754393577576,-0.4293498098850250,-0.1524195969104767,0.2418079674243927) * FEATURE1_texOff(vec2(0,0)); +res += mat4(2.1706113815307617,0.3525652289390564,-0.7008359432220459,-0.4825965166091919,-0.3203429281711578,0.8500943183898926,-0.7993509769439697,0.4329842329025269,0.2106771767139435,1.1103280782699585,1.2092385292053223,1.4814503192901611,-0.4147390127182007,-0.7046836614608765,-0.1443170011043549,-0.6811133027076721) * FEATURE2_texOff(vec2(0,0)); +res += mat4(-0.1489356607198715,0.1400019824504852,0.2425604313611984,-0.2098473459482193,-0.1580564379692078,0.1463224738836288,-0.2187854647636414,0.5174596905708313,-0.0143817225471139,-0.0362622961401939,-0.0068237944506109,0.4749472737312317,0.2914732992649078,-0.3306328952312469,-0.2444777786731720,-0.1171946674585342) * FEATURE1_texOff(vec2(0,1)); +res += mat4(0.0455239675939083,0.3496046066284180,0.1297491937875748,-0.2541095912456512,0.3605501055717468,0.2339573651552200,-0.0188565086573362,-0.0526181310415268,0.1471424549818039,0.8212822079658508,0.0819099843502045,-0.0851665437221527,0.3739568293094635,0.1304695755243301,0.1481167376041412,-0.2134698331356049) * FEATURE2_texOff(vec2(0,1)); +res += mat4(-0.2076720446348190,-0.0932599306106567,0.0648527294397354,-0.2374770641326904,-0.0927826911211014,0.1848200261592865,0.4131188094615936,0.3280069231987000,-0.2099185734987259,0.2130926996469498,-0.0362745784223080,0.0191331822425127,0.1590368449687958,0.0303016249090433,0.1207325309514999,0.2451425045728683) * FEATURE1_texOff(vec2(1,-1)); +res += mat4(-0.0135009605437517,-0.0101303057745099,0.0752487555146217,0.0533373840153217,-0.0253537259995937,0.1318614929914474,-0.1263181120157242,0.0249524712562561,-0.1477261483669281,0.3236559033393860,0.0773291289806366,-0.1439673304557800,-0.2005890905857086,0.0892757251858711,0.0398719944059849,0.3675192892551422) * FEATURE2_texOff(vec2(1,-1)); +res += mat4(-0.0193535499274731,-0.2256918102502823,0.0341436080634594,0.0795947611331940,0.1496857404708862,-0.2784725725650787,-0.0582313314080238,-0.2786065340042114,-0.1666128039360046,-0.6534121036529541,0.2695854306221008,-0.0179719906300306,0.0015976354479790,0.0139929885044694,-0.1706486046314240,-0.3274765610694885) * FEATURE1_texOff(vec2(1,0)); +res += mat4(-0.7170836329460144,0.0868831276893616,0.1829078495502472,-0.0076045366004109,0.1525912433862686,-0.2558896839618683,0.0893209800124168,-0.3426039516925812,-0.2871107757091522,-0.2445062994956970,0.1676304638385773,0.2116415053606033,0.0883995518088341,-0.3880331516265869,0.2636835277080536,-0.2514505982398987) * FEATURE2_texOff(vec2(1,0)); +res += mat4(-0.1861270815134048,0.2000686377286911,-0.1501186788082123,0.1525203883647919,0.1969228833913803,0.1174068301916122,-0.1281060427427292,-0.0854888409376144,0.0290613435208797,-0.0538076497614384,-0.0251582786440849,0.0692845508456230,0.0384319014847279,0.2888138592243195,0.1151804402470589,0.0990421250462532) * FEATURE1_texOff(vec2(1,1)); +res += mat4(-0.0344385802745819,0.1270371377468109,0.0922426953911781,-0.0426749102771282,-0.1656492203474045,-0.3273328542709351,-0.0282224025577307,0.1099396124482155,-0.1113230437040329,0.2943290174007416,-0.2181112915277481,-0.3177657723426819,-0.1096536740660667,-0.0508293099701405,-0.0256164856255054,-0.0388228967785835) * FEATURE2_texOff(vec2(1,1)); +res = max(res, vec4(0.0)) + vec4(0.7142407894134521,0.0686190053820610,0.3999933302402496,-1.0247212648391724) * min(res, vec4(0.0)); +return res; +} + +//!HOOK LUMA +//!WHEN OUTPUT.w LUMA.w / 1.300 > OUTPUT.h LUMA.h / 1.300 > * +//!DESC mapping 2_1 +//!BIND MODEL21 +//!BIND MODEL22 +//!SAVE MODEL1 +//!COMPONENTS 4 +vec4 hook() +{ +vec4 res = vec4(0.0203563515096903,0.1902436912059784,-0.0757935121655464,0.0393617525696754); +res += mat4(-0.1080558672547340,-0.0400269515812397,0.1042881682515144,-0.1994346678256989,0.0172465778887272,-0.0829331055283546,-0.1278677284717560,-0.0762506872415543,-0.0593080408871174,-0.0305212251842022,0.1326192617416382,-0.3380933105945587,-0.0722763314843178,-0.1975518912076950,-0.0223602931946516,0.2251029163599014) * MODEL21_texOff(vec2(-1,-1)); +res += mat4(0.1747678220272064,0.0297168865799904,0.1054855734109879,0.0803295820951462,-0.0338115766644478,-0.3885377943515778,-0.3540246784687042,-0.0719623491168022,-0.0656022280454636,-0.0469004511833191,0.1379419565200806,0.0319863893091679,0.0799935683608055,-0.0099127553403378,0.1698455959558487,-0.0108015276491642) * MODEL22_texOff(vec2(-1,-1)); +res += mat4(0.1587898135185242,0.3995443880558014,-0.0333226583898067,0.2373267263174057,-0.1616930961608887,0.0659186244010925,0.0141129801049829,-0.0541022196412086,-0.5743742585182190,0.1121487766504288,0.4259817600250244,0.0280795227736235,-0.3721714317798615,-0.3496374189853668,0.0997273251414299,-0.0079920450225472) * MODEL21_texOff(vec2(-1,0)); +res += mat4(0.0928084030747414,0.3107658624649048,0.1375299990177155,0.1550617516040802,-0.0780353918671608,-0.0102957757189870,-0.2056752145290375,-0.3927979469299316,-1.2112152576446533,0.0213295854628086,0.1396545022726059,0.0492016039788723,-0.0569122135639191,-0.1691886335611343,-0.1535325646400452,0.2800904810428619) * MODEL22_texOff(vec2(-1,0)); +res += mat4(0.2494744062423706,-0.0363066755235195,0.0959179550409317,-0.0048101749271154,-0.0195793900638819,0.0451166369020939,0.1470773071050644,-0.0050059854984283,0.2886958122253418,-0.3221147954463959,-0.7062104344367981,0.1646659970283508,-0.0092520527541637,-0.1254461258649826,0.0217506736516953,-0.0678806379437447) * MODEL21_texOff(vec2(-1,1)); +res += mat4(-0.0686557441949844,-0.0414490625262260,-0.1855954080820084,0.0264346338808537,-0.0296857114881277,-0.0431593284010887,0.0669397041201591,-0.0946076661348343,-0.2036914378404617,-0.1336101740598679,-0.2099903970956802,-0.1327936947345734,-0.1002155169844627,-0.0368575826287270,-0.1660962998867035,0.0728288888931274) * MODEL22_texOff(vec2(-1,1)); +res += mat4(0.5504320859909058,0.2939232587814331,0.4704743027687073,0.2129514217376709,0.0843106731772423,-0.1978624463081360,-0.3298224806785583,0.1919094175100327,0.1980742365121841,-0.0644423812627792,0.0091170109808445,-0.2124856859445572,0.0804558470845222,-0.1130188927054405,-0.6276652812957764,0.1861163526773453) * MODEL21_texOff(vec2(0,-1)); +res += mat4(-0.3357668519020081,0.2093413323163986,0.4355416595935822,0.1550502777099609,-0.6510964035987854,-0.1751857399940491,-0.2060168534517288,-0.1710205078125000,-0.1202360317111015,-0.2500316798686981,0.1074745431542397,-0.2418434321880341,0.0133954072371125,-0.0555886104702950,0.1514673978090286,0.2739115655422211) * MODEL22_texOff(vec2(0,-1)); +res += mat4(-0.3006273508071899,-0.2699472010135651,-0.1982013583183289,-0.0032952548936009,0.0307833012193441,0.3671586215496063,-0.0966020002961159,-0.2836556434631348,0.4297264218330383,0.6171903610229492,0.6723483800888062,0.2705117464065552,-0.1438141316175461,-0.0873940736055374,-0.7001031041145325,-0.2052250355482101) * MODEL21_texOff(vec2(0,0)); +res += mat4(-0.2875024676322937,-1.6230558156967163,-0.6733398437500000,-0.9642448425292969,-0.1964960694313049,0.2485812455415726,0.1236900389194489,-1.1423941850662231,-0.0412602946162224,0.3412002623081207,0.3962794244289398,-0.2490761876106262,-0.0058065578341484,-0.4578708708286285,-0.2418260127305984,0.5357795953750610) * MODEL22_texOff(vec2(0,0)); +res += mat4(0.0062361713498831,0.1925230026245117,0.0824977159500122,0.0561275146901608,0.0929671525955200,0.0698546022176743,0.3816939592361450,0.0395248420536518,-0.0719512030482292,0.0564917400479317,-0.1297784000635147,0.1245511695742607,0.0012355837970972,-0.0990515723824501,0.4213519692420959,-0.1645816713571548) * MODEL21_texOff(vec2(0,1)); +res += mat4(-0.0611936338245869,-0.0220258161425591,-0.0040935277938843,-0.1060328409075737,-0.0583154149353504,-0.0171997752040625,0.1058546081185341,0.2793170809745789,-0.2339317053556442,-0.1972009539604187,-0.0600687190890312,-0.0684379041194916,0.0243016034364700,-0.2111079394817352,-0.2042971849441528,0.0724857896566391) * MODEL22_texOff(vec2(0,1)); +res += mat4(-0.0833447948098183,-0.0533220991492271,0.0767802372574806,0.1182348504662514,-0.0223299078643322,-0.0479344800114632,-0.0119727496057749,0.0524821877479553,-0.0334780365228653,0.0719002187252045,0.0439689308404922,0.0475181229412556,0.0764308497309685,0.0086713796481490,-0.1700707823038101,0.0657354295253754) * MODEL21_texOff(vec2(1,-1)); +res += mat4(0.1391696482896805,0.0739523395895958,0.0565792545676231,-0.0430364646017551,0.0943084582686424,0.0102064209058881,0.0120795257389545,-0.0841303989291191,0.1573246121406555,0.0164279472082853,0.0988841354846954,-0.1430613398551941,-0.0572808869183064,-0.0844292491674423,0.0621565617620945,0.0923799052834511) * MODEL22_texOff(vec2(1,-1)); +res += mat4(-0.1223107874393463,-0.2441930323839188,-0.2410650849342346,-0.0162935722619295,0.0695567727088928,-0.0028583710081875,-0.0059417244046926,0.0715164169669151,-0.0668491795659065,-0.1499572396278381,0.0869924053549767,0.0553652904927731,0.2729566097259521,0.1370039582252502,-0.1282183527946472,-0.1451860070228577) * MODEL21_texOff(vec2(1,0)); +res += mat4(0.1331952214241028,0.0021079662255943,-0.1116734445095062,-0.4168601930141449,0.0534659475088120,0.0037860786542296,-0.0366065911948681,0.1047701835632324,0.1491260826587677,0.0782341659069061,0.0949895009398460,-0.1160908639431000,-0.1057133302092552,-0.2699718773365021,-0.1193305626511574,0.2142304331064224) * MODEL22_texOff(vec2(1,0)); +res += mat4(0.0041565205901861,-0.1065499857068062,-0.0629659667611122,-0.1144768893718719,0.0318886637687683,-0.0562519319355488,0.0043422472663224,0.0226082988083363,-0.1456198990345001,-0.2398656159639359,-0.2625046670436859,-0.0710547044873238,0.0067904205061495,0.0018544088816270,0.1019348874688148,-0.0186133962124586) * MODEL21_texOff(vec2(1,1)); +res += mat4(0.0732532218098640,0.1516859829425812,0.0580205544829369,0.1968977004289627,-0.0066619524732232,-0.1597842127084732,-0.0990600511431694,-0.1059188917279243,0.0718481168150902,-0.2222738713026047,-0.1675696671009064,-0.1500017195940018,-0.0568779110908508,-0.0582777932286263,-0.0844587534666061,-0.0263266414403915) * MODEL22_texOff(vec2(1,1)); +res = max(res, vec4(0.0)) + vec4(-0.2459529191255569,0.7563464641571045,-0.0705636814236641,-0.0094820559024811) * min(res, vec4(0.0)); +return res; +} + +//!HOOK LUMA +//!WHEN OUTPUT.w LUMA.w / 1.300 > OUTPUT.h LUMA.h / 1.300 > * +//!DESC mapping 2_2 +//!BIND MODEL21 +//!BIND MODEL22 +//!SAVE MODEL2 +//!COMPONENTS 4 +vec4 hook() +{ +vec4 res = vec4(-0.0448397286236286,-0.1649267971515656,-0.1192543581128120,-0.0061073559336364); +res += mat4(0.0724840760231018,-0.0480341166257858,-0.1082391515374184,-0.1447021961212158,0.0723197236657143,0.0481830574572086,0.0009448126656935,0.0353565886616707,-0.0653375908732414,0.0029647622723132,-0.0016588598955423,-0.2075651884078979,0.0403469167649746,0.3929971158504486,0.0342363268136978,0.1427230089902878) * MODEL21_texOff(vec2(-1,-1)); +res += mat4(-0.0743464827537537,0.1844420731067657,0.0256296340376139,-0.2808582782745361,0.0351609662175179,0.3277008235454559,-0.0205841138958931,-0.5355809330940247,0.0681906566023827,0.2058052271604538,-0.0479847639799118,-0.3735262751579285,-0.0261550359427929,-0.1148884072899818,-0.2329017966985703,0.0728458985686302) * MODEL22_texOff(vec2(-1,-1)); +res += mat4(-0.1236097738146782,0.1251334398984909,-0.1339431256055832,0.0198749266564846,-0.1325920224189758,-2.2431972026824951,-0.0680834427475929,-0.5671764612197876,-0.3431925177574158,-0.0983135104179382,-0.2207138091325760,-0.2374879121780396,0.0127309206873178,1.3076044321060181,0.0848151743412018,-0.1928595900535583) * MODEL21_texOff(vec2(-1,0)); +res += mat4(-0.0471093133091927,-0.1513628512620926,-0.0134263765066862,-0.1519252359867096,-0.5260242223739624,0.2291621714830399,0.4088975787162781,-0.4315340518951416,0.0933236032724380,-1.0386694669723511,0.0015958193689585,-0.2737887501716614,-0.0246253963559866,-0.2722961604595184,-0.1770633459091187,-0.2291279733181000) * MODEL22_texOff(vec2(-1,0)); +res += mat4(-0.0017552347853780,0.1903935521841049,-0.0740704238414764,-0.0917679518461227,0.0323882810771465,-0.3029108047485352,0.0532565414905548,-0.0651542618870735,0.4868686199188232,0.8539272546768188,0.4151960313320160,0.2619662582874298,-0.0413270294666290,0.1404227763414383,0.1027320474386215,0.3274228572845459) * MODEL21_texOff(vec2(-1,1)); +res += mat4(0.1828346252441406,0.0274682324379683,-0.1169882863759995,0.0327291004359722,0.1786244213581085,-0.6569546461105347,-0.0609031207859516,-0.1676601022481918,-0.1481092721223831,0.2889067530632019,0.1246089115738869,0.2203597426414490,-0.0366856977343559,0.1539470851421356,0.0069492300972342,-0.1544002443552017) * MODEL22_texOff(vec2(-1,1)); +res += mat4(0.2073992937803268,-0.0717074573040009,-0.0196173377335072,-0.0956910699605942,0.0728898122906685,0.0484567955136299,0.3063069283962250,-0.3200540542602539,0.0291527546942234,-0.0265460256487131,0.1168476045131683,-0.2479970753192902,0.1224220171570778,0.0745823010802269,0.1868897676467896,-0.1958049237728119) * MODEL21_texOff(vec2(0,-1)); +res += mat4(0.0019954447634518,-0.0225235987454653,0.0812198966741562,0.0295672398060560,-0.2016931176185608,-0.2239151000976562,-0.2481262385845184,-0.2381946444511414,-0.0520484372973442,-0.1200495883822441,0.2121954560279846,-0.1573531329631805,-0.0198472067713737,0.1001087054610252,-0.1084884032607079,-0.3126969039440155) * MODEL22_texOff(vec2(0,-1)); +res += mat4(0.3838330209255219,0.1678779572248459,0.6496244072914124,0.3783606290817261,-0.2198582738637924,-0.2351343184709549,-0.2852248847484589,0.6310021877288818,0.8083020448684692,0.0039323624223471,-0.0901831910014153,0.0797894075512886,-0.2271467447280884,0.7082978487014771,0.1513756662607193,0.2188975960016251) * MODEL21_texOff(vec2(0,0)); +res += mat4(-0.2871031761169434,0.2316448241472244,0.4947948157787323,0.3308620452880859,-0.0623455122113228,-0.1314185708761215,-0.2664661705493927,0.8725078701972961,0.4541083276271820,0.1433589160442352,-1.1269453763961792,0.6427971124649048,-0.1016561388969421,0.3418317139148712,-0.0991155728697777,-1.0508837699890137) * MODEL22_texOff(vec2(0,0)); +res += mat4(-0.2179604172706604,0.1258949041366577,-0.1155700981616974,-0.0536149404942989,-0.0140614463016391,-0.0091438721865416,-0.0501774959266186,-0.3570724725723267,-0.5832386016845703,0.2004123181104660,0.2986239194869995,-0.8139168024063110,0.0142666567116976,0.0681498944759369,0.1293468028306961,-0.1001938357949257) * MODEL21_texOff(vec2(0,1)); +res += mat4(0.1952836811542511,-0.3092494010925293,0.3063779771327972,0.1934849917888641,0.0746696740388870,-0.3533902466297150,-0.1269576102495193,-0.2237875163555145,0.2470717132091522,-0.2640363574028015,-0.2862776815891266,0.1740108281373978,-0.0963631942868233,0.2631850540637970,0.0400718413293362,-0.3590607047080994) * MODEL22_texOff(vec2(0,1)); +res += mat4(-0.5299927592277527,0.0979989692568779,0.1666737496852875,-0.1547524333000183,-0.0043443185277283,0.1540203243494034,0.0594348423182964,-0.0167275425046682,-0.1043610796332359,0.0504250898957253,0.0456700921058655,0.2525034546852112,0.2241353541612625,-0.1678503304719925,0.1532667279243469,0.2901742458343506) * MODEL21_texOff(vec2(1,-1)); +res += mat4(0.0998796448111534,0.0385462641716003,-0.0762400180101395,-0.1255892217159271,0.0281430184841156,-0.0304958485066891,-0.1440480053424835,-0.1001605167984962,-0.2257689833641052,0.2056092917919159,0.0248535349965096,-0.1383949518203735,-0.0951708629727364,0.0997417271137238,0.0275330394506454,-0.5728432536125183) * MODEL22_texOff(vec2(1,-1)); +res += mat4(0.4256163835525513,0.1745115518569946,-0.2409395426511765,0.3139856457710266,-0.0036795330233872,0.1819283962249756,-0.0864531323313713,0.0102691333740950,-0.3397279977798462,0.1107075437903404,-0.0035228815395385,-0.2207705229520798,-0.1779139339923859,-0.2106117755174637,0.0352664291858673,0.3615589439868927) * MODEL21_texOff(vec2(1,0)); +res += mat4(-0.0345224253833294,-0.0669926702976227,0.0907212942838669,-0.3758732676506042,-0.0452554710209370,-0.1134464666247368,-0.0358871109783649,-0.1858227252960205,-0.0233245138078928,-0.0495684742927551,0.1976234614849091,-0.1165761798620224,-0.0340447537600994,0.1095624342560768,0.0110175255686045,-0.8269239664077759) * MODEL22_texOff(vec2(1,0)); +res += mat4(-0.1379280686378479,0.1004267781972885,0.0723998174071312,-0.1510958224534988,0.0610648579895496,0.0451720170676708,-0.0231927260756493,-0.0251553766429424,0.2306085377931595,0.1033207178115845,-0.1316205114126205,0.1130664870142937,-0.0458516106009483,-0.1152514070272446,-0.0088650323450565,-0.0214479379355907) * MODEL21_texOff(vec2(1,1)); +res += mat4(-0.0545783303678036,-0.0620098188519478,0.0347074456512928,0.1096799224615097,0.0036664425861090,-0.0413107499480247,0.1443250179290771,-0.1161036714911461,-0.0061624986119568,-0.0252977479249239,0.3230019211769104,-0.2536626160144806,-0.0565439648926258,0.0827583819627762,-0.0071726376190782,-0.1983329951763153) * MODEL22_texOff(vec2(1,1)); +res = max(res, vec4(0.0)) + vec4(-0.6312188506126404,-0.1215368881821632,0.2487443536520004,0.4051703512668610) * min(res, vec4(0.0)); +return res; +} + +//!HOOK LUMA +//!WHEN OUTPUT.w LUMA.w / 1.300 > OUTPUT.h LUMA.h / 1.300 > * +//!DESC mapping 3_1 +//!BIND MODEL1 +//!BIND MODEL2 +//!SAVE MODEL21 +//!COMPONENTS 4 +vec4 hook() +{ +vec4 res = vec4(-0.0410279631614685,-0.1111723631620407,-0.0406232848763466,-0.0939496159553528); +res += mat4(0.1221675798296928,0.0083215842023492,-0.0162804014980793,0.0316714197397232,-0.2205813378095627,0.1500435769557953,0.2109555304050446,0.2741867899894714,0.0956874340772629,-0.0896854698657990,-0.1657065600156784,-0.1349759399890900,0.0601499564945698,-0.1523845940828323,-0.1828087568283081,-0.2727653682231903) * MODEL1_texOff(vec2(-1,-1)); +res += mat4(-0.0918163508176804,0.1564485579729080,0.1133174449205399,0.2215953171253204,-0.0623677000403404,-0.0497728772461414,-0.0372809022665024,-0.0258478187024593,-0.1364922970533371,0.1053884625434875,0.3292874991893768,0.2693256139755249,-0.0347631797194481,-0.1470523178577423,0.0096792401745915,-0.0542853325605392) * MODEL2_texOff(vec2(-1,-1)); +res += mat4(0.1331177949905396,-0.0964357852935791,-0.0706946700811386,0.1593225002288818,-0.4815943241119385,0.1224092170596123,-0.0870430991053581,0.0005010276800022,-0.0242684502154589,-0.2256436049938202,0.1367238312959671,0.0474774017930031,0.6886650323867798,-0.0065326127223670,0.1841574758291245,-0.1354993879795074) * MODEL1_texOff(vec2(-1,0)); +res += mat4(-0.1049591675400734,0.0515934228897095,0.1128631457686424,0.1688040047883987,-0.0084041170775890,-0.0006375144002959,-0.0598374009132385,0.1424416452646255,-0.0048398924991488,0.1832167655229568,0.0231959503144026,0.0816788375377655,-0.1321710795164108,0.0397678017616272,-0.0058345394209027,0.5784573554992676) * MODEL2_texOff(vec2(-1,0)); +res += mat4(0.1438693851232529,-0.0694608166813850,-0.0428275354206562,0.1599996536970139,-0.1651254445314407,0.1388883888721466,-0.0895452573895454,0.2569831907749176,0.3150432109832764,-0.0910519883036613,0.0367441214621067,0.1903669685125351,0.2805841267108917,-0.0444608181715012,0.0059385276399553,-0.2585869431495667) * MODEL1_texOff(vec2(-1,1)); +res += mat4(-0.1217494234442711,0.0191769022494555,-0.0065453462302685,0.1391217857599258,0.0998920649290085,-0.0162798929959536,0.0502282194793224,0.0370145924389362,0.0290782172232866,-0.0099554909393191,0.0142515478655696,0.1248661577701569,-0.0076912571676075,0.0251651499420404,0.2190572917461395,0.0020069130696356) * MODEL2_texOff(vec2(-1,1)); +res += mat4(0.2666685581207275,-0.1625511497259140,-0.3938800692558289,-0.0253848694264889,0.0987015441060066,0.2033616453409195,0.3128099143505096,0.4608893990516663,0.0620003379881382,-0.1389972567558289,-0.3095863461494446,-0.4023511111736298,-0.1105777546763420,0.1115406602621078,0.3639950752258301,0.0645622834563255) * MODEL1_texOff(vec2(0,-1)); +res += mat4(-0.2135885655879974,-0.1035343706607819,0.1795026361942291,0.1828210204839706,0.0780984908342361,0.0656728670001030,0.0033678691834211,0.1361345648765564,0.1712654232978821,-0.0172833092510700,-0.0502183400094509,0.2910411655902863,0.0691247656941414,0.1935720741748810,0.0652214139699936,0.1608240753412247) * MODEL2_texOff(vec2(0,-1)); +res += mat4(0.8243460655212402,-0.0979344248771667,-0.0366373993456364,0.1692261099815369,0.5517869591712952,0.3282494544982910,-0.7905511856079102,-0.4462923705577850,-0.0803156569600105,0.1172509342432022,0.1864327639341354,0.1471016854047775,0.1296005547046661,-0.1004103720188141,0.3174172043800354,-0.1181766316294670) * MODEL1_texOff(vec2(0,0)); +res += mat4(0.0259374529123306,-0.0934808850288391,0.3008874654769897,0.3957927823066711,-0.4048821926116943,0.1461934000253677,-0.1819096356630325,-0.1908810287714005,0.3193186521530151,-0.7438099980354309,0.1919509470462799,-0.2065188735723495,0.1752236187458038,-0.6840037107467651,0.1588519066572189,-0.3956064879894257) * MODEL2_texOff(vec2(0,0)); +res += mat4(0.1574442386627197,-0.0114925103262067,-0.1208277940750122,0.2058266401290894,0.2879209220409393,-0.0419875606894493,-0.1902059614658356,-0.2723863720893860,-0.1086223348975182,-0.0870924964547157,0.8605937957763672,0.2656622231006622,-0.1653763055801392,0.0816384851932526,-0.0137870563194156,0.1433854848146439) * MODEL1_texOff(vec2(0,1)); +res += mat4(-0.1565909236669540,-0.0307490080595016,-0.1055604666471481,0.2573592662811279,-0.1186821162700653,0.1141471788287163,-0.0272745657712221,-0.1049114838242531,0.2445316016674042,-0.0027864547446370,-0.1759569346904755,-0.1556979566812515,0.0550616309046745,0.1704383641481400,0.0853662937879562,0.3280856907367706) * MODEL2_texOff(vec2(0,1)); +res += mat4(0.1460669338703156,0.4202052652835846,-0.3638312816619873,-0.0958623066544533,-0.0492525361478329,-0.3664234280586243,0.0794373303651810,0.0399017669260502,0.0629198029637337,0.1662959158420563,-0.1001493930816650,-0.0587460733950138,-0.0396478697657585,0.0017320754704997,0.0314909480512142,-0.0202700830996037) * MODEL1_texOff(vec2(1,-1)); +res += mat4(-0.0964399129152298,0.0380319654941559,0.0396055467426777,0.0265473183244467,-0.0161637403070927,-0.1872924566268921,0.1670000404119492,0.0029466480482370,-0.1093841269612312,-0.3629201948642731,-0.0562992505729198,0.1792684197425842,-0.0203859098255634,0.0983991250395775,0.0058611719869077,0.1627455651760101) * MODEL2_texOff(vec2(1,-1)); +res += mat4(-0.1117974221706390,0.7562329173088074,-0.2046248912811279,0.1677842289209366,-0.2063486129045486,-0.6023545265197754,-0.5739209651947021,0.5110496878623962,-0.0715268924832344,-0.1373793482780457,0.1251420378684998,-0.0477442294359207,0.4961377978324890,0.2688887119293213,0.3146316707134247,-0.5197153687477112) * MODEL1_texOff(vec2(1,0)); +res += mat4(-0.1314805448055267,0.0746279135346413,0.3457699418067932,0.2564856410026550,0.0839370116591454,-0.6136511564254761,-0.4646295011043549,0.0612256154417992,-0.1910563558340073,-0.0935136750340462,-0.2426030039787292,0.2102959007024765,0.1575350016355515,0.6145061254501343,0.3368154168128967,-0.0974092856049538) * MODEL2_texOff(vec2(1,0)); +res += mat4(0.0565315335988998,0.2393359094858170,-0.0932938233017921,0.1555283814668655,0.0123879108577967,-0.1247719228267670,-0.0564610138535500,-0.1125799044966698,-0.0104600470513105,0.0482629500329494,0.2316472232341766,0.1083717569708824,-0.0525921434164047,0.0643989592790604,-0.0525734610855579,-0.0503251366317272) * MODEL1_texOff(vec2(1,1)); +res += mat4(-0.1835366338491440,0.0978360474109650,-0.1111819595098495,0.2109299153089523,0.0509372949600220,-0.1992686837911606,0.0677929744124413,-0.0870024710893631,-0.0412262082099915,-0.0697719156742096,-0.0967373847961426,0.0137308547273278,0.0195730421692133,0.0410240143537521,0.1157210171222687,0.2283479571342468) * MODEL2_texOff(vec2(1,1)); +res = max(res, vec4(0.0)) + vec4(0.1991519331932068,-0.1275756657123566,-0.0622864030301571,0.1586369574069977) * min(res, vec4(0.0)); +return res; +} + +//!HOOK LUMA +//!WHEN OUTPUT.w LUMA.w / 1.300 > OUTPUT.h LUMA.h / 1.300 > * +//!DESC mapping 3_2 +//!BIND MODEL1 +//!BIND MODEL2 +//!SAVE MODEL22 +//!COMPONENTS 4 +vec4 hook() +{ +vec4 res = vec4(-0.0089084329083562,-0.0336172059178352,0.0177190825343132,0.0529975406825542); +res += mat4(-0.0275970958173275,0.0141968233510852,0.1181544512510300,-0.0572245270013809,0.1161347925662994,-0.1156444773077965,-0.2549640238285065,0.0882879272103310,-0.0715355500578880,0.0151285668835044,0.1079384386539459,0.0650847703218460,-0.1597152203321457,0.0669793561100960,0.2084401696920395,-0.0951152443885803) * MODEL1_texOff(vec2(-1,-1)); +res += mat4(0.0404323227703571,-0.0206144321709871,-0.1080420613288879,-0.2038477361202240,0.0248847268521786,-0.0064681121148169,0.0389525443315506,0.0011026862775907,0.0885242074728012,0.0295896343886852,-0.3323790132999420,0.1935138553380966,-0.0466548874974251,0.1023886054754257,0.1257870644330978,-0.1541756242513657) * MODEL2_texOff(vec2(-1,-1)); +res += mat4(-0.0076520540751517,0.0361139886081219,0.1749804913997650,-0.2051989138126373,0.0022692133206874,-0.0282937753945589,-0.2039019316434860,-0.2343468815088272,-0.0357327871024609,-0.0570764988660812,0.2925858795642853,-0.1988349705934525,-0.0584560707211494,-0.0341510921716690,0.1300961822271347,0.5184492468833923) * MODEL1_texOff(vec2(-1,0)); +res += mat4(0.0884973928332329,0.0333527140319347,0.0180535931140184,-0.2655122876167297,0.0433661043643951,0.0104369185864925,0.0010909073753282,-0.0705273598432541,-0.0602585524320602,0.2420269846916199,-0.4731841087341309,-0.8040290474891663,0.3066828548908234,-0.2466925680637360,0.0938910692930222,-0.2002603262662888) * MODEL2_texOff(vec2(-1,0)); +res += mat4(0.0549152903258801,0.0291299298405647,0.0946277007460594,-0.0581608228385448,0.0669180899858475,-0.0635575056076050,-0.2427970170974731,-0.2677550315856934,0.2226776182651520,0.1301570236682892,-0.1519709974527359,0.0671724304556847,-0.0526433289051056,0.1898351758718491,0.2383745312690735,0.2191711813211441) * MODEL1_texOff(vec2(-1,1)); +res += mat4(-0.0234222635626793,0.0238620284944773,0.0427630320191383,-0.1080563366413116,0.0332126952707767,-0.0039051575586200,0.0293126031756401,0.0161924213171005,0.0453971028327942,0.0131999952718616,-0.0689036697149277,0.2349009960889816,0.1013344153761864,0.2706570029258728,0.1191426888108253,-0.2830821871757507) * MODEL2_texOff(vec2(-1,1)); +res += mat4(0.0181465242058039,-0.0571886636316776,0.4875229001045227,-0.4244020283222198,0.4331104159355164,0.1066712513566017,-0.5277034044265747,0.1110567077994347,-0.1179447323083878,-0.0273578558117151,0.1798476576805115,-0.2829602360725403,0.1012385115027428,-0.2528488039970398,0.1697608679533005,0.1121710017323494) * MODEL1_texOff(vec2(0,-1)); +res += mat4(-0.1404130905866623,-0.0984055623412132,-0.0279541295021772,-0.1321212500333786,-0.0841855704784393,0.1336171030998230,-0.1458790600299835,-0.0044095455668867,0.2203754037618637,0.1455714553594589,-0.2362042963504791,-0.0329121425747871,-0.1683547794818878,0.0289597529917955,0.3424547612667084,0.0143845872953534) * MODEL2_texOff(vec2(0,-1)); +res += mat4(0.0287246014922857,0.1948280781507492,0.5998955368995667,0.1192114129662514,-0.6269109249114990,0.8724324703216553,-0.6399638652801514,-0.4201497733592987,-0.3355066180229187,-0.1566904038190842,-0.4396412074565887,0.1525828838348389,0.5573399066925049,0.2324324846267700,0.2762884795665741,0.0406046211719513) * MODEL1_texOff(vec2(0,0)); +res += mat4(0.3890096545219421,-0.0574061162769794,-0.1468243300914764,-0.5953360199928284,-0.1363215148448944,-0.2224670499563217,-0.2237723320722580,0.2738097012042999,-0.4868114292621613,-0.5029351711273193,-0.3570256233215332,-0.1776263266801834,-0.0176672954112291,-0.4318660795688629,1.0395888090133667,0.1728395074605942) * MODEL2_texOff(vec2(0,0)); +res += mat4(0.1337304115295410,-0.0809440389275551,0.1600498855113983,-0.1108811497688293,-0.2376178801059723,-0.1532768607139587,-0.0447455830872059,0.2515332102775574,0.4848278462886810,-0.0915748402476311,-0.0336527302861214,-0.2141884714365005,0.2125129699707031,0.3237875998020172,0.0022272330243140,-0.0167857185006142) * MODEL1_texOff(vec2(0,1)); +res += mat4(0.0457934997975826,0.0510537698864937,-0.0519523508846760,-0.4506326615810394,-0.1029204949736595,0.0116113182157278,-0.1750748157501221,-0.0048758201301098,0.1506977379322052,0.0633068457245827,-0.1628549993038177,-0.0144928665831685,0.1408756822347641,0.2896180152893066,0.0803691521286964,-0.4930096566677094) * MODEL2_texOff(vec2(0,1)); +res += mat4(-0.0484248884022236,0.1371297985315323,-0.1235475391149521,-0.2618594765663147,-0.0280395895242691,0.0248795989900827,0.1204105168581009,0.3246576189994812,0.0426272377371788,-0.0520061068236828,0.0575957447290421,-0.2613646090030670,0.1165295541286469,-0.0390013493597507,-0.0470846109092236,-0.0014663023175672) * MODEL1_texOff(vec2(1,-1)); +res += mat4(-0.1066762879490852,-0.0869804695248604,-0.0099332248792052,-0.1355892717838287,-0.0760413780808449,0.1377770304679871,-0.0263407956808805,0.0880135521292686,0.1496269851922989,-0.0487459264695644,0.1286851912736893,0.2218491584062576,0.1723349541425705,-0.0165541302412748,-0.0690477639436722,-0.2388458102941513) * MODEL2_texOff(vec2(1,-1)); +res += mat4(-0.4236431121826172,0.0465179122984409,-0.1526456624269485,0.1426440477371216,0.5913932919502258,-0.1082349196076393,0.2731275856494904,-0.2687640488147736,-0.4628683030605316,-0.0537119321525097,-0.1597615629434586,0.0528527684509754,-0.3485085070133209,0.1395110934972763,0.0642972290515900,0.0323829315602779) * MODEL1_texOff(vec2(1,0)); +res += mat4(0.0066713397391140,-0.0482029877603054,-0.1707276403903961,-0.1001396998763084,0.0539822019636631,-0.1624453216791153,0.4913550019264221,0.3687861263751984,0.0491421781480312,0.1311376541852951,0.0992425829172134,-0.4636098444461823,-0.3415873646736145,-0.0153833786025643,-0.0270162131637335,-0.0935514941811562) * MODEL2_texOff(vec2(1,0)); +res += mat4(-0.1738258153200150,0.0458541549742222,-0.0653749182820320,-0.0156540926545858,-0.0357586294412613,-0.1486178338527679,0.1798035055398941,-0.1310307979583740,0.0783249065279961,-0.0261360015720129,-0.1047066971659660,0.3385537564754486,-0.0339452810585499,0.2299628853797913,-0.1408322304487228,-0.0352708548307419) * MODEL1_texOff(vec2(1,1)); +res += mat4(0.0463018082082272,0.0565674640238285,-0.0538956597447395,-0.2354862987995148,0.0297824125736952,0.0307939313352108,0.1271791011095047,-0.1025698855519295,0.1060482114553452,-0.0703211054205894,-0.0083062350749969,0.0474255047738552,0.0442508421838284,0.1569559425115585,-0.0442709513008595,-0.1188704669475555) * MODEL2_texOff(vec2(1,1)); +res = max(res, vec4(0.0)) + vec4(0.7366524934768677,1.0013850927352905,-0.0276311747729778,0.0734841898083687) * min(res, vec4(0.0)); +return res; +} + +//!HOOK LUMA +//!WHEN OUTPUT.w LUMA.w / 1.300 > OUTPUT.h LUMA.h / 1.300 > * +//!DESC mapping 4_1 +//!BIND MODEL21 +//!BIND MODEL22 +//!SAVE MODEL1 +//!COMPONENTS 4 +vec4 hook() +{ +vec4 res = vec4(-0.1306160986423492,-0.0808217376470566,-0.2880123555660248,0.0099629526957870); +res += mat4(-0.1033539846539497,0.0541300140321255,-0.0804840475320816,-0.0334571413695812,-0.0264753755182028,0.1118840202689171,0.1186013221740723,-0.0127575425431132,0.2236593365669250,0.0025286162272096,0.0985530614852905,0.0685181617736816,-0.1884875595569611,0.0530862808227539,-0.0482063069939613,0.0375233069062233) * MODEL21_texOff(vec2(-1,-1)); +res += mat4(0.1837068796157837,-0.0632847175002098,0.0016613919287920,0.0392861217260361,0.2923883199691772,-0.1713902205228806,0.1907587945461273,0.0550456829369068,0.0644215345382690,-0.1046456992626190,0.0187383033335209,0.0770180150866508,0.1933846622705460,-0.0455715768039227,0.0375007353723049,-0.1053109914064407) * MODEL22_texOff(vec2(-1,-1)); +res += mat4(-0.0972480997443199,0.2820451855659485,0.0114549007266760,-0.0954328626394272,0.0706252008676529,0.4829064607620239,-0.6371517181396484,0.0005180989392102,0.3280143439769745,0.0665246024727821,-0.0503116399049759,-0.1261110603809357,0.1114177703857422,-0.2053108513355255,0.1428771317005157,0.3926100134849548) * MODEL21_texOff(vec2(-1,0)); +res += mat4(-0.2571723163127899,0.1627264618873596,-0.4940335154533386,-0.1361546218395233,0.0804422944784164,-0.4231885373592377,0.0650202706456184,0.0518481098115444,-0.0502478554844856,-0.1305799931287766,0.1814480125904083,0.0090866927057505,-0.0510044656693935,-0.1691461503505707,0.0922467112541199,-0.0314207412302494) * MODEL22_texOff(vec2(-1,0)); +res += mat4(0.1270498335361481,0.0563284493982792,-0.0435525141656399,0.1569847911596298,0.0576847903430462,0.3461692929267883,-0.0325655154883862,-0.2688976824283600,-0.1341977864503860,-0.1382253766059875,0.2293784171342850,-0.1111817285418510,-0.1402447521686554,-0.3257531225681305,0.0598510466516018,0.1008039116859436) * MODEL21_texOff(vec2(-1,1)); +res += mat4(0.1698816716670990,0.3491003513336182,-0.1367681026458740,-0.1165873408317566,-0.2091718912124634,-0.1487034261226654,-0.0569749698042870,-0.2100717276334763,0.0404917001724243,-0.1372035890817642,0.0689046755433083,-0.0367818064987659,-0.0325474888086319,-0.0114965448155999,-0.0137249026447535,-0.0279692262411118) * MODEL22_texOff(vec2(-1,1)); +res += mat4(-0.0563433989882469,0.0132494345307350,-0.2434540390968323,0.0796563774347305,-0.2109155058860779,0.0387088693678379,-0.0591037571430206,0.0955820381641388,0.4660535752773285,-0.1204202473163605,0.1332369595766068,-0.0285425651818514,-0.3886952698230743,-0.0434980578720570,-0.0849134400486946,0.0802380964159966) * MODEL21_texOff(vec2(0,-1)); +res += mat4(0.0412235632538795,0.1571959257125854,0.2050069272518158,-0.1138664111495018,0.1962715685367584,0.0594439841806889,0.0351715497672558,-0.0129811102524400,0.2055217623710632,-0.0647534057497978,0.0373471938073635,0.0877277255058289,-0.5734645724296570,0.1188675239682198,-0.1145943328738213,-0.1182733029127121) * MODEL22_texOff(vec2(0,-1)); +res += mat4(-0.2004909217357635,-0.4817073047161102,0.5596802830696106,-0.0327854752540588,0.0989314392209053,0.4127818942070007,0.7265836596488953,-0.2692042589187622,0.5195841789245605,-0.2357539832592010,-0.3819393217563629,0.1755530238151550,0.6578183770179749,0.1075539961457253,-0.2688144743442535,0.3242723941802979) * MODEL21_texOff(vec2(0,0)); +res += mat4(-0.3221310675144196,0.2978510260581970,0.2269985526800156,-0.3184116482734680,0.4845580160617828,0.4407236874103546,0.0099756307899952,-0.3121858239173889,-0.3810067176818848,-0.0553649961948395,0.0202834140509367,0.0409953594207764,0.2532750964164734,0.2731618583202362,0.1237529441714287,0.0134243080392480) * MODEL22_texOff(vec2(0,0)); +res += mat4(0.1835541725158691,0.0549701862037182,-0.1749316602945328,-0.2030028849840164,0.0263462308794260,0.2781440317630768,0.0372458845376968,0.3643021881580353,-0.4047883749008179,0.0660117194056511,0.4863115549087524,-0.2024163603782654,-0.6403482556343079,0.2765505611896515,0.1417075097560883,0.5064445734024048) * MODEL21_texOff(vec2(0,1)); +res += mat4(0.6106975078582764,-0.1570862233638763,-0.3223383128643036,-0.2497926801443100,-0.4854303300380707,0.0132978223264217,-0.0609334111213684,0.1285556703805923,-0.1412864029407501,-0.1379042416810989,-0.0258826259523630,0.1357705891132355,-0.1285902857780457,-0.0577826797962189,0.0550044551491737,0.1717510819435120) * MODEL22_texOff(vec2(0,1)); +res += mat4(0.1389609426259995,0.0835867226123810,0.0309768319129944,-0.0278116948902607,-0.0390677824616432,-0.0111810686066747,-0.0025318188127130,0.0069569633342326,0.0347319357097149,0.0191543344408274,0.0314339138567448,-0.0228427499532700,0.0416300334036350,0.0249234102666378,0.1210031509399414,0.1142473593354225) * MODEL21_texOff(vec2(1,-1)); +res += mat4(0.0607251487672329,0.0386395826935768,-0.0219341218471527,-0.1102298423647881,0.1487188935279846,0.0602982006967068,-0.0280748903751373,-0.0211924221366644,0.0042894422076643,-0.0269144997000694,0.0814756453037262,-0.0314031280577183,-0.0213186051696539,-0.1362965404987335,0.0382767543196678,-0.0669511556625366) * MODEL22_texOff(vec2(1,-1)); +res += mat4(-0.2397561967372894,0.3023172020912170,-0.2398054003715515,0.0041919997893274,-0.1016605198383331,-0.1521034836769104,-0.1526568531990051,0.0272433310747147,0.0741761848330498,0.1116370111703873,0.1149727106094360,-0.0809784531593323,-0.1448147594928741,-0.0943927690386772,-0.0086280042305589,0.1243222951889038) * MODEL21_texOff(vec2(1,0)); +res += mat4(-0.0469366572797298,-0.1655988991260529,-0.1029584184288979,-0.1347874104976654,0.2064601778984070,0.0521226711571217,-0.1366733759641647,-0.0041872998699546,0.1077186539769173,0.0184442866593599,-0.2309073060750961,-0.1637075096368790,-0.0417953692376614,-0.3190860450267792,-0.1593534499406815,0.0136412177234888) * MODEL22_texOff(vec2(1,0)); +res += mat4(0.1698798984289169,0.0232755411416292,-0.0876034423708916,-0.3008348643779755,0.0789884999394417,0.0034748215693980,-0.0064704762771726,0.0057828431017697,-0.0190630126744509,-0.0334153175354004,-0.0195646341890097,0.0105131156742573,0.0995147302746773,-0.3130289018154144,-0.0724022984504700,0.0113303456455469) * MODEL21_texOff(vec2(1,1)); +res += mat4(-0.0027791252359748,-0.0193455871194601,-0.0415000133216381,0.0568981170654297,-0.2745247483253479,0.1222846284508705,0.1899162530899048,0.1067754998803139,-0.0561975166201591,-0.1500336527824402,0.0526139959692955,-0.3491798937320709,-0.0692384615540504,-0.0307095069438219,0.0498757846653461,0.0019003645284101) * MODEL22_texOff(vec2(1,1)); +res = max(res, vec4(0.0)) + vec4(0.1552927196025848,0.0782765746116638,0.7966942191123962,-1.1619627475738525) * min(res, vec4(0.0)); +return res; +} + +//!HOOK LUMA +//!WHEN OUTPUT.w LUMA.w / 1.300 > OUTPUT.h LUMA.h / 1.300 > * +//!DESC mapping 4_2 +//!BIND MODEL21 +//!BIND MODEL22 +//!SAVE MODEL2 +//!COMPONENTS 4 +vec4 hook() +{ +vec4 res = vec4(-0.1443098634481430,-0.1343899369239807,-0.0624338127672672,-0.1094277128577232); +res += mat4(-0.0689977407455444,-0.1693786680698395,0.0109281269833446,0.0609922930598259,0.0296908002346754,0.1195700988173485,-0.0694077461957932,0.0971287414431572,0.0253518298268318,0.1213042959570885,0.0703809782862663,0.0055739870294929,-0.1595942378044128,-0.1336689442396164,-0.0622441768646240,-0.0428023114800453) * MODEL21_texOff(vec2(-1,-1)); +res += mat4(0.0860001668334007,-0.0226618759334087,0.1602241247892380,0.0431661494076252,0.1526461094617844,0.2752982378005981,0.0960300788283348,-0.0536719262599945,-0.0171773489564657,0.0457364916801453,-0.0360932648181915,-0.0397153608500957,-0.0277090407907963,0.0729821547865868,-0.0145150292664766,0.0252893269062042) * MODEL22_texOff(vec2(-1,-1)); +res += mat4(-0.1407091915607452,-0.4007499516010284,-0.0302001200616360,-0.0606933943927288,-0.2960600554943085,-0.2263117432594299,0.0721478462219238,-0.4578711986541748,0.0960150733590126,-0.1606502830982208,0.2444226741790771,0.0000882153908606,0.1472496986389160,0.3256779909133911,-0.2132861614227295,0.0339313484728336) * MODEL21_texOff(vec2(-1,0)); +res += mat4(-0.1477648764848709,-0.1487885862588882,-0.1973863691091537,0.0717295333743095,0.0843430235981941,0.6259996294975281,-0.1214931011199951,-0.1274987608194351,0.2359549105167389,0.3002171218395233,-0.0825233608484268,-0.0157950688153505,0.0706149637699127,0.1762917637825012,-0.0611497573554516,-0.0859689489006996) * MODEL22_texOff(vec2(-1,0)); +res += mat4(0.0174895934760571,-0.0567042417824268,0.0409146919846535,0.0258173532783985,0.1421577036380768,0.1234543323516846,-0.1721662431955338,0.1492216140031815,0.1100751459598541,0.0501539446413517,0.1100447699427605,-0.1086079254746437,-0.0608497932553291,0.0087817469611764,0.0714464113116264,-0.1285197436809540) * MODEL21_texOff(vec2(-1,1)); +res += mat4(-0.0017177806003019,-0.1463395059108734,-0.1085453778505325,0.1650195866823196,0.0813829153776169,0.1102061793208122,-0.0578421875834465,-0.0232036896049976,-0.1239888817071915,0.0155465165153146,0.1079114526510239,-0.0420837886631489,-0.0775837749242783,0.0148941157385707,-0.0502299368381500,-0.0654754191637039) * MODEL22_texOff(vec2(-1,1)); +res += mat4(0.0918162539601326,0.0440697595477104,-0.0515748932957649,0.0417411290109158,0.0353216230869293,0.1535954177379608,0.0439723692834377,-0.1288845241069794,0.1076577678322792,-0.1306740194559097,0.0715952813625336,-0.0681907683610916,-0.3798767924308777,0.1023928597569466,-0.0970670804381371,0.0077168666757643) * MODEL21_texOff(vec2(0,-1)); +res += mat4(0.0634560957551003,-0.0550306066870689,0.2073986232280731,0.0520241297781467,0.1162287592887878,-0.2218665480613708,0.3199682831764221,0.0606246069073677,-0.0058511858806014,-0.0667045339941978,-0.0449917949736118,0.0707788690924644,-0.3323366343975067,-0.0763893201947212,-0.0997853428125381,-0.1181001588702202) * MODEL22_texOff(vec2(0,-1)); +res += mat4(-0.3101258873939514,0.2616009712219238,0.0584651045501232,0.1656491309404373,-0.0069236233830452,0.2573371529579163,-0.1793291717767715,-0.2718756198883057,0.0953581258654594,0.0524105131626129,0.1183085516095161,0.0583294369280338,0.5036848187446594,-0.5763167142868042,-0.2119628041982651,-0.3140562772750854) * MODEL21_texOff(vec2(0,0)); +res += mat4(-0.2497755438089371,-0.0146329319104552,-0.2741575539112091,0.2459975033998489,0.3562706708908081,-0.6528629064559937,-0.4287456274032593,0.2055913358926773,0.1739019453525543,-0.3855968713760376,-0.0958273336291313,-0.7066691517829895,0.2365748286247253,-0.3046728968620300,-0.2590373754501343,-0.0496727414429188) * MODEL22_texOff(vec2(0,0)); +res += mat4(-0.0844531357288361,-0.0321611948311329,-0.0951840654015541,0.0577518045902252,-0.1606003493070602,0.2776086628437042,-0.1355003118515015,-0.0880064144730568,-0.1277643740177155,-0.0514567233622074,0.1522682905197144,-0.1040910631418228,-0.2767944037914276,-0.1452194601297379,0.0089118303731084,0.0231996178627014) * MODEL21_texOff(vec2(0,1)); +res += mat4(0.2603267133235931,0.0167464651167393,-0.2064073234796524,0.1782064288854599,0.4890212416648865,0.0559245310723782,0.1221160590648651,-0.0202587731182575,-0.4056585729122162,-0.1839511841535568,0.2775998413562775,0.0024275144096464,-0.2624500989913940,-0.0619418807327747,0.0153478365391493,0.0123427547514439) * MODEL22_texOff(vec2(0,1)); +res += mat4(0.0816635638475418,-0.0134946266189218,0.0594766475260258,-0.0551253929734230,0.0134431896731257,-0.0652195811271667,-0.0563635528087616,-0.0066532371565700,-0.0004114551993553,0.0105680683627725,0.1324467360973358,0.0467248968780041,0.0301312971860170,-0.1073397025465965,-0.0363437235355377,-0.0474153012037277) * MODEL21_texOff(vec2(1,-1)); +res += mat4(0.0199097190052271,0.0901319086551666,0.0448978282511234,0.0505443066358566,0.0438878424465656,-0.0494784042239189,0.0724927335977554,-0.0070675504393876,-0.0012125011999160,0.0295279901474714,0.0705125033855438,0.0555334389209747,-0.0403393507003784,-0.1271172016859055,0.0017914215568453,0.1462216079235077) * MODEL22_texOff(vec2(1,-1)); +res += mat4(-0.2827299833297729,0.2052399665117264,0.0042732120491564,-0.3969024717807770,-0.0782120972871780,0.1960176974534988,-0.0675340741872787,0.0027962317690253,0.0516129024326801,-0.0352642722427845,0.0546326488256454,0.0065340655855834,-0.1062376946210861,0.1364430636167526,-0.0536947809159756,0.2098117172718048) * MODEL21_texOff(vec2(1,0)); +res += mat4(0.0045875865034759,0.2162927240133286,-0.2158576399087906,-0.0047327815555036,0.1251590698957443,0.1279677897691727,-0.1188964918255806,0.0328494384884834,0.0076038073748350,-0.0561547242105007,0.0335608273744583,0.4332321286201477,0.0021786799188703,0.0844521671533585,-0.2102309316396713,-0.0189208015799522) * MODEL22_texOff(vec2(1,0)); +res += mat4(0.0933093801140785,0.1548244059085846,-0.0598701611161232,0.0357220247387886,-0.1141726672649384,0.0536412484943867,-0.0159156844019890,-0.0445508137345314,0.1883231997489929,-0.1547038406133652,0.0530619807541370,0.0059371814131737,0.0602529086172581,-0.0435577929019928,0.0083390390500426,0.0191930737346411) * MODEL21_texOff(vec2(1,1)); +res += mat4(-0.0351041629910469,0.2119503468275070,-0.0841927304863930,0.0079463515430689,0.0683520361781120,-0.1657009869813919,0.0611055232584476,-0.0063667562790215,0.0330024957656860,-0.1810818463563919,0.0872574150562286,0.1485669612884521,-0.1305806934833527,0.0041402997449040,0.0223289318382740,-0.0141495745629072) * MODEL22_texOff(vec2(1,1)); +res = max(res, vec4(0.0)) + vec4(0.5769761204719543,0.1716064810752869,-0.0821026712656021,0.2092144042253494) * min(res, vec4(0.0)); +return res; +} + +//!HOOK LUMA +//!WHEN OUTPUT.w LUMA.w / 1.300 > OUTPUT.h LUMA.h / 1.300 > * +//!DESC sub-band residuals 1 +//!BIND MODEL1 +//!BIND MODEL2 +//!BIND FEATURE1 +//!SAVE RES1 +//!COMPONENTS 4 +vec4 hook() +{ +vec4 res = vec4(0.0245648548007011,-0.4467784762382507,0.0197526942938566,-0.0110000418499112); +res += mat4(0.0302665308117867,-0.9262221455574036,-0.1161134764552116,-0.0506900474429131,0.2716045379638672,-0.0485871583223343,0.0044713355600834,-0.4274623394012451,0.0749531090259552,-0.3700785338878632,0.0350039415061474,-0.0540786534547806,-0.0607390031218529,-0.8019900321960449,0.0923245251178741,0.1258827745914459) * MODEL1_texOff(0); +res += mat4(-0.0649135261774063,0.0815236791968346,0.0067334296181798,0.1277425885200500,-0.0051357815973461,-0.1485908329486847,0.0074226572178304,0.0050623500719666,0.0588018335402012,-0.0692552924156189,0.1288725286722183,-0.0989386290311813,0.0427936837077141,0.0967708528041840,-0.0455632135272026,-0.0711275041103363) * MODEL2_texOff(0); +res += FEATURE1_texOff(0); +res = max(res, vec4(0.0)) + vec4(0.9927186965942383,0.0570580027997494,1.3226752281188965,1.0069466829299927) * min(res, vec4(0.0)); +return res; +} + +//!HOOK LUMA +//!WHEN OUTPUT.w LUMA.w / 1.300 > OUTPUT.h LUMA.h / 1.300 > * +//!DESC sub-band residuals 2 +//!BIND MODEL1 +//!BIND MODEL2 +//!BIND FEATURE2 +//!SAVE RES2 +//!COMPONENTS 4 +vec4 hook() +{ +vec4 res = vec4(-0.0425243787467480,-0.3715015351772308,-0.0256227850914001,-0.2774516046047211); +res += mat4(0.0238118842244148,0.0295480657368898,-0.0066418983042240,0.1021223962306976,-0.0568209178745747,-0.4355100393295288,-0.2700522541999817,-0.2060186564922333,-0.0689613372087479,-0.1689691990613937,-0.0306748505681753,-0.2461252212524414,-0.0057375836186111,-0.1892303228378296,-0.0285871494561434,-0.5032613277435303) * MODEL1_texOff(0); +res += mat4(0.5463213324546814,0.0972800329327583,0.0307560767978430,0.0678058937191963,-0.0356063023209572,-0.7013865113258362,0.1890443563461304,-0.1036657467484474,-0.1745826154947281,-0.2942218780517578,-0.0485423319041729,-0.2983124554157257,-0.0524431839585304,-0.3261034786701202,0.3217246532440186,0.1958018541336060) * MODEL2_texOff(0); +res += FEATURE2_texOff(0); +res = max(res, vec4(0.0)) + vec4(0.1391339898109436,0.0960328355431557,0.6235341429710388,0.1177272796630859) * min(res, vec4(0.0)); +return res; +} + +//!HOOK LUMA +//!WHEN OUTPUT.w LUMA.w / 1.300 > OUTPUT.h LUMA.h / 1.300 > * +//!DESC sub-pixel convolution 1 +//!BIND RES1 +//!BIND RES2 +//!SAVE SUBCONV1 +//!COMPONENTS 4 +vec4 hook() +{ +vec4 res = vec4(0.2010385394096375,0.2058132737874985,0.1918809115886688,0.1961363703012466); +res += mat4x4(-0.0005980331334285,-0.0095877395942807,-0.0149448839947581,-0.0026380482595414,0.0320665836334229,-0.0706205591559410,-0.0054677254520357,0.0215112231671810,-0.0025710910558701,-0.0000433265340689,0.0044494951143861,-0.0034823501482606,-0.0050858515314758,0.0109513988718390,0.0208286065608263,-0.0032168829347938) * RES1_texOff(vec2(-1,-1)); +res += mat4x4(-0.0145305208861828,0.0246876608580351,-0.0038286084309220,-0.0033089490607381,-0.0920709222555161,-0.0767898634076118,0.0012083095498383,-0.0751532614231110,0.0001302754972130,-0.0107085108757019,-0.0010383903281763,-0.0059571005403996,0.0809685289859772,0.0414833538234234,0.0227938480675220,-0.0211347509175539) * RES2_texOff(vec2(-1,-1)); +res += mat4x4(0.0160999298095703,0.0364215746521950,-0.0377063788473606,-0.0449111759662628,-0.0476365163922310,0.1522845029830933,-0.0131391752511263,-0.0476671792566776,-0.0378389135003090,0.0235454943031073,0.0224007442593575,-0.0010372076649219,-0.0089435689151287,-0.0293026417493820,0.0274190884083509,0.0469092652201653) * RES1_texOff(vec2(-1,0)); +res += mat4x4(0.0297575183212757,-0.0132508194074035,-0.0044682323932648,-0.0096222748979926,0.2525918781757355,0.1873829364776611,-0.5599535703659058,-0.2372044622898102,0.0033207221422344,0.0256173480302095,0.0294605866074562,0.0323960892856121,-0.1679904460906982,-0.1278967708349228,0.3168168365955353,0.1978507637977600) * RES2_texOff(vec2(-1,0)); +res += mat4x4(-0.0047590560279787,-0.0149335600435734,0.0033453819341958,-0.0012247267877683,0.1112466752529144,0.0147760482504964,0.0031189601868391,0.0391573049128056,-0.0028154491446912,-0.0036881719715893,-0.0116015253588557,-0.0037573333829641,0.0047581391409039,0.0071071563288569,-0.0033221673220396,0.0004882142529823) * RES1_texOff(vec2(-1,1)); +res += mat4x4(-0.0025197160430253,-0.0018677815096453,0.0038254233077168,0.0041981274262071,-0.1321131736040115,-0.0494364202022552,0.0760654658079147,-0.1386690139770508,-0.0016222692793235,-0.0060105528682470,0.0010201989207417,0.0092753591015935,-0.0194614846259356,0.0087382243946195,-0.0606758072972298,0.0156162241473794) * RES2_texOff(vec2(-1,1)); +res += mat4x4(-0.0073722628876567,0.0012844242155552,0.0241398401558399,-0.0075527969747782,-0.0865194946527481,-0.0610522404313087,0.0289319511502981,-0.0994452014565468,0.0281447004526854,-0.0250582899898291,0.0044891634024680,-0.0246205236762762,0.0112307453528047,-0.0010844616917893,-0.0223584957420826,0.0177635718137026) * RES1_texOff(vec2(0,-1)); +res += mat4x4(-0.0585863515734673,0.0953190475702286,-0.0555586628615856,0.1033507287502289,0.1560877263545990,-0.0690897777676582,-0.0341389514505863,-0.0661668032407761,0.0531073249876499,-0.0266165956854820,-0.0203275382518768,0.0017760475166142,-0.1300747394561768,0.1810652017593384,0.0381597876548767,0.1397419273853302) * RES2_texOff(vec2(0,-1)); +res += mat4x4(0.6259804368019104,0.6062518954277039,0.5450409054756165,0.5966195464134216,-0.0423948727548122,0.0760537460446358,-0.0113651463761926,0.3007817566394806,-0.3218322694301605,0.2713021934032440,-0.3143473267555237,0.2303840517997742,0.3493050038814545,0.3590726852416992,0.4138027429580688,0.3391666412353516) * RES1_texOff(vec2(0,0)); +res += mat4x4(0.0790478289127350,-0.0978994593024254,0.0779844969511032,-0.0823706611990929,0.0094470111653209,0.1671760678291321,0.1201528310775757,-0.2016288936138153,0.3667598366737366,0.3651430010795593,-0.3612343966960907,-0.2978236973285675,-0.4231655597686768,0.0091423410922289,-0.1918412446975708,0.4224558770656586) * RES2_texOff(vec2(0,0)); +res += mat4x4(-0.0186564289033413,0.0274957418441772,-0.0064405309967697,0.0056951809674501,0.4864942431449890,-0.2563461959362030,0.4357284605503082,-0.2976118028163910,0.0374982468783855,0.0167757049202919,0.0305800959467888,0.0232830215245485,0.0138373551890254,-0.0191283021122217,0.0032355054281652,0.0055057541467249) * RES1_texOff(vec2(0,1)); +res += mat4x4(-0.0276355985552073,0.0048149987123907,-0.0251619722694159,-0.0057246969081461,0.0271473955363035,-0.0042668608948588,-0.0594691745936871,0.2255926281213760,-0.0203660242259502,0.0721646770834923,0.0137230781838298,-0.0650938376784325,-0.3049557507038116,0.2035628110170364,-0.2509683668613434,0.1962853819131851) * RES2_texOff(vec2(0,1)); +res += mat4x4(0.0109980758279562,-0.0053752651438117,-0.0112550277262926,0.0024017230607569,0.0362104885280132,0.0084348218515515,-0.0106990104541183,-0.0207723993808031,-0.0014961160486564,0.0066790678538382,0.0028113177977502,0.0025022011250257,-0.0093937022611499,0.0016421369509771,0.0035362334456295,-0.0058064293116331) * RES1_texOff(vec2(1,-1)); +res += mat4x4(0.0138889988884330,-0.0078343702480197,0.0061464929021895,0.0202130675315857,-0.0257590841501951,-0.0366640128195286,0.0250097587704659,-0.0498071312904358,-0.0103149358183146,-0.0001786737266229,-0.0099909817799926,0.0062733208760619,0.0131437368690968,-0.0005469865864143,-0.0388854071497917,0.0612070746719837) * RES2_texOff(vec2(1,-1)); +res += mat4x4(0.0052813654765487,0.0215748809278011,0.0107395220547915,-0.0079439217224717,0.0382786765694618,0.0697424262762070,-0.0415962152183056,0.0657853558659554,0.0209470037370920,-0.0218399092555046,-0.0447359494864941,0.0407319553196430,-0.0040902681648731,-0.0196106657385826,-0.0018554026028141,0.0203906055539846) * RES1_texOff(vec2(1,0)); +res += mat4x4(-0.0106181986629963,0.0084018819034100,0.0131329754367471,-0.0198754761368036,0.1117177084088326,0.0990846082568169,-0.0732304081320763,0.0163581725209951,-0.0648830309510231,-0.0451613292098045,0.0206844564527273,0.0031441387254745,-0.0106161693111062,-0.0567689687013626,0.0782861113548279,-0.0306094046682119) * RES2_texOff(vec2(1,0)); +res += mat4x4(0.0012452082009986,-0.0026056850329041,-0.0096226977184415,-0.0037850935477763,-0.0190967041999102,0.0534373670816422,0.1599360853433609,0.0834670960903168,-0.0070255175232887,0.0012873009545729,0.0030876772943884,-0.0093916896730661,-0.0033529615029693,0.0043485122732818,0.0089034689590335,-0.0067489291541278) * RES1_texOff(vec2(1,1)); +res += mat4x4(0.0004713654634543,-0.0034161377698183,-0.0026913962792605,0.0053522582165897,-0.0040974905714393,0.0273330621421337,-0.0333138220012188,-0.0701237097382545,0.0082997502759099,-0.0183656588196754,-0.0122841577976942,-0.0052855615504086,-0.0023795007728040,-0.0438593104481697,-0.1101513057947159,-0.0182559806853533) * RES2_texOff(vec2(1,1)); +return vec4(res); +} + +//!HOOK LUMA +//!WHEN OUTPUT.w LUMA.w / 1.300 > OUTPUT.h LUMA.h / 1.300 > * +//!WIDTH LUMA.w 2 * +//!HEIGHT LUMA.h 2 * +//!DESC aggregation +//!BIND SUBCONV1 +vec4 hook() +{ +vec2 fcoord = fract(SUBCONV1_pos * SUBCONV1_size); +vec2 base = SUBCONV1_pos + (vec2(0.5) - fcoord) * SUBCONV1_pt; +ivec2 index = ivec2(fcoord * vec2(2)); +vec4 res = SUBCONV1_tex(base); +return vec4(res[index.x * 2 + index.y], 0, 0, 1); +} diff --git a/app/src/shaders/third_party/LICENSE-FidelityFX-FSR.txt b/app/src/shaders/third_party/LICENSE-FidelityFX-FSR.txt new file mode 100644 index 0000000..324cba5 --- /dev/null +++ b/app/src/shaders/third_party/LICENSE-FidelityFX-FSR.txt @@ -0,0 +1,19 @@ +Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved. + +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. diff --git a/app/src/shaders/third_party/README.md b/app/src/shaders/third_party/README.md new file mode 100644 index 0000000..f537360 --- /dev/null +++ b/app/src/shaders/third_party/README.md @@ -0,0 +1,12 @@ +# Third-party shader code + +Used by the Picture settings (picture enhancement passes). + +| File | From | License | +|---|---|---| +| `ffx_a.h`, `ffx_fsr1.h` | AMD FidelityFX Super Resolution 1, https://github.com/GPUOpen-Effects/FidelityFX-FSR (`ffx-fsr/`) | MIT, see `LICENSE-FidelityFX-FSR.txt` | +| `FSRCNNX_x2_8-0-4-1.glsl` | FSRCNNX by igv, https://github.com/igv/FSRCNN-TensorFlow release 1.1 | LGPL-3.0 (header of the file) | + +The files are unchanged. `enhance_easu.comp` includes the FSR headers; +`tools/gen_fsrcnnx.js` turns the FSRCNNX mpv shader into the compute passes in +`../fsrcnnx/`. diff --git a/app/src/shaders/third_party/ffx_a.h b/app/src/shaders/third_party/ffx_a.h new file mode 100644 index 0000000..d04bff5 --- /dev/null +++ b/app/src/shaders/third_party/ffx_a.h @@ -0,0 +1,2656 @@ +//============================================================================================================================== +// +// [A] SHADER PORTABILITY 1.20210629 +// +//============================================================================================================================== +// FidelityFX Super Resolution Sample +// +// Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved. +// 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. +//------------------------------------------------------------------------------------------------------------------------------ +// MIT LICENSE +// =========== +// Copyright (c) 2014 Michal Drobot (for concepts used in "FLOAT APPROXIMATIONS"). +// ----------- +// 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. +//------------------------------------------------------------------------------------------------------------------------------ +// ABOUT +// ===== +// Common central point for high-level shading language and C portability for various shader headers. +//------------------------------------------------------------------------------------------------------------------------------ +// DEFINES +// ======= +// A_CPU ..... Include the CPU related code. +// A_GPU ..... Include the GPU related code. +// A_GLSL .... Using GLSL. +// A_HLSL .... Using HLSL. +// A_HLSL_6_2 Using HLSL 6.2 with new 'uint16_t' and related types (requires '-enable-16bit-types'). +// A_NO_16_BIT_CAST Don't use instructions that are not availabe in SPIR-V (needed for running A_HLSL_6_2 on Vulkan) +// A_GCC ..... Using a GCC compatible compiler (else assume MSVC compatible compiler by default). +// ======= +// A_BYTE .... Support 8-bit integer. +// A_HALF .... Support 16-bit integer and floating point. +// A_LONG .... Support 64-bit integer. +// A_DUBL .... Support 64-bit floating point. +// ======= +// A_WAVE .... Support wave-wide operations. +//------------------------------------------------------------------------------------------------------------------------------ +// To get #include "ffx_a.h" working in GLSL use '#extension GL_GOOGLE_include_directive:require'. +//------------------------------------------------------------------------------------------------------------------------------ +// SIMPLIFIED TYPE SYSTEM +// ====================== +// - All ints will be unsigned with exception of when signed is required. +// - Type naming simplified and shortened "A<#components>", +// - H = 16-bit float (half) +// - F = 32-bit float (float) +// - D = 64-bit float (double) +// - P = 1-bit integer (predicate, not using bool because 'B' is used for byte) +// - B = 8-bit integer (byte) +// - W = 16-bit integer (word) +// - U = 32-bit integer (unsigned) +// - L = 64-bit integer (long) +// - Using "AS<#components>" for signed when required. +//------------------------------------------------------------------------------------------------------------------------------ +// TODO +// ==== +// - Make sure 'ALerp*(a,b,m)' does 'b*m+(-a*m+a)' (2 ops). +//------------------------------------------------------------------------------------------------------------------------------ +// CHANGE LOG +// ========== +// 20200914 - Expanded wave ops and prx code. +// 20200713 - Added [ZOL] section, fixed serious bugs in sRGB and Rec.709 color conversion code, etc. +//============================================================================================================================== +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// COMMON +//============================================================================================================================== +#define A_2PI 6.28318530718 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// +// +// CPU +// +// +//============================================================================================================================== +#ifdef A_CPU + // Supporting user defined overrides. + #ifndef A_RESTRICT + #define A_RESTRICT __restrict + #endif +//------------------------------------------------------------------------------------------------------------------------------ + #ifndef A_STATIC + #define A_STATIC static + #endif +//------------------------------------------------------------------------------------------------------------------------------ + // Same types across CPU and GPU. + // Predicate uses 32-bit integer (C friendly bool). + typedef uint32_t AP1; + typedef float AF1; + typedef double AD1; + typedef uint8_t AB1; + typedef uint16_t AW1; + typedef uint32_t AU1; + typedef uint64_t AL1; + typedef int8_t ASB1; + typedef int16_t ASW1; + typedef int32_t ASU1; + typedef int64_t ASL1; +//------------------------------------------------------------------------------------------------------------------------------ + #define AD1_(a) ((AD1)(a)) + #define AF1_(a) ((AF1)(a)) + #define AL1_(a) ((AL1)(a)) + #define AU1_(a) ((AU1)(a)) +//------------------------------------------------------------------------------------------------------------------------------ + #define ASL1_(a) ((ASL1)(a)) + #define ASU1_(a) ((ASU1)(a)) +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC AU1 AU1_AF1(AF1 a){union{AF1 f;AU1 u;}bits;bits.f=a;return bits.u;} +//------------------------------------------------------------------------------------------------------------------------------ + #define A_TRUE 1 + #define A_FALSE 0 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// +// CPU/GPU PORTING +// +//------------------------------------------------------------------------------------------------------------------------------ +// Get CPU and GPU to share all setup code, without duplicate code paths. +// This uses a lower-case prefix for special vector constructs. +// - In C restrict pointers are used. +// - In the shading language, in/inout/out arguments are used. +// This depends on the ability to access a vector value in both languages via array syntax (aka color[2]). +//============================================================================================================================== +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// VECTOR ARGUMENT/RETURN/INITIALIZATION PORTABILITY +//============================================================================================================================== + #define retAD2 AD1 *A_RESTRICT + #define retAD3 AD1 *A_RESTRICT + #define retAD4 AD1 *A_RESTRICT + #define retAF2 AF1 *A_RESTRICT + #define retAF3 AF1 *A_RESTRICT + #define retAF4 AF1 *A_RESTRICT + #define retAL2 AL1 *A_RESTRICT + #define retAL3 AL1 *A_RESTRICT + #define retAL4 AL1 *A_RESTRICT + #define retAU2 AU1 *A_RESTRICT + #define retAU3 AU1 *A_RESTRICT + #define retAU4 AU1 *A_RESTRICT +//------------------------------------------------------------------------------------------------------------------------------ + #define inAD2 AD1 *A_RESTRICT + #define inAD3 AD1 *A_RESTRICT + #define inAD4 AD1 *A_RESTRICT + #define inAF2 AF1 *A_RESTRICT + #define inAF3 AF1 *A_RESTRICT + #define inAF4 AF1 *A_RESTRICT + #define inAL2 AL1 *A_RESTRICT + #define inAL3 AL1 *A_RESTRICT + #define inAL4 AL1 *A_RESTRICT + #define inAU2 AU1 *A_RESTRICT + #define inAU3 AU1 *A_RESTRICT + #define inAU4 AU1 *A_RESTRICT +//------------------------------------------------------------------------------------------------------------------------------ + #define inoutAD2 AD1 *A_RESTRICT + #define inoutAD3 AD1 *A_RESTRICT + #define inoutAD4 AD1 *A_RESTRICT + #define inoutAF2 AF1 *A_RESTRICT + #define inoutAF3 AF1 *A_RESTRICT + #define inoutAF4 AF1 *A_RESTRICT + #define inoutAL2 AL1 *A_RESTRICT + #define inoutAL3 AL1 *A_RESTRICT + #define inoutAL4 AL1 *A_RESTRICT + #define inoutAU2 AU1 *A_RESTRICT + #define inoutAU3 AU1 *A_RESTRICT + #define inoutAU4 AU1 *A_RESTRICT +//------------------------------------------------------------------------------------------------------------------------------ + #define outAD2 AD1 *A_RESTRICT + #define outAD3 AD1 *A_RESTRICT + #define outAD4 AD1 *A_RESTRICT + #define outAF2 AF1 *A_RESTRICT + #define outAF3 AF1 *A_RESTRICT + #define outAF4 AF1 *A_RESTRICT + #define outAL2 AL1 *A_RESTRICT + #define outAL3 AL1 *A_RESTRICT + #define outAL4 AL1 *A_RESTRICT + #define outAU2 AU1 *A_RESTRICT + #define outAU3 AU1 *A_RESTRICT + #define outAU4 AU1 *A_RESTRICT +//------------------------------------------------------------------------------------------------------------------------------ + #define varAD2(x) AD1 x[2] + #define varAD3(x) AD1 x[3] + #define varAD4(x) AD1 x[4] + #define varAF2(x) AF1 x[2] + #define varAF3(x) AF1 x[3] + #define varAF4(x) AF1 x[4] + #define varAL2(x) AL1 x[2] + #define varAL3(x) AL1 x[3] + #define varAL4(x) AL1 x[4] + #define varAU2(x) AU1 x[2] + #define varAU3(x) AU1 x[3] + #define varAU4(x) AU1 x[4] +//------------------------------------------------------------------------------------------------------------------------------ + #define initAD2(x,y) {x,y} + #define initAD3(x,y,z) {x,y,z} + #define initAD4(x,y,z,w) {x,y,z,w} + #define initAF2(x,y) {x,y} + #define initAF3(x,y,z) {x,y,z} + #define initAF4(x,y,z,w) {x,y,z,w} + #define initAL2(x,y) {x,y} + #define initAL3(x,y,z) {x,y,z} + #define initAL4(x,y,z,w) {x,y,z,w} + #define initAU2(x,y) {x,y} + #define initAU3(x,y,z) {x,y,z} + #define initAU4(x,y,z,w) {x,y,z,w} +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// SCALAR RETURN OPS +//------------------------------------------------------------------------------------------------------------------------------ +// TODO +// ==== +// - Replace transcendentals with manual versions. +//============================================================================================================================== + #ifdef A_GCC + A_STATIC AD1 AAbsD1(AD1 a){return __builtin_fabs(a);} + A_STATIC AF1 AAbsF1(AF1 a){return __builtin_fabsf(a);} + A_STATIC AU1 AAbsSU1(AU1 a){return AU1_(__builtin_abs(ASU1_(a)));} + A_STATIC AL1 AAbsSL1(AL1 a){return AL1_(__builtin_llabs(ASL1_(a)));} + #else + A_STATIC AD1 AAbsD1(AD1 a){return fabs(a);} + A_STATIC AF1 AAbsF1(AF1 a){return fabsf(a);} + A_STATIC AU1 AAbsSU1(AU1 a){return AU1_(abs(ASU1_(a)));} + A_STATIC AL1 AAbsSL1(AL1 a){return AL1_(labs((long)ASL1_(a)));} + #endif +//------------------------------------------------------------------------------------------------------------------------------ + #ifdef A_GCC + A_STATIC AD1 ACosD1(AD1 a){return __builtin_cos(a);} + A_STATIC AF1 ACosF1(AF1 a){return __builtin_cosf(a);} + #else + A_STATIC AD1 ACosD1(AD1 a){return cos(a);} + A_STATIC AF1 ACosF1(AF1 a){return cosf(a);} + #endif +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC AD1 ADotD2(inAD2 a,inAD2 b){return a[0]*b[0]+a[1]*b[1];} + A_STATIC AD1 ADotD3(inAD3 a,inAD3 b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2];} + A_STATIC AD1 ADotD4(inAD4 a,inAD4 b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3];} + A_STATIC AF1 ADotF2(inAF2 a,inAF2 b){return a[0]*b[0]+a[1]*b[1];} + A_STATIC AF1 ADotF3(inAF3 a,inAF3 b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2];} + A_STATIC AF1 ADotF4(inAF4 a,inAF4 b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3];} +//------------------------------------------------------------------------------------------------------------------------------ + #ifdef A_GCC + A_STATIC AD1 AExp2D1(AD1 a){return __builtin_exp2(a);} + A_STATIC AF1 AExp2F1(AF1 a){return __builtin_exp2f(a);} + #else + A_STATIC AD1 AExp2D1(AD1 a){return exp2(a);} + A_STATIC AF1 AExp2F1(AF1 a){return exp2f(a);} + #endif +//------------------------------------------------------------------------------------------------------------------------------ + #ifdef A_GCC + A_STATIC AD1 AFloorD1(AD1 a){return __builtin_floor(a);} + A_STATIC AF1 AFloorF1(AF1 a){return __builtin_floorf(a);} + #else + A_STATIC AD1 AFloorD1(AD1 a){return floor(a);} + A_STATIC AF1 AFloorF1(AF1 a){return floorf(a);} + #endif +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC AD1 ALerpD1(AD1 a,AD1 b,AD1 c){return b*c+(-a*c+a);} + A_STATIC AF1 ALerpF1(AF1 a,AF1 b,AF1 c){return b*c+(-a*c+a);} +//------------------------------------------------------------------------------------------------------------------------------ + #ifdef A_GCC + A_STATIC AD1 ALog2D1(AD1 a){return __builtin_log2(a);} + A_STATIC AF1 ALog2F1(AF1 a){return __builtin_log2f(a);} + #else + A_STATIC AD1 ALog2D1(AD1 a){return log2(a);} + A_STATIC AF1 ALog2F1(AF1 a){return log2f(a);} + #endif +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC AD1 AMaxD1(AD1 a,AD1 b){return a>b?a:b;} + A_STATIC AF1 AMaxF1(AF1 a,AF1 b){return a>b?a:b;} + A_STATIC AL1 AMaxL1(AL1 a,AL1 b){return a>b?a:b;} + A_STATIC AU1 AMaxU1(AU1 a,AU1 b){return a>b?a:b;} +//------------------------------------------------------------------------------------------------------------------------------ + // These follow the convention that A integer types don't have signage, until they are operated on. + A_STATIC AL1 AMaxSL1(AL1 a,AL1 b){return (ASL1_(a)>ASL1_(b))?a:b;} + A_STATIC AU1 AMaxSU1(AU1 a,AU1 b){return (ASU1_(a)>ASU1_(b))?a:b;} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC AD1 AMinD1(AD1 a,AD1 b){return a>ASL1_(b));} + A_STATIC AU1 AShrSU1(AU1 a,AU1 b){return AU1_(ASU1_(a)>>ASU1_(b));} +//------------------------------------------------------------------------------------------------------------------------------ + #ifdef A_GCC + A_STATIC AD1 ASinD1(AD1 a){return __builtin_sin(a);} + A_STATIC AF1 ASinF1(AF1 a){return __builtin_sinf(a);} + #else + A_STATIC AD1 ASinD1(AD1 a){return sin(a);} + A_STATIC AF1 ASinF1(AF1 a){return sinf(a);} + #endif +//------------------------------------------------------------------------------------------------------------------------------ + #ifdef A_GCC + A_STATIC AD1 ASqrtD1(AD1 a){return __builtin_sqrt(a);} + A_STATIC AF1 ASqrtF1(AF1 a){return __builtin_sqrtf(a);} + #else + A_STATIC AD1 ASqrtD1(AD1 a){return sqrt(a);} + A_STATIC AF1 ASqrtF1(AF1 a){return sqrtf(a);} + #endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// SCALAR RETURN OPS - DEPENDENT +//============================================================================================================================== + A_STATIC AD1 AClampD1(AD1 x,AD1 n,AD1 m){return AMaxD1(n,AMinD1(x,m));} + A_STATIC AF1 AClampF1(AF1 x,AF1 n,AF1 m){return AMaxF1(n,AMinF1(x,m));} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC AD1 AFractD1(AD1 a){return a-AFloorD1(a);} + A_STATIC AF1 AFractF1(AF1 a){return a-AFloorF1(a);} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC AD1 APowD1(AD1 a,AD1 b){return AExp2D1(b*ALog2D1(a));} + A_STATIC AF1 APowF1(AF1 a,AF1 b){return AExp2F1(b*ALog2F1(a));} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC AD1 ARsqD1(AD1 a){return ARcpD1(ASqrtD1(a));} + A_STATIC AF1 ARsqF1(AF1 a){return ARcpF1(ASqrtF1(a));} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC AD1 ASatD1(AD1 a){return AMinD1(1.0,AMaxD1(0.0,a));} + A_STATIC AF1 ASatF1(AF1 a){return AMinF1(1.0f,AMaxF1(0.0f,a));} +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// VECTOR OPS +//------------------------------------------------------------------------------------------------------------------------------ +// These are added as needed for production or prototyping, so not necessarily a complete set. +// They follow a convention of taking in a destination and also returning the destination value to increase utility. +//============================================================================================================================== + A_STATIC retAD2 opAAbsD2(outAD2 d,inAD2 a){d[0]=AAbsD1(a[0]);d[1]=AAbsD1(a[1]);return d;} + A_STATIC retAD3 opAAbsD3(outAD3 d,inAD3 a){d[0]=AAbsD1(a[0]);d[1]=AAbsD1(a[1]);d[2]=AAbsD1(a[2]);return d;} + A_STATIC retAD4 opAAbsD4(outAD4 d,inAD4 a){d[0]=AAbsD1(a[0]);d[1]=AAbsD1(a[1]);d[2]=AAbsD1(a[2]);d[3]=AAbsD1(a[3]);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC retAF2 opAAbsF2(outAF2 d,inAF2 a){d[0]=AAbsF1(a[0]);d[1]=AAbsF1(a[1]);return d;} + A_STATIC retAF3 opAAbsF3(outAF3 d,inAF3 a){d[0]=AAbsF1(a[0]);d[1]=AAbsF1(a[1]);d[2]=AAbsF1(a[2]);return d;} + A_STATIC retAF4 opAAbsF4(outAF4 d,inAF4 a){d[0]=AAbsF1(a[0]);d[1]=AAbsF1(a[1]);d[2]=AAbsF1(a[2]);d[3]=AAbsF1(a[3]);return d;} +//============================================================================================================================== + A_STATIC retAD2 opAAddD2(outAD2 d,inAD2 a,inAD2 b){d[0]=a[0]+b[0];d[1]=a[1]+b[1];return d;} + A_STATIC retAD3 opAAddD3(outAD3 d,inAD3 a,inAD3 b){d[0]=a[0]+b[0];d[1]=a[1]+b[1];d[2]=a[2]+b[2];return d;} + A_STATIC retAD4 opAAddD4(outAD4 d,inAD4 a,inAD4 b){d[0]=a[0]+b[0];d[1]=a[1]+b[1];d[2]=a[2]+b[2];d[3]=a[3]+b[3];return d;} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC retAF2 opAAddF2(outAF2 d,inAF2 a,inAF2 b){d[0]=a[0]+b[0];d[1]=a[1]+b[1];return d;} + A_STATIC retAF3 opAAddF3(outAF3 d,inAF3 a,inAF3 b){d[0]=a[0]+b[0];d[1]=a[1]+b[1];d[2]=a[2]+b[2];return d;} + A_STATIC retAF4 opAAddF4(outAF4 d,inAF4 a,inAF4 b){d[0]=a[0]+b[0];d[1]=a[1]+b[1];d[2]=a[2]+b[2];d[3]=a[3]+b[3];return d;} +//============================================================================================================================== + A_STATIC retAD2 opAAddOneD2(outAD2 d,inAD2 a,AD1 b){d[0]=a[0]+b;d[1]=a[1]+b;return d;} + A_STATIC retAD3 opAAddOneD3(outAD3 d,inAD3 a,AD1 b){d[0]=a[0]+b;d[1]=a[1]+b;d[2]=a[2]+b;return d;} + A_STATIC retAD4 opAAddOneD4(outAD4 d,inAD4 a,AD1 b){d[0]=a[0]+b;d[1]=a[1]+b;d[2]=a[2]+b;d[3]=a[3]+b;return d;} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC retAF2 opAAddOneF2(outAF2 d,inAF2 a,AF1 b){d[0]=a[0]+b;d[1]=a[1]+b;return d;} + A_STATIC retAF3 opAAddOneF3(outAF3 d,inAF3 a,AF1 b){d[0]=a[0]+b;d[1]=a[1]+b;d[2]=a[2]+b;return d;} + A_STATIC retAF4 opAAddOneF4(outAF4 d,inAF4 a,AF1 b){d[0]=a[0]+b;d[1]=a[1]+b;d[2]=a[2]+b;d[3]=a[3]+b;return d;} +//============================================================================================================================== + A_STATIC retAD2 opACpyD2(outAD2 d,inAD2 a){d[0]=a[0];d[1]=a[1];return d;} + A_STATIC retAD3 opACpyD3(outAD3 d,inAD3 a){d[0]=a[0];d[1]=a[1];d[2]=a[2];return d;} + A_STATIC retAD4 opACpyD4(outAD4 d,inAD4 a){d[0]=a[0];d[1]=a[1];d[2]=a[2];d[3]=a[3];return d;} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC retAF2 opACpyF2(outAF2 d,inAF2 a){d[0]=a[0];d[1]=a[1];return d;} + A_STATIC retAF3 opACpyF3(outAF3 d,inAF3 a){d[0]=a[0];d[1]=a[1];d[2]=a[2];return d;} + A_STATIC retAF4 opACpyF4(outAF4 d,inAF4 a){d[0]=a[0];d[1]=a[1];d[2]=a[2];d[3]=a[3];return d;} +//============================================================================================================================== + A_STATIC retAD2 opALerpD2(outAD2 d,inAD2 a,inAD2 b,inAD2 c){d[0]=ALerpD1(a[0],b[0],c[0]);d[1]=ALerpD1(a[1],b[1],c[1]);return d;} + A_STATIC retAD3 opALerpD3(outAD3 d,inAD3 a,inAD3 b,inAD3 c){d[0]=ALerpD1(a[0],b[0],c[0]);d[1]=ALerpD1(a[1],b[1],c[1]);d[2]=ALerpD1(a[2],b[2],c[2]);return d;} + A_STATIC retAD4 opALerpD4(outAD4 d,inAD4 a,inAD4 b,inAD4 c){d[0]=ALerpD1(a[0],b[0],c[0]);d[1]=ALerpD1(a[1],b[1],c[1]);d[2]=ALerpD1(a[2],b[2],c[2]);d[3]=ALerpD1(a[3],b[3],c[3]);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC retAF2 opALerpF2(outAF2 d,inAF2 a,inAF2 b,inAF2 c){d[0]=ALerpF1(a[0],b[0],c[0]);d[1]=ALerpF1(a[1],b[1],c[1]);return d;} + A_STATIC retAF3 opALerpF3(outAF3 d,inAF3 a,inAF3 b,inAF3 c){d[0]=ALerpF1(a[0],b[0],c[0]);d[1]=ALerpF1(a[1],b[1],c[1]);d[2]=ALerpF1(a[2],b[2],c[2]);return d;} + A_STATIC retAF4 opALerpF4(outAF4 d,inAF4 a,inAF4 b,inAF4 c){d[0]=ALerpF1(a[0],b[0],c[0]);d[1]=ALerpF1(a[1],b[1],c[1]);d[2]=ALerpF1(a[2],b[2],c[2]);d[3]=ALerpF1(a[3],b[3],c[3]);return d;} +//============================================================================================================================== + A_STATIC retAD2 opALerpOneD2(outAD2 d,inAD2 a,inAD2 b,AD1 c){d[0]=ALerpD1(a[0],b[0],c);d[1]=ALerpD1(a[1],b[1],c);return d;} + A_STATIC retAD3 opALerpOneD3(outAD3 d,inAD3 a,inAD3 b,AD1 c){d[0]=ALerpD1(a[0],b[0],c);d[1]=ALerpD1(a[1],b[1],c);d[2]=ALerpD1(a[2],b[2],c);return d;} + A_STATIC retAD4 opALerpOneD4(outAD4 d,inAD4 a,inAD4 b,AD1 c){d[0]=ALerpD1(a[0],b[0],c);d[1]=ALerpD1(a[1],b[1],c);d[2]=ALerpD1(a[2],b[2],c);d[3]=ALerpD1(a[3],b[3],c);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC retAF2 opALerpOneF2(outAF2 d,inAF2 a,inAF2 b,AF1 c){d[0]=ALerpF1(a[0],b[0],c);d[1]=ALerpF1(a[1],b[1],c);return d;} + A_STATIC retAF3 opALerpOneF3(outAF3 d,inAF3 a,inAF3 b,AF1 c){d[0]=ALerpF1(a[0],b[0],c);d[1]=ALerpF1(a[1],b[1],c);d[2]=ALerpF1(a[2],b[2],c);return d;} + A_STATIC retAF4 opALerpOneF4(outAF4 d,inAF4 a,inAF4 b,AF1 c){d[0]=ALerpF1(a[0],b[0],c);d[1]=ALerpF1(a[1],b[1],c);d[2]=ALerpF1(a[2],b[2],c);d[3]=ALerpF1(a[3],b[3],c);return d;} +//============================================================================================================================== + A_STATIC retAD2 opAMaxD2(outAD2 d,inAD2 a,inAD2 b){d[0]=AMaxD1(a[0],b[0]);d[1]=AMaxD1(a[1],b[1]);return d;} + A_STATIC retAD3 opAMaxD3(outAD3 d,inAD3 a,inAD3 b){d[0]=AMaxD1(a[0],b[0]);d[1]=AMaxD1(a[1],b[1]);d[2]=AMaxD1(a[2],b[2]);return d;} + A_STATIC retAD4 opAMaxD4(outAD4 d,inAD4 a,inAD4 b){d[0]=AMaxD1(a[0],b[0]);d[1]=AMaxD1(a[1],b[1]);d[2]=AMaxD1(a[2],b[2]);d[3]=AMaxD1(a[3],b[3]);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC retAF2 opAMaxF2(outAF2 d,inAF2 a,inAF2 b){d[0]=AMaxF1(a[0],b[0]);d[1]=AMaxF1(a[1],b[1]);return d;} + A_STATIC retAF3 opAMaxF3(outAF3 d,inAF3 a,inAF3 b){d[0]=AMaxF1(a[0],b[0]);d[1]=AMaxF1(a[1],b[1]);d[2]=AMaxF1(a[2],b[2]);return d;} + A_STATIC retAF4 opAMaxF4(outAF4 d,inAF4 a,inAF4 b){d[0]=AMaxF1(a[0],b[0]);d[1]=AMaxF1(a[1],b[1]);d[2]=AMaxF1(a[2],b[2]);d[3]=AMaxF1(a[3],b[3]);return d;} +//============================================================================================================================== + A_STATIC retAD2 opAMinD2(outAD2 d,inAD2 a,inAD2 b){d[0]=AMinD1(a[0],b[0]);d[1]=AMinD1(a[1],b[1]);return d;} + A_STATIC retAD3 opAMinD3(outAD3 d,inAD3 a,inAD3 b){d[0]=AMinD1(a[0],b[0]);d[1]=AMinD1(a[1],b[1]);d[2]=AMinD1(a[2],b[2]);return d;} + A_STATIC retAD4 opAMinD4(outAD4 d,inAD4 a,inAD4 b){d[0]=AMinD1(a[0],b[0]);d[1]=AMinD1(a[1],b[1]);d[2]=AMinD1(a[2],b[2]);d[3]=AMinD1(a[3],b[3]);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC retAF2 opAMinF2(outAF2 d,inAF2 a,inAF2 b){d[0]=AMinF1(a[0],b[0]);d[1]=AMinF1(a[1],b[1]);return d;} + A_STATIC retAF3 opAMinF3(outAF3 d,inAF3 a,inAF3 b){d[0]=AMinF1(a[0],b[0]);d[1]=AMinF1(a[1],b[1]);d[2]=AMinF1(a[2],b[2]);return d;} + A_STATIC retAF4 opAMinF4(outAF4 d,inAF4 a,inAF4 b){d[0]=AMinF1(a[0],b[0]);d[1]=AMinF1(a[1],b[1]);d[2]=AMinF1(a[2],b[2]);d[3]=AMinF1(a[3],b[3]);return d;} +//============================================================================================================================== + A_STATIC retAD2 opAMulD2(outAD2 d,inAD2 a,inAD2 b){d[0]=a[0]*b[0];d[1]=a[1]*b[1];return d;} + A_STATIC retAD3 opAMulD3(outAD3 d,inAD3 a,inAD3 b){d[0]=a[0]*b[0];d[1]=a[1]*b[1];d[2]=a[2]*b[2];return d;} + A_STATIC retAD4 opAMulD4(outAD4 d,inAD4 a,inAD4 b){d[0]=a[0]*b[0];d[1]=a[1]*b[1];d[2]=a[2]*b[2];d[3]=a[3]*b[3];return d;} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC retAF2 opAMulF2(outAF2 d,inAF2 a,inAF2 b){d[0]=a[0]*b[0];d[1]=a[1]*b[1];return d;} + A_STATIC retAF3 opAMulF3(outAF3 d,inAF3 a,inAF3 b){d[0]=a[0]*b[0];d[1]=a[1]*b[1];d[2]=a[2]*b[2];return d;} + A_STATIC retAF4 opAMulF4(outAF4 d,inAF4 a,inAF4 b){d[0]=a[0]*b[0];d[1]=a[1]*b[1];d[2]=a[2]*b[2];d[3]=a[3]*b[3];return d;} +//============================================================================================================================== + A_STATIC retAD2 opAMulOneD2(outAD2 d,inAD2 a,AD1 b){d[0]=a[0]*b;d[1]=a[1]*b;return d;} + A_STATIC retAD3 opAMulOneD3(outAD3 d,inAD3 a,AD1 b){d[0]=a[0]*b;d[1]=a[1]*b;d[2]=a[2]*b;return d;} + A_STATIC retAD4 opAMulOneD4(outAD4 d,inAD4 a,AD1 b){d[0]=a[0]*b;d[1]=a[1]*b;d[2]=a[2]*b;d[3]=a[3]*b;return d;} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC retAF2 opAMulOneF2(outAF2 d,inAF2 a,AF1 b){d[0]=a[0]*b;d[1]=a[1]*b;return d;} + A_STATIC retAF3 opAMulOneF3(outAF3 d,inAF3 a,AF1 b){d[0]=a[0]*b;d[1]=a[1]*b;d[2]=a[2]*b;return d;} + A_STATIC retAF4 opAMulOneF4(outAF4 d,inAF4 a,AF1 b){d[0]=a[0]*b;d[1]=a[1]*b;d[2]=a[2]*b;d[3]=a[3]*b;return d;} +//============================================================================================================================== + A_STATIC retAD2 opANegD2(outAD2 d,inAD2 a){d[0]=-a[0];d[1]=-a[1];return d;} + A_STATIC retAD3 opANegD3(outAD3 d,inAD3 a){d[0]=-a[0];d[1]=-a[1];d[2]=-a[2];return d;} + A_STATIC retAD4 opANegD4(outAD4 d,inAD4 a){d[0]=-a[0];d[1]=-a[1];d[2]=-a[2];d[3]=-a[3];return d;} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC retAF2 opANegF2(outAF2 d,inAF2 a){d[0]=-a[0];d[1]=-a[1];return d;} + A_STATIC retAF3 opANegF3(outAF3 d,inAF3 a){d[0]=-a[0];d[1]=-a[1];d[2]=-a[2];return d;} + A_STATIC retAF4 opANegF4(outAF4 d,inAF4 a){d[0]=-a[0];d[1]=-a[1];d[2]=-a[2];d[3]=-a[3];return d;} +//============================================================================================================================== + A_STATIC retAD2 opARcpD2(outAD2 d,inAD2 a){d[0]=ARcpD1(a[0]);d[1]=ARcpD1(a[1]);return d;} + A_STATIC retAD3 opARcpD3(outAD3 d,inAD3 a){d[0]=ARcpD1(a[0]);d[1]=ARcpD1(a[1]);d[2]=ARcpD1(a[2]);return d;} + A_STATIC retAD4 opARcpD4(outAD4 d,inAD4 a){d[0]=ARcpD1(a[0]);d[1]=ARcpD1(a[1]);d[2]=ARcpD1(a[2]);d[3]=ARcpD1(a[3]);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC retAF2 opARcpF2(outAF2 d,inAF2 a){d[0]=ARcpF1(a[0]);d[1]=ARcpF1(a[1]);return d;} + A_STATIC retAF3 opARcpF3(outAF3 d,inAF3 a){d[0]=ARcpF1(a[0]);d[1]=ARcpF1(a[1]);d[2]=ARcpF1(a[2]);return d;} + A_STATIC retAF4 opARcpF4(outAF4 d,inAF4 a){d[0]=ARcpF1(a[0]);d[1]=ARcpF1(a[1]);d[2]=ARcpF1(a[2]);d[3]=ARcpF1(a[3]);return d;} +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// HALF FLOAT PACKING +//============================================================================================================================== + // Convert float to half (in lower 16-bits of output). + // Same fast technique as documented here: ftp://ftp.fox-toolkit.org/pub/fasthalffloatconversion.pdf + // Supports denormals. + // Conversion rules are to make computations possibly "safer" on the GPU, + // -INF & -NaN -> -65504 + // +INF & +NaN -> +65504 + A_STATIC AU1 AU1_AH1_AF1(AF1 f){ + static AW1 base[512]={ + 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, + 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, + 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, + 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, + 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, + 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, + 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x0002,0x0004,0x0008,0x0010,0x0020,0x0040,0x0080,0x0100, + 0x0200,0x0400,0x0800,0x0c00,0x1000,0x1400,0x1800,0x1c00,0x2000,0x2400,0x2800,0x2c00,0x3000,0x3400,0x3800,0x3c00, + 0x4000,0x4400,0x4800,0x4c00,0x5000,0x5400,0x5800,0x5c00,0x6000,0x6400,0x6800,0x6c00,0x7000,0x7400,0x7800,0x7bff, + 0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff, + 0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff, + 0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff, + 0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff, + 0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff, + 0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff, + 0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff, + 0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000, + 0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000, + 0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000, + 0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000, + 0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000, + 0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000, + 0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8001,0x8002,0x8004,0x8008,0x8010,0x8020,0x8040,0x8080,0x8100, + 0x8200,0x8400,0x8800,0x8c00,0x9000,0x9400,0x9800,0x9c00,0xa000,0xa400,0xa800,0xac00,0xb000,0xb400,0xb800,0xbc00, + 0xc000,0xc400,0xc800,0xcc00,0xd000,0xd400,0xd800,0xdc00,0xe000,0xe400,0xe800,0xec00,0xf000,0xf400,0xf800,0xfbff, + 0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff, + 0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff, + 0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff, + 0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff, + 0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff, + 0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff, + 0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff}; + static AB1 shift[512]={ + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x17,0x16,0x15,0x14,0x13,0x12,0x11,0x10,0x0f, + 0x0e,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d, + 0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x17,0x16,0x15,0x14,0x13,0x12,0x11,0x10,0x0f, + 0x0e,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d, + 0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18}; + union{AF1 f;AU1 u;}bits;bits.f=f;AU1 u=bits.u;AU1 i=u>>23;return (AU1)(base[i])+((u&0x7fffff)>>shift[i]);} +//------------------------------------------------------------------------------------------------------------------------------ + // Used to output packed constant. + A_STATIC AU1 AU1_AH2_AF2(inAF2 a){return AU1_AH1_AF1(a[0])+(AU1_AH1_AF1(a[1])<<16);} +#endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// +// +// GLSL +// +// +//============================================================================================================================== +#if defined(A_GLSL) && defined(A_GPU) + #ifndef A_SKIP_EXT + #ifdef A_HALF + #extension GL_EXT_shader_16bit_storage:require + #extension GL_EXT_shader_explicit_arithmetic_types:require + #endif +//------------------------------------------------------------------------------------------------------------------------------ + #ifdef A_LONG + #extension GL_ARB_gpu_shader_int64:require + #extension GL_NV_shader_atomic_int64:require + #endif +//------------------------------------------------------------------------------------------------------------------------------ + #ifdef A_WAVE + #extension GL_KHR_shader_subgroup_arithmetic:require + #extension GL_KHR_shader_subgroup_ballot:require + #extension GL_KHR_shader_subgroup_quad:require + #extension GL_KHR_shader_subgroup_shuffle:require + #endif + #endif +//============================================================================================================================== + #define AP1 bool + #define AP2 bvec2 + #define AP3 bvec3 + #define AP4 bvec4 +//------------------------------------------------------------------------------------------------------------------------------ + #define AF1 float + #define AF2 vec2 + #define AF3 vec3 + #define AF4 vec4 +//------------------------------------------------------------------------------------------------------------------------------ + #define AU1 uint + #define AU2 uvec2 + #define AU3 uvec3 + #define AU4 uvec4 +//------------------------------------------------------------------------------------------------------------------------------ + #define ASU1 int + #define ASU2 ivec2 + #define ASU3 ivec3 + #define ASU4 ivec4 +//============================================================================================================================== + #define AF1_AU1(x) uintBitsToFloat(AU1(x)) + #define AF2_AU2(x) uintBitsToFloat(AU2(x)) + #define AF3_AU3(x) uintBitsToFloat(AU3(x)) + #define AF4_AU4(x) uintBitsToFloat(AU4(x)) +//------------------------------------------------------------------------------------------------------------------------------ + #define AU1_AF1(x) floatBitsToUint(AF1(x)) + #define AU2_AF2(x) floatBitsToUint(AF2(x)) + #define AU3_AF3(x) floatBitsToUint(AF3(x)) + #define AU4_AF4(x) floatBitsToUint(AF4(x)) +//------------------------------------------------------------------------------------------------------------------------------ + AU1 AU1_AH1_AF1_x(AF1 a){return packHalf2x16(AF2(a,0.0));} + #define AU1_AH1_AF1(a) AU1_AH1_AF1_x(AF1(a)) +//------------------------------------------------------------------------------------------------------------------------------ + #define AU1_AH2_AF2 packHalf2x16 + #define AU1_AW2Unorm_AF2 packUnorm2x16 + #define AU1_AB4Unorm_AF4 packUnorm4x8 +//------------------------------------------------------------------------------------------------------------------------------ + #define AF2_AH2_AU1 unpackHalf2x16 + #define AF2_AW2Unorm_AU1 unpackUnorm2x16 + #define AF4_AB4Unorm_AU1 unpackUnorm4x8 +//============================================================================================================================== + AF1 AF1_x(AF1 a){return AF1(a);} + AF2 AF2_x(AF1 a){return AF2(a,a);} + AF3 AF3_x(AF1 a){return AF3(a,a,a);} + AF4 AF4_x(AF1 a){return AF4(a,a,a,a);} + #define AF1_(a) AF1_x(AF1(a)) + #define AF2_(a) AF2_x(AF1(a)) + #define AF3_(a) AF3_x(AF1(a)) + #define AF4_(a) AF4_x(AF1(a)) +//------------------------------------------------------------------------------------------------------------------------------ + AU1 AU1_x(AU1 a){return AU1(a);} + AU2 AU2_x(AU1 a){return AU2(a,a);} + AU3 AU3_x(AU1 a){return AU3(a,a,a);} + AU4 AU4_x(AU1 a){return AU4(a,a,a,a);} + #define AU1_(a) AU1_x(AU1(a)) + #define AU2_(a) AU2_x(AU1(a)) + #define AU3_(a) AU3_x(AU1(a)) + #define AU4_(a) AU4_x(AU1(a)) +//============================================================================================================================== + AU1 AAbsSU1(AU1 a){return AU1(abs(ASU1(a)));} + AU2 AAbsSU2(AU2 a){return AU2(abs(ASU2(a)));} + AU3 AAbsSU3(AU3 a){return AU3(abs(ASU3(a)));} + AU4 AAbsSU4(AU4 a){return AU4(abs(ASU4(a)));} +//------------------------------------------------------------------------------------------------------------------------------ + AU1 ABfe(AU1 src,AU1 off,AU1 bits){return bitfieldExtract(src,ASU1(off),ASU1(bits));} + AU1 ABfi(AU1 src,AU1 ins,AU1 mask){return (ins&mask)|(src&(~mask));} + // Proxy for V_BFI_B32 where the 'mask' is set as 'bits', 'mask=(1<>ASU1(b));} + AU2 AShrSU2(AU2 a,AU2 b){return AU2(ASU2(a)>>ASU2(b));} + AU3 AShrSU3(AU3 a,AU3 b){return AU3(ASU3(a)>>ASU3(b));} + AU4 AShrSU4(AU4 a,AU4 b){return AU4(ASU4(a)>>ASU4(b));} +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// GLSL BYTE +//============================================================================================================================== + #ifdef A_BYTE + #define AB1 uint8_t + #define AB2 u8vec2 + #define AB3 u8vec3 + #define AB4 u8vec4 +//------------------------------------------------------------------------------------------------------------------------------ + #define ASB1 int8_t + #define ASB2 i8vec2 + #define ASB3 i8vec3 + #define ASB4 i8vec4 +//------------------------------------------------------------------------------------------------------------------------------ + AB1 AB1_x(AB1 a){return AB1(a);} + AB2 AB2_x(AB1 a){return AB2(a,a);} + AB3 AB3_x(AB1 a){return AB3(a,a,a);} + AB4 AB4_x(AB1 a){return AB4(a,a,a,a);} + #define AB1_(a) AB1_x(AB1(a)) + #define AB2_(a) AB2_x(AB1(a)) + #define AB3_(a) AB3_x(AB1(a)) + #define AB4_(a) AB4_x(AB1(a)) + #endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// GLSL HALF +//============================================================================================================================== + #ifdef A_HALF + #define AH1 float16_t + #define AH2 f16vec2 + #define AH3 f16vec3 + #define AH4 f16vec4 +//------------------------------------------------------------------------------------------------------------------------------ + #define AW1 uint16_t + #define AW2 u16vec2 + #define AW3 u16vec3 + #define AW4 u16vec4 +//------------------------------------------------------------------------------------------------------------------------------ + #define ASW1 int16_t + #define ASW2 i16vec2 + #define ASW3 i16vec3 + #define ASW4 i16vec4 +//============================================================================================================================== + #define AH2_AU1(x) unpackFloat2x16(AU1(x)) + AH4 AH4_AU2_x(AU2 x){return AH4(unpackFloat2x16(x.x),unpackFloat2x16(x.y));} + #define AH4_AU2(x) AH4_AU2_x(AU2(x)) + #define AW2_AU1(x) unpackUint2x16(AU1(x)) + #define AW4_AU2(x) unpackUint4x16(pack64(AU2(x))) +//------------------------------------------------------------------------------------------------------------------------------ + #define AU1_AH2(x) packFloat2x16(AH2(x)) + AU2 AU2_AH4_x(AH4 x){return AU2(packFloat2x16(x.xy),packFloat2x16(x.zw));} + #define AU2_AH4(x) AU2_AH4_x(AH4(x)) + #define AU1_AW2(x) packUint2x16(AW2(x)) + #define AU2_AW4(x) unpack32(packUint4x16(AW4(x))) +//============================================================================================================================== + #define AW1_AH1(x) halfBitsToUint16(AH1(x)) + #define AW2_AH2(x) halfBitsToUint16(AH2(x)) + #define AW3_AH3(x) halfBitsToUint16(AH3(x)) + #define AW4_AH4(x) halfBitsToUint16(AH4(x)) +//------------------------------------------------------------------------------------------------------------------------------ + #define AH1_AW1(x) uint16BitsToHalf(AW1(x)) + #define AH2_AW2(x) uint16BitsToHalf(AW2(x)) + #define AH3_AW3(x) uint16BitsToHalf(AW3(x)) + #define AH4_AW4(x) uint16BitsToHalf(AW4(x)) +//============================================================================================================================== + AH1 AH1_x(AH1 a){return AH1(a);} + AH2 AH2_x(AH1 a){return AH2(a,a);} + AH3 AH3_x(AH1 a){return AH3(a,a,a);} + AH4 AH4_x(AH1 a){return AH4(a,a,a,a);} + #define AH1_(a) AH1_x(AH1(a)) + #define AH2_(a) AH2_x(AH1(a)) + #define AH3_(a) AH3_x(AH1(a)) + #define AH4_(a) AH4_x(AH1(a)) +//------------------------------------------------------------------------------------------------------------------------------ + AW1 AW1_x(AW1 a){return AW1(a);} + AW2 AW2_x(AW1 a){return AW2(a,a);} + AW3 AW3_x(AW1 a){return AW3(a,a,a);} + AW4 AW4_x(AW1 a){return AW4(a,a,a,a);} + #define AW1_(a) AW1_x(AW1(a)) + #define AW2_(a) AW2_x(AW1(a)) + #define AW3_(a) AW3_x(AW1(a)) + #define AW4_(a) AW4_x(AW1(a)) +//============================================================================================================================== + AW1 AAbsSW1(AW1 a){return AW1(abs(ASW1(a)));} + AW2 AAbsSW2(AW2 a){return AW2(abs(ASW2(a)));} + AW3 AAbsSW3(AW3 a){return AW3(abs(ASW3(a)));} + AW4 AAbsSW4(AW4 a){return AW4(abs(ASW4(a)));} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AClampH1(AH1 x,AH1 n,AH1 m){return clamp(x,n,m);} + AH2 AClampH2(AH2 x,AH2 n,AH2 m){return clamp(x,n,m);} + AH3 AClampH3(AH3 x,AH3 n,AH3 m){return clamp(x,n,m);} + AH4 AClampH4(AH4 x,AH4 n,AH4 m){return clamp(x,n,m);} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AFractH1(AH1 x){return fract(x);} + AH2 AFractH2(AH2 x){return fract(x);} + AH3 AFractH3(AH3 x){return fract(x);} + AH4 AFractH4(AH4 x){return fract(x);} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 ALerpH1(AH1 x,AH1 y,AH1 a){return mix(x,y,a);} + AH2 ALerpH2(AH2 x,AH2 y,AH2 a){return mix(x,y,a);} + AH3 ALerpH3(AH3 x,AH3 y,AH3 a){return mix(x,y,a);} + AH4 ALerpH4(AH4 x,AH4 y,AH4 a){return mix(x,y,a);} +//------------------------------------------------------------------------------------------------------------------------------ + // No packed version of max3. + AH1 AMax3H1(AH1 x,AH1 y,AH1 z){return max(x,max(y,z));} + AH2 AMax3H2(AH2 x,AH2 y,AH2 z){return max(x,max(y,z));} + AH3 AMax3H3(AH3 x,AH3 y,AH3 z){return max(x,max(y,z));} + AH4 AMax3H4(AH4 x,AH4 y,AH4 z){return max(x,max(y,z));} +//------------------------------------------------------------------------------------------------------------------------------ + AW1 AMaxSW1(AW1 a,AW1 b){return AW1(max(ASU1(a),ASU1(b)));} + AW2 AMaxSW2(AW2 a,AW2 b){return AW2(max(ASU2(a),ASU2(b)));} + AW3 AMaxSW3(AW3 a,AW3 b){return AW3(max(ASU3(a),ASU3(b)));} + AW4 AMaxSW4(AW4 a,AW4 b){return AW4(max(ASU4(a),ASU4(b)));} +//------------------------------------------------------------------------------------------------------------------------------ + // No packed version of min3. + AH1 AMin3H1(AH1 x,AH1 y,AH1 z){return min(x,min(y,z));} + AH2 AMin3H2(AH2 x,AH2 y,AH2 z){return min(x,min(y,z));} + AH3 AMin3H3(AH3 x,AH3 y,AH3 z){return min(x,min(y,z));} + AH4 AMin3H4(AH4 x,AH4 y,AH4 z){return min(x,min(y,z));} +//------------------------------------------------------------------------------------------------------------------------------ + AW1 AMinSW1(AW1 a,AW1 b){return AW1(min(ASU1(a),ASU1(b)));} + AW2 AMinSW2(AW2 a,AW2 b){return AW2(min(ASU2(a),ASU2(b)));} + AW3 AMinSW3(AW3 a,AW3 b){return AW3(min(ASU3(a),ASU3(b)));} + AW4 AMinSW4(AW4 a,AW4 b){return AW4(min(ASU4(a),ASU4(b)));} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 ARcpH1(AH1 x){return AH1_(1.0)/x;} + AH2 ARcpH2(AH2 x){return AH2_(1.0)/x;} + AH3 ARcpH3(AH3 x){return AH3_(1.0)/x;} + AH4 ARcpH4(AH4 x){return AH4_(1.0)/x;} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 ARsqH1(AH1 x){return AH1_(1.0)/sqrt(x);} + AH2 ARsqH2(AH2 x){return AH2_(1.0)/sqrt(x);} + AH3 ARsqH3(AH3 x){return AH3_(1.0)/sqrt(x);} + AH4 ARsqH4(AH4 x){return AH4_(1.0)/sqrt(x);} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 ASatH1(AH1 x){return clamp(x,AH1_(0.0),AH1_(1.0));} + AH2 ASatH2(AH2 x){return clamp(x,AH2_(0.0),AH2_(1.0));} + AH3 ASatH3(AH3 x){return clamp(x,AH3_(0.0),AH3_(1.0));} + AH4 ASatH4(AH4 x){return clamp(x,AH4_(0.0),AH4_(1.0));} +//------------------------------------------------------------------------------------------------------------------------------ + AW1 AShrSW1(AW1 a,AW1 b){return AW1(ASW1(a)>>ASW1(b));} + AW2 AShrSW2(AW2 a,AW2 b){return AW2(ASW2(a)>>ASW2(b));} + AW3 AShrSW3(AW3 a,AW3 b){return AW3(ASW3(a)>>ASW3(b));} + AW4 AShrSW4(AW4 a,AW4 b){return AW4(ASW4(a)>>ASW4(b));} + #endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// GLSL DOUBLE +//============================================================================================================================== + #ifdef A_DUBL + #define AD1 double + #define AD2 dvec2 + #define AD3 dvec3 + #define AD4 dvec4 +//------------------------------------------------------------------------------------------------------------------------------ + AD1 AD1_x(AD1 a){return AD1(a);} + AD2 AD2_x(AD1 a){return AD2(a,a);} + AD3 AD3_x(AD1 a){return AD3(a,a,a);} + AD4 AD4_x(AD1 a){return AD4(a,a,a,a);} + #define AD1_(a) AD1_x(AD1(a)) + #define AD2_(a) AD2_x(AD1(a)) + #define AD3_(a) AD3_x(AD1(a)) + #define AD4_(a) AD4_x(AD1(a)) +//============================================================================================================================== + AD1 AFractD1(AD1 x){return fract(x);} + AD2 AFractD2(AD2 x){return fract(x);} + AD3 AFractD3(AD3 x){return fract(x);} + AD4 AFractD4(AD4 x){return fract(x);} +//------------------------------------------------------------------------------------------------------------------------------ + AD1 ALerpD1(AD1 x,AD1 y,AD1 a){return mix(x,y,a);} + AD2 ALerpD2(AD2 x,AD2 y,AD2 a){return mix(x,y,a);} + AD3 ALerpD3(AD3 x,AD3 y,AD3 a){return mix(x,y,a);} + AD4 ALerpD4(AD4 x,AD4 y,AD4 a){return mix(x,y,a);} +//------------------------------------------------------------------------------------------------------------------------------ + AD1 ARcpD1(AD1 x){return AD1_(1.0)/x;} + AD2 ARcpD2(AD2 x){return AD2_(1.0)/x;} + AD3 ARcpD3(AD3 x){return AD3_(1.0)/x;} + AD4 ARcpD4(AD4 x){return AD4_(1.0)/x;} +//------------------------------------------------------------------------------------------------------------------------------ + AD1 ARsqD1(AD1 x){return AD1_(1.0)/sqrt(x);} + AD2 ARsqD2(AD2 x){return AD2_(1.0)/sqrt(x);} + AD3 ARsqD3(AD3 x){return AD3_(1.0)/sqrt(x);} + AD4 ARsqD4(AD4 x){return AD4_(1.0)/sqrt(x);} +//------------------------------------------------------------------------------------------------------------------------------ + AD1 ASatD1(AD1 x){return clamp(x,AD1_(0.0),AD1_(1.0));} + AD2 ASatD2(AD2 x){return clamp(x,AD2_(0.0),AD2_(1.0));} + AD3 ASatD3(AD3 x){return clamp(x,AD3_(0.0),AD3_(1.0));} + AD4 ASatD4(AD4 x){return clamp(x,AD4_(0.0),AD4_(1.0));} + #endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// GLSL LONG +//============================================================================================================================== + #ifdef A_LONG + #define AL1 uint64_t + #define AL2 u64vec2 + #define AL3 u64vec3 + #define AL4 u64vec4 +//------------------------------------------------------------------------------------------------------------------------------ + #define ASL1 int64_t + #define ASL2 i64vec2 + #define ASL3 i64vec3 + #define ASL4 i64vec4 +//------------------------------------------------------------------------------------------------------------------------------ + #define AL1_AU2(x) packUint2x32(AU2(x)) + #define AU2_AL1(x) unpackUint2x32(AL1(x)) +//------------------------------------------------------------------------------------------------------------------------------ + AL1 AL1_x(AL1 a){return AL1(a);} + AL2 AL2_x(AL1 a){return AL2(a,a);} + AL3 AL3_x(AL1 a){return AL3(a,a,a);} + AL4 AL4_x(AL1 a){return AL4(a,a,a,a);} + #define AL1_(a) AL1_x(AL1(a)) + #define AL2_(a) AL2_x(AL1(a)) + #define AL3_(a) AL3_x(AL1(a)) + #define AL4_(a) AL4_x(AL1(a)) +//============================================================================================================================== + AL1 AAbsSL1(AL1 a){return AL1(abs(ASL1(a)));} + AL2 AAbsSL2(AL2 a){return AL2(abs(ASL2(a)));} + AL3 AAbsSL3(AL3 a){return AL3(abs(ASL3(a)));} + AL4 AAbsSL4(AL4 a){return AL4(abs(ASL4(a)));} +//------------------------------------------------------------------------------------------------------------------------------ + AL1 AMaxSL1(AL1 a,AL1 b){return AL1(max(ASU1(a),ASU1(b)));} + AL2 AMaxSL2(AL2 a,AL2 b){return AL2(max(ASU2(a),ASU2(b)));} + AL3 AMaxSL3(AL3 a,AL3 b){return AL3(max(ASU3(a),ASU3(b)));} + AL4 AMaxSL4(AL4 a,AL4 b){return AL4(max(ASU4(a),ASU4(b)));} +//------------------------------------------------------------------------------------------------------------------------------ + AL1 AMinSL1(AL1 a,AL1 b){return AL1(min(ASU1(a),ASU1(b)));} + AL2 AMinSL2(AL2 a,AL2 b){return AL2(min(ASU2(a),ASU2(b)));} + AL3 AMinSL3(AL3 a,AL3 b){return AL3(min(ASU3(a),ASU3(b)));} + AL4 AMinSL4(AL4 a,AL4 b){return AL4(min(ASU4(a),ASU4(b)));} + #endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// WAVE OPERATIONS +//============================================================================================================================== + #ifdef A_WAVE + // Where 'x' must be a compile time literal. + AF1 AWaveXorF1(AF1 v,AU1 x){return subgroupShuffleXor(v,x);} + AF2 AWaveXorF2(AF2 v,AU1 x){return subgroupShuffleXor(v,x);} + AF3 AWaveXorF3(AF3 v,AU1 x){return subgroupShuffleXor(v,x);} + AF4 AWaveXorF4(AF4 v,AU1 x){return subgroupShuffleXor(v,x);} + AU1 AWaveXorU1(AU1 v,AU1 x){return subgroupShuffleXor(v,x);} + AU2 AWaveXorU2(AU2 v,AU1 x){return subgroupShuffleXor(v,x);} + AU3 AWaveXorU3(AU3 v,AU1 x){return subgroupShuffleXor(v,x);} + AU4 AWaveXorU4(AU4 v,AU1 x){return subgroupShuffleXor(v,x);} +//------------------------------------------------------------------------------------------------------------------------------ + #ifdef A_HALF + AH2 AWaveXorH2(AH2 v,AU1 x){return AH2_AU1(subgroupShuffleXor(AU1_AH2(v),x));} + AH4 AWaveXorH4(AH4 v,AU1 x){return AH4_AU2(subgroupShuffleXor(AU2_AH4(v),x));} + AW2 AWaveXorW2(AW2 v,AU1 x){return AW2_AU1(subgroupShuffleXor(AU1_AW2(v),x));} + AW4 AWaveXorW4(AW4 v,AU1 x){return AW4_AU2(subgroupShuffleXor(AU2_AW4(v),x));} + #endif + #endif +//============================================================================================================================== +#endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// +// +// HLSL +// +// +//============================================================================================================================== +#if defined(A_HLSL) && defined(A_GPU) + #ifdef A_HLSL_6_2 + #define AP1 bool + #define AP2 bool2 + #define AP3 bool3 + #define AP4 bool4 +//------------------------------------------------------------------------------------------------------------------------------ + #define AF1 float32_t + #define AF2 float32_t2 + #define AF3 float32_t3 + #define AF4 float32_t4 +//------------------------------------------------------------------------------------------------------------------------------ + #define AU1 uint32_t + #define AU2 uint32_t2 + #define AU3 uint32_t3 + #define AU4 uint32_t4 +//------------------------------------------------------------------------------------------------------------------------------ + #define ASU1 int32_t + #define ASU2 int32_t2 + #define ASU3 int32_t3 + #define ASU4 int32_t4 + #else + #define AP1 bool + #define AP2 bool2 + #define AP3 bool3 + #define AP4 bool4 +//------------------------------------------------------------------------------------------------------------------------------ + #define AF1 float + #define AF2 float2 + #define AF3 float3 + #define AF4 float4 +//------------------------------------------------------------------------------------------------------------------------------ + #define AU1 uint + #define AU2 uint2 + #define AU3 uint3 + #define AU4 uint4 +//------------------------------------------------------------------------------------------------------------------------------ + #define ASU1 int + #define ASU2 int2 + #define ASU3 int3 + #define ASU4 int4 + #endif +//============================================================================================================================== + #define AF1_AU1(x) asfloat(AU1(x)) + #define AF2_AU2(x) asfloat(AU2(x)) + #define AF3_AU3(x) asfloat(AU3(x)) + #define AF4_AU4(x) asfloat(AU4(x)) +//------------------------------------------------------------------------------------------------------------------------------ + #define AU1_AF1(x) asuint(AF1(x)) + #define AU2_AF2(x) asuint(AF2(x)) + #define AU3_AF3(x) asuint(AF3(x)) + #define AU4_AF4(x) asuint(AF4(x)) +//------------------------------------------------------------------------------------------------------------------------------ + AU1 AU1_AH1_AF1_x(AF1 a){return f32tof16(a);} + #define AU1_AH1_AF1(a) AU1_AH1_AF1_x(AF1(a)) +//------------------------------------------------------------------------------------------------------------------------------ + AU1 AU1_AH2_AF2_x(AF2 a){return f32tof16(a.x)|(f32tof16(a.y)<<16);} + #define AU1_AH2_AF2(a) AU1_AH2_AF2_x(AF2(a)) + #define AU1_AB4Unorm_AF4(x) D3DCOLORtoUBYTE4(AF4(x)) +//------------------------------------------------------------------------------------------------------------------------------ + AF2 AF2_AH2_AU1_x(AU1 x){return AF2(f16tof32(x&0xFFFF),f16tof32(x>>16));} + #define AF2_AH2_AU1(x) AF2_AH2_AU1_x(AU1(x)) +//============================================================================================================================== + AF1 AF1_x(AF1 a){return AF1(a);} + AF2 AF2_x(AF1 a){return AF2(a,a);} + AF3 AF3_x(AF1 a){return AF3(a,a,a);} + AF4 AF4_x(AF1 a){return AF4(a,a,a,a);} + #define AF1_(a) AF1_x(AF1(a)) + #define AF2_(a) AF2_x(AF1(a)) + #define AF3_(a) AF3_x(AF1(a)) + #define AF4_(a) AF4_x(AF1(a)) +//------------------------------------------------------------------------------------------------------------------------------ + AU1 AU1_x(AU1 a){return AU1(a);} + AU2 AU2_x(AU1 a){return AU2(a,a);} + AU3 AU3_x(AU1 a){return AU3(a,a,a);} + AU4 AU4_x(AU1 a){return AU4(a,a,a,a);} + #define AU1_(a) AU1_x(AU1(a)) + #define AU2_(a) AU2_x(AU1(a)) + #define AU3_(a) AU3_x(AU1(a)) + #define AU4_(a) AU4_x(AU1(a)) +//============================================================================================================================== + AU1 AAbsSU1(AU1 a){return AU1(abs(ASU1(a)));} + AU2 AAbsSU2(AU2 a){return AU2(abs(ASU2(a)));} + AU3 AAbsSU3(AU3 a){return AU3(abs(ASU3(a)));} + AU4 AAbsSU4(AU4 a){return AU4(abs(ASU4(a)));} +//------------------------------------------------------------------------------------------------------------------------------ + AU1 ABfe(AU1 src,AU1 off,AU1 bits){AU1 mask=(1u<>off)&mask;} + AU1 ABfi(AU1 src,AU1 ins,AU1 mask){return (ins&mask)|(src&(~mask));} + AU1 ABfiM(AU1 src,AU1 ins,AU1 bits){AU1 mask=(1u<>ASU1(b));} + AU2 AShrSU2(AU2 a,AU2 b){return AU2(ASU2(a)>>ASU2(b));} + AU3 AShrSU3(AU3 a,AU3 b){return AU3(ASU3(a)>>ASU3(b));} + AU4 AShrSU4(AU4 a,AU4 b){return AU4(ASU4(a)>>ASU4(b));} +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// HLSL BYTE +//============================================================================================================================== + #ifdef A_BYTE + #endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// HLSL HALF +//============================================================================================================================== + #ifdef A_HALF + #ifdef A_HLSL_6_2 + #define AH1 float16_t + #define AH2 float16_t2 + #define AH3 float16_t3 + #define AH4 float16_t4 +//------------------------------------------------------------------------------------------------------------------------------ + #define AW1 uint16_t + #define AW2 uint16_t2 + #define AW3 uint16_t3 + #define AW4 uint16_t4 +//------------------------------------------------------------------------------------------------------------------------------ + #define ASW1 int16_t + #define ASW2 int16_t2 + #define ASW3 int16_t3 + #define ASW4 int16_t4 + #else + #define AH1 min16float + #define AH2 min16float2 + #define AH3 min16float3 + #define AH4 min16float4 +//------------------------------------------------------------------------------------------------------------------------------ + #define AW1 min16uint + #define AW2 min16uint2 + #define AW3 min16uint3 + #define AW4 min16uint4 +//------------------------------------------------------------------------------------------------------------------------------ + #define ASW1 min16int + #define ASW2 min16int2 + #define ASW3 min16int3 + #define ASW4 min16int4 + #endif +//============================================================================================================================== + // Need to use manual unpack to get optimal execution (don't use packed types in buffers directly). + // Unpack requires this pattern: https://gpuopen.com/first-steps-implementing-fp16/ + AH2 AH2_AU1_x(AU1 x){AF2 t=f16tof32(AU2(x&0xFFFF,x>>16));return AH2(t);} + AH4 AH4_AU2_x(AU2 x){return AH4(AH2_AU1_x(x.x),AH2_AU1_x(x.y));} + AW2 AW2_AU1_x(AU1 x){AU2 t=AU2(x&0xFFFF,x>>16);return AW2(t);} + AW4 AW4_AU2_x(AU2 x){return AW4(AW2_AU1_x(x.x),AW2_AU1_x(x.y));} + #define AH2_AU1(x) AH2_AU1_x(AU1(x)) + #define AH4_AU2(x) AH4_AU2_x(AU2(x)) + #define AW2_AU1(x) AW2_AU1_x(AU1(x)) + #define AW4_AU2(x) AW4_AU2_x(AU2(x)) +//------------------------------------------------------------------------------------------------------------------------------ + AU1 AU1_AH2_x(AH2 x){return f32tof16(x.x)+(f32tof16(x.y)<<16);} + AU2 AU2_AH4_x(AH4 x){return AU2(AU1_AH2_x(x.xy),AU1_AH2_x(x.zw));} + AU1 AU1_AW2_x(AW2 x){return AU1(x.x)+(AU1(x.y)<<16);} + AU2 AU2_AW4_x(AW4 x){return AU2(AU1_AW2_x(x.xy),AU1_AW2_x(x.zw));} + #define AU1_AH2(x) AU1_AH2_x(AH2(x)) + #define AU2_AH4(x) AU2_AH4_x(AH4(x)) + #define AU1_AW2(x) AU1_AW2_x(AW2(x)) + #define AU2_AW4(x) AU2_AW4_x(AW4(x)) +//============================================================================================================================== + #if defined(A_HLSL_6_2) && !defined(A_NO_16_BIT_CAST) + #define AW1_AH1(x) asuint16(x) + #define AW2_AH2(x) asuint16(x) + #define AW3_AH3(x) asuint16(x) + #define AW4_AH4(x) asuint16(x) + #else + #define AW1_AH1(a) AW1(f32tof16(AF1(a))) + #define AW2_AH2(a) AW2(AW1_AH1((a).x),AW1_AH1((a).y)) + #define AW3_AH3(a) AW3(AW1_AH1((a).x),AW1_AH1((a).y),AW1_AH1((a).z)) + #define AW4_AH4(a) AW4(AW1_AH1((a).x),AW1_AH1((a).y),AW1_AH1((a).z),AW1_AH1((a).w)) + #endif +//------------------------------------------------------------------------------------------------------------------------------ + #if defined(A_HLSL_6_2) && !defined(A_NO_16_BIT_CAST) + #define AH1_AW1(x) asfloat16(x) + #define AH2_AW2(x) asfloat16(x) + #define AH3_AW3(x) asfloat16(x) + #define AH4_AW4(x) asfloat16(x) + #else + #define AH1_AW1(a) AH1(f16tof32(AU1(a))) + #define AH2_AW2(a) AH2(AH1_AW1((a).x),AH1_AW1((a).y)) + #define AH3_AW3(a) AH3(AH1_AW1((a).x),AH1_AW1((a).y),AH1_AW1((a).z)) + #define AH4_AW4(a) AH4(AH1_AW1((a).x),AH1_AW1((a).y),AH1_AW1((a).z),AH1_AW1((a).w)) + #endif +//============================================================================================================================== + AH1 AH1_x(AH1 a){return AH1(a);} + AH2 AH2_x(AH1 a){return AH2(a,a);} + AH3 AH3_x(AH1 a){return AH3(a,a,a);} + AH4 AH4_x(AH1 a){return AH4(a,a,a,a);} + #define AH1_(a) AH1_x(AH1(a)) + #define AH2_(a) AH2_x(AH1(a)) + #define AH3_(a) AH3_x(AH1(a)) + #define AH4_(a) AH4_x(AH1(a)) +//------------------------------------------------------------------------------------------------------------------------------ + AW1 AW1_x(AW1 a){return AW1(a);} + AW2 AW2_x(AW1 a){return AW2(a,a);} + AW3 AW3_x(AW1 a){return AW3(a,a,a);} + AW4 AW4_x(AW1 a){return AW4(a,a,a,a);} + #define AW1_(a) AW1_x(AW1(a)) + #define AW2_(a) AW2_x(AW1(a)) + #define AW3_(a) AW3_x(AW1(a)) + #define AW4_(a) AW4_x(AW1(a)) +//============================================================================================================================== + AW1 AAbsSW1(AW1 a){return AW1(abs(ASW1(a)));} + AW2 AAbsSW2(AW2 a){return AW2(abs(ASW2(a)));} + AW3 AAbsSW3(AW3 a){return AW3(abs(ASW3(a)));} + AW4 AAbsSW4(AW4 a){return AW4(abs(ASW4(a)));} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AClampH1(AH1 x,AH1 n,AH1 m){return max(n,min(x,m));} + AH2 AClampH2(AH2 x,AH2 n,AH2 m){return max(n,min(x,m));} + AH3 AClampH3(AH3 x,AH3 n,AH3 m){return max(n,min(x,m));} + AH4 AClampH4(AH4 x,AH4 n,AH4 m){return max(n,min(x,m));} +//------------------------------------------------------------------------------------------------------------------------------ + // V_FRACT_F16 (note DX frac() is different). + AH1 AFractH1(AH1 x){return x-floor(x);} + AH2 AFractH2(AH2 x){return x-floor(x);} + AH3 AFractH3(AH3 x){return x-floor(x);} + AH4 AFractH4(AH4 x){return x-floor(x);} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 ALerpH1(AH1 x,AH1 y,AH1 a){return lerp(x,y,a);} + AH2 ALerpH2(AH2 x,AH2 y,AH2 a){return lerp(x,y,a);} + AH3 ALerpH3(AH3 x,AH3 y,AH3 a){return lerp(x,y,a);} + AH4 ALerpH4(AH4 x,AH4 y,AH4 a){return lerp(x,y,a);} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AMax3H1(AH1 x,AH1 y,AH1 z){return max(x,max(y,z));} + AH2 AMax3H2(AH2 x,AH2 y,AH2 z){return max(x,max(y,z));} + AH3 AMax3H3(AH3 x,AH3 y,AH3 z){return max(x,max(y,z));} + AH4 AMax3H4(AH4 x,AH4 y,AH4 z){return max(x,max(y,z));} +//------------------------------------------------------------------------------------------------------------------------------ + AW1 AMaxSW1(AW1 a,AW1 b){return AW1(max(ASU1(a),ASU1(b)));} + AW2 AMaxSW2(AW2 a,AW2 b){return AW2(max(ASU2(a),ASU2(b)));} + AW3 AMaxSW3(AW3 a,AW3 b){return AW3(max(ASU3(a),ASU3(b)));} + AW4 AMaxSW4(AW4 a,AW4 b){return AW4(max(ASU4(a),ASU4(b)));} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AMin3H1(AH1 x,AH1 y,AH1 z){return min(x,min(y,z));} + AH2 AMin3H2(AH2 x,AH2 y,AH2 z){return min(x,min(y,z));} + AH3 AMin3H3(AH3 x,AH3 y,AH3 z){return min(x,min(y,z));} + AH4 AMin3H4(AH4 x,AH4 y,AH4 z){return min(x,min(y,z));} +//------------------------------------------------------------------------------------------------------------------------------ + AW1 AMinSW1(AW1 a,AW1 b){return AW1(min(ASU1(a),ASU1(b)));} + AW2 AMinSW2(AW2 a,AW2 b){return AW2(min(ASU2(a),ASU2(b)));} + AW3 AMinSW3(AW3 a,AW3 b){return AW3(min(ASU3(a),ASU3(b)));} + AW4 AMinSW4(AW4 a,AW4 b){return AW4(min(ASU4(a),ASU4(b)));} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 ARcpH1(AH1 x){return rcp(x);} + AH2 ARcpH2(AH2 x){return rcp(x);} + AH3 ARcpH3(AH3 x){return rcp(x);} + AH4 ARcpH4(AH4 x){return rcp(x);} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 ARsqH1(AH1 x){return rsqrt(x);} + AH2 ARsqH2(AH2 x){return rsqrt(x);} + AH3 ARsqH3(AH3 x){return rsqrt(x);} + AH4 ARsqH4(AH4 x){return rsqrt(x);} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 ASatH1(AH1 x){return saturate(x);} + AH2 ASatH2(AH2 x){return saturate(x);} + AH3 ASatH3(AH3 x){return saturate(x);} + AH4 ASatH4(AH4 x){return saturate(x);} +//------------------------------------------------------------------------------------------------------------------------------ + AW1 AShrSW1(AW1 a,AW1 b){return AW1(ASW1(a)>>ASW1(b));} + AW2 AShrSW2(AW2 a,AW2 b){return AW2(ASW2(a)>>ASW2(b));} + AW3 AShrSW3(AW3 a,AW3 b){return AW3(ASW3(a)>>ASW3(b));} + AW4 AShrSW4(AW4 a,AW4 b){return AW4(ASW4(a)>>ASW4(b));} + #endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// HLSL DOUBLE +//============================================================================================================================== + #ifdef A_DUBL + #ifdef A_HLSL_6_2 + #define AD1 float64_t + #define AD2 float64_t2 + #define AD3 float64_t3 + #define AD4 float64_t4 + #else + #define AD1 double + #define AD2 double2 + #define AD3 double3 + #define AD4 double4 + #endif +//------------------------------------------------------------------------------------------------------------------------------ + AD1 AD1_x(AD1 a){return AD1(a);} + AD2 AD2_x(AD1 a){return AD2(a,a);} + AD3 AD3_x(AD1 a){return AD3(a,a,a);} + AD4 AD4_x(AD1 a){return AD4(a,a,a,a);} + #define AD1_(a) AD1_x(AD1(a)) + #define AD2_(a) AD2_x(AD1(a)) + #define AD3_(a) AD3_x(AD1(a)) + #define AD4_(a) AD4_x(AD1(a)) +//============================================================================================================================== + AD1 AFractD1(AD1 a){return a-floor(a);} + AD2 AFractD2(AD2 a){return a-floor(a);} + AD3 AFractD3(AD3 a){return a-floor(a);} + AD4 AFractD4(AD4 a){return a-floor(a);} +//------------------------------------------------------------------------------------------------------------------------------ + AD1 ALerpD1(AD1 x,AD1 y,AD1 a){return lerp(x,y,a);} + AD2 ALerpD2(AD2 x,AD2 y,AD2 a){return lerp(x,y,a);} + AD3 ALerpD3(AD3 x,AD3 y,AD3 a){return lerp(x,y,a);} + AD4 ALerpD4(AD4 x,AD4 y,AD4 a){return lerp(x,y,a);} +//------------------------------------------------------------------------------------------------------------------------------ + AD1 ARcpD1(AD1 x){return rcp(x);} + AD2 ARcpD2(AD2 x){return rcp(x);} + AD3 ARcpD3(AD3 x){return rcp(x);} + AD4 ARcpD4(AD4 x){return rcp(x);} +//------------------------------------------------------------------------------------------------------------------------------ + AD1 ARsqD1(AD1 x){return rsqrt(x);} + AD2 ARsqD2(AD2 x){return rsqrt(x);} + AD3 ARsqD3(AD3 x){return rsqrt(x);} + AD4 ARsqD4(AD4 x){return rsqrt(x);} +//------------------------------------------------------------------------------------------------------------------------------ + AD1 ASatD1(AD1 x){return saturate(x);} + AD2 ASatD2(AD2 x){return saturate(x);} + AD3 ASatD3(AD3 x){return saturate(x);} + AD4 ASatD4(AD4 x){return saturate(x);} + #endif +//============================================================================================================================== +// HLSL WAVE +//============================================================================================================================== + #ifdef A_WAVE + // Where 'x' must be a compile time literal. + AF1 AWaveXorF1(AF1 v,AU1 x){return WaveReadLaneAt(v,WaveGetLaneIndex()^x);} + AF2 AWaveXorF2(AF2 v,AU1 x){return WaveReadLaneAt(v,WaveGetLaneIndex()^x);} + AF3 AWaveXorF3(AF3 v,AU1 x){return WaveReadLaneAt(v,WaveGetLaneIndex()^x);} + AF4 AWaveXorF4(AF4 v,AU1 x){return WaveReadLaneAt(v,WaveGetLaneIndex()^x);} + AU1 AWaveXorU1(AU1 v,AU1 x){return WaveReadLaneAt(v,WaveGetLaneIndex()^x);} + AU2 AWaveXorU1(AU2 v,AU1 x){return WaveReadLaneAt(v,WaveGetLaneIndex()^x);} + AU3 AWaveXorU1(AU3 v,AU1 x){return WaveReadLaneAt(v,WaveGetLaneIndex()^x);} + AU4 AWaveXorU1(AU4 v,AU1 x){return WaveReadLaneAt(v,WaveGetLaneIndex()^x);} +//------------------------------------------------------------------------------------------------------------------------------ + #ifdef A_HALF + AH2 AWaveXorH2(AH2 v,AU1 x){return AH2_AU1(WaveReadLaneAt(AU1_AH2(v),WaveGetLaneIndex()^x));} + AH4 AWaveXorH4(AH4 v,AU1 x){return AH4_AU2(WaveReadLaneAt(AU2_AH4(v),WaveGetLaneIndex()^x));} + AW2 AWaveXorW2(AW2 v,AU1 x){return AW2_AU1(WaveReadLaneAt(AU1_AW2(v),WaveGetLaneIndex()^x));} + AW4 AWaveXorW4(AW4 v,AU1 x){return AW4_AU1(WaveReadLaneAt(AU1_AW4(v),WaveGetLaneIndex()^x));} + #endif + #endif +//============================================================================================================================== +#endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// +// +// GPU COMMON +// +// +//============================================================================================================================== +#ifdef A_GPU + // Negative and positive infinity. + #define A_INFP_F AF1_AU1(0x7f800000u) + #define A_INFN_F AF1_AU1(0xff800000u) +//------------------------------------------------------------------------------------------------------------------------------ + // Copy sign from 's' to positive 'd'. + AF1 ACpySgnF1(AF1 d,AF1 s){return AF1_AU1(AU1_AF1(d)|(AU1_AF1(s)&AU1_(0x80000000u)));} + AF2 ACpySgnF2(AF2 d,AF2 s){return AF2_AU2(AU2_AF2(d)|(AU2_AF2(s)&AU2_(0x80000000u)));} + AF3 ACpySgnF3(AF3 d,AF3 s){return AF3_AU3(AU3_AF3(d)|(AU3_AF3(s)&AU3_(0x80000000u)));} + AF4 ACpySgnF4(AF4 d,AF4 s){return AF4_AU4(AU4_AF4(d)|(AU4_AF4(s)&AU4_(0x80000000u)));} +//------------------------------------------------------------------------------------------------------------------------------ + // Single operation to return (useful to create a mask to use in lerp for branch free logic), + // m=NaN := 0 + // m>=0 := 0 + // m<0 := 1 + // Uses the following useful floating point logic, + // saturate(+a*(-INF)==-INF) := 0 + // saturate( 0*(-INF)== NaN) := 0 + // saturate(-a*(-INF)==+INF) := 1 + AF1 ASignedF1(AF1 m){return ASatF1(m*AF1_(A_INFN_F));} + AF2 ASignedF2(AF2 m){return ASatF2(m*AF2_(A_INFN_F));} + AF3 ASignedF3(AF3 m){return ASatF3(m*AF3_(A_INFN_F));} + AF4 ASignedF4(AF4 m){return ASatF4(m*AF4_(A_INFN_F));} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AGtZeroF1(AF1 m){return ASatF1(m*AF1_(A_INFP_F));} + AF2 AGtZeroF2(AF2 m){return ASatF2(m*AF2_(A_INFP_F));} + AF3 AGtZeroF3(AF3 m){return ASatF3(m*AF3_(A_INFP_F));} + AF4 AGtZeroF4(AF4 m){return ASatF4(m*AF4_(A_INFP_F));} +//============================================================================================================================== + #ifdef A_HALF + #ifdef A_HLSL_6_2 + #define A_INFP_H AH1_AW1((uint16_t)0x7c00u) + #define A_INFN_H AH1_AW1((uint16_t)0xfc00u) + #else + #define A_INFP_H AH1_AW1(0x7c00u) + #define A_INFN_H AH1_AW1(0xfc00u) + #endif + +//------------------------------------------------------------------------------------------------------------------------------ + AH1 ACpySgnH1(AH1 d,AH1 s){return AH1_AW1(AW1_AH1(d)|(AW1_AH1(s)&AW1_(0x8000u)));} + AH2 ACpySgnH2(AH2 d,AH2 s){return AH2_AW2(AW2_AH2(d)|(AW2_AH2(s)&AW2_(0x8000u)));} + AH3 ACpySgnH3(AH3 d,AH3 s){return AH3_AW3(AW3_AH3(d)|(AW3_AH3(s)&AW3_(0x8000u)));} + AH4 ACpySgnH4(AH4 d,AH4 s){return AH4_AW4(AW4_AH4(d)|(AW4_AH4(s)&AW4_(0x8000u)));} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 ASignedH1(AH1 m){return ASatH1(m*AH1_(A_INFN_H));} + AH2 ASignedH2(AH2 m){return ASatH2(m*AH2_(A_INFN_H));} + AH3 ASignedH3(AH3 m){return ASatH3(m*AH3_(A_INFN_H));} + AH4 ASignedH4(AH4 m){return ASatH4(m*AH4_(A_INFN_H));} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AGtZeroH1(AH1 m){return ASatH1(m*AH1_(A_INFP_H));} + AH2 AGtZeroH2(AH2 m){return ASatH2(m*AH2_(A_INFP_H));} + AH3 AGtZeroH3(AH3 m){return ASatH3(m*AH3_(A_INFP_H));} + AH4 AGtZeroH4(AH4 m){return ASatH4(m*AH4_(A_INFP_H));} + #endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// [FIS] FLOAT INTEGER SORTABLE +//------------------------------------------------------------------------------------------------------------------------------ +// Float to integer sortable. +// - If sign bit=0, flip the sign bit (positives). +// - If sign bit=1, flip all bits (negatives). +// Integer sortable to float. +// - If sign bit=1, flip the sign bit (positives). +// - If sign bit=0, flip all bits (negatives). +// Has nice side effects. +// - Larger integers are more positive values. +// - Float zero is mapped to center of integers (so clear to integer zero is a nice default for atomic max usage). +// Burns 3 ops for conversion {shift,or,xor}. +//============================================================================================================================== + AU1 AFisToU1(AU1 x){return x^(( AShrSU1(x,AU1_(31)))|AU1_(0x80000000));} + AU1 AFisFromU1(AU1 x){return x^((~AShrSU1(x,AU1_(31)))|AU1_(0x80000000));} +//------------------------------------------------------------------------------------------------------------------------------ + // Just adjust high 16-bit value (useful when upper part of 32-bit word is a 16-bit float value). + AU1 AFisToHiU1(AU1 x){return x^(( AShrSU1(x,AU1_(15)))|AU1_(0x80000000));} + AU1 AFisFromHiU1(AU1 x){return x^((~AShrSU1(x,AU1_(15)))|AU1_(0x80000000));} +//------------------------------------------------------------------------------------------------------------------------------ + #ifdef A_HALF + AW1 AFisToW1(AW1 x){return x^(( AShrSW1(x,AW1_(15)))|AW1_(0x8000));} + AW1 AFisFromW1(AW1 x){return x^((~AShrSW1(x,AW1_(15)))|AW1_(0x8000));} +//------------------------------------------------------------------------------------------------------------------------------ + AW2 AFisToW2(AW2 x){return x^(( AShrSW2(x,AW2_(15)))|AW2_(0x8000));} + AW2 AFisFromW2(AW2 x){return x^((~AShrSW2(x,AW2_(15)))|AW2_(0x8000));} + #endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// [PERM] V_PERM_B32 +//------------------------------------------------------------------------------------------------------------------------------ +// Support for V_PERM_B32 started in the 3rd generation of GCN. +//------------------------------------------------------------------------------------------------------------------------------ +// yyyyxxxx - The 'i' input. +// 76543210 +// ======== +// HGFEDCBA - Naming on permutation. +//------------------------------------------------------------------------------------------------------------------------------ +// TODO +// ==== +// - Make sure compiler optimizes this. +//============================================================================================================================== + #ifdef A_HALF + AU1 APerm0E0A(AU2 i){return((i.x )&0xffu)|((i.y<<16)&0xff0000u);} + AU1 APerm0F0B(AU2 i){return((i.x>> 8)&0xffu)|((i.y<< 8)&0xff0000u);} + AU1 APerm0G0C(AU2 i){return((i.x>>16)&0xffu)|((i.y )&0xff0000u);} + AU1 APerm0H0D(AU2 i){return((i.x>>24)&0xffu)|((i.y>> 8)&0xff0000u);} +//------------------------------------------------------------------------------------------------------------------------------ + AU1 APermHGFA(AU2 i){return((i.x )&0x000000ffu)|(i.y&0xffffff00u);} + AU1 APermHGFC(AU2 i){return((i.x>>16)&0x000000ffu)|(i.y&0xffffff00u);} + AU1 APermHGAE(AU2 i){return((i.x<< 8)&0x0000ff00u)|(i.y&0xffff00ffu);} + AU1 APermHGCE(AU2 i){return((i.x>> 8)&0x0000ff00u)|(i.y&0xffff00ffu);} + AU1 APermHAFE(AU2 i){return((i.x<<16)&0x00ff0000u)|(i.y&0xff00ffffu);} + AU1 APermHCFE(AU2 i){return((i.x )&0x00ff0000u)|(i.y&0xff00ffffu);} + AU1 APermAGFE(AU2 i){return((i.x<<24)&0xff000000u)|(i.y&0x00ffffffu);} + AU1 APermCGFE(AU2 i){return((i.x<< 8)&0xff000000u)|(i.y&0x00ffffffu);} +//------------------------------------------------------------------------------------------------------------------------------ + AU1 APermGCEA(AU2 i){return((i.x)&0x00ff00ffu)|((i.y<<8)&0xff00ff00u);} + AU1 APermGECA(AU2 i){return(((i.x)&0xffu)|((i.x>>8)&0xff00u)|((i.y<<16)&0xff0000u)|((i.y<<8)&0xff000000u));} + #endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// [BUC] BYTE UNSIGNED CONVERSION +//------------------------------------------------------------------------------------------------------------------------------ +// Designed to use the optimal conversion, enables the scaling to possibly be factored into other computation. +// Works on a range of {0 to A_BUC_<32,16>}, for <32-bit, and 16-bit> respectively. +//------------------------------------------------------------------------------------------------------------------------------ +// OPCODE NOTES +// ============ +// GCN does not do UNORM or SNORM for bytes in opcodes. +// - V_CVT_F32_UBYTE{0,1,2,3} - Unsigned byte to float. +// - V_CVT_PKACC_U8_F32 - Float to unsigned byte (does bit-field insert into 32-bit integer). +// V_PERM_B32 does byte packing with ability to zero fill bytes as well. +// - Can pull out byte values from two sources, and zero fill upper 8-bits of packed hi and lo. +//------------------------------------------------------------------------------------------------------------------------------ +// BYTE : FLOAT - ABuc{0,1,2,3}{To,From}U1() - Designed for V_CVT_F32_UBYTE* and V_CVT_PKACCUM_U8_F32 ops. +// ==== ===== +// 0 : 0 +// 1 : 1 +// ... +// 255 : 255 +// : 256 (just outside the encoding range) +//------------------------------------------------------------------------------------------------------------------------------ +// BYTE : FLOAT - ABuc{0,1,2,3}{To,From}U2() - Designed for 16-bit denormal tricks and V_PERM_B32. +// ==== ===== +// 0 : 0 +// 1 : 1/512 +// 2 : 1/256 +// ... +// 64 : 1/8 +// 128 : 1/4 +// 255 : 255/512 +// : 1/2 (just outside the encoding range) +//------------------------------------------------------------------------------------------------------------------------------ +// OPTIMAL IMPLEMENTATIONS ON AMD ARCHITECTURES +// ============================================ +// r=ABuc0FromU1(i) +// V_CVT_F32_UBYTE0 r,i +// -------------------------------------------- +// r=ABuc0ToU1(d,i) +// V_CVT_PKACCUM_U8_F32 r,i,0,d +// -------------------------------------------- +// d=ABuc0FromU2(i) +// Where 'k0' is an SGPR with 0x0E0A +// Where 'k1' is an SGPR with {32768.0} packed into the lower 16-bits +// V_PERM_B32 d,i.x,i.y,k0 +// V_PK_FMA_F16 d,d,k1.x,0 +// -------------------------------------------- +// r=ABuc0ToU2(d,i) +// Where 'k0' is an SGPR with {1.0/32768.0} packed into the lower 16-bits +// Where 'k1' is an SGPR with 0x???? +// Where 'k2' is an SGPR with 0x???? +// V_PK_FMA_F16 i,i,k0.x,0 +// V_PERM_B32 r.x,i,i,k1 +// V_PERM_B32 r.y,i,i,k2 +//============================================================================================================================== + // Peak range for 32-bit and 16-bit operations. + #define A_BUC_32 (255.0) + #define A_BUC_16 (255.0/512.0) +//============================================================================================================================== + #if 1 + // Designed to be one V_CVT_PKACCUM_U8_F32. + // The extra min is required to pattern match to V_CVT_PKACCUM_U8_F32. + AU1 ABuc0ToU1(AU1 d,AF1 i){return (d&0xffffff00u)|((min(AU1(i),255u) )&(0x000000ffu));} + AU1 ABuc1ToU1(AU1 d,AF1 i){return (d&0xffff00ffu)|((min(AU1(i),255u)<< 8)&(0x0000ff00u));} + AU1 ABuc2ToU1(AU1 d,AF1 i){return (d&0xff00ffffu)|((min(AU1(i),255u)<<16)&(0x00ff0000u));} + AU1 ABuc3ToU1(AU1 d,AF1 i){return (d&0x00ffffffu)|((min(AU1(i),255u)<<24)&(0xff000000u));} +//------------------------------------------------------------------------------------------------------------------------------ + // Designed to be one V_CVT_F32_UBYTE*. + AF1 ABuc0FromU1(AU1 i){return AF1((i )&255u);} + AF1 ABuc1FromU1(AU1 i){return AF1((i>> 8)&255u);} + AF1 ABuc2FromU1(AU1 i){return AF1((i>>16)&255u);} + AF1 ABuc3FromU1(AU1 i){return AF1((i>>24)&255u);} + #endif +//============================================================================================================================== + #ifdef A_HALF + // Takes {x0,x1} and {y0,y1} and builds {{x0,y0},{x1,y1}}. + AW2 ABuc01ToW2(AH2 x,AH2 y){x*=AH2_(1.0/32768.0);y*=AH2_(1.0/32768.0); + return AW2_AU1(APermGCEA(AU2(AU1_AW2(AW2_AH2(x)),AU1_AW2(AW2_AH2(y)))));} +//------------------------------------------------------------------------------------------------------------------------------ + // Designed for 3 ops to do SOA to AOS and conversion. + AU2 ABuc0ToU2(AU2 d,AH2 i){AU1 b=AU1_AW2(AW2_AH2(i*AH2_(1.0/32768.0))); + return AU2(APermHGFA(AU2(d.x,b)),APermHGFC(AU2(d.y,b)));} + AU2 ABuc1ToU2(AU2 d,AH2 i){AU1 b=AU1_AW2(AW2_AH2(i*AH2_(1.0/32768.0))); + return AU2(APermHGAE(AU2(d.x,b)),APermHGCE(AU2(d.y,b)));} + AU2 ABuc2ToU2(AU2 d,AH2 i){AU1 b=AU1_AW2(AW2_AH2(i*AH2_(1.0/32768.0))); + return AU2(APermHAFE(AU2(d.x,b)),APermHCFE(AU2(d.y,b)));} + AU2 ABuc3ToU2(AU2 d,AH2 i){AU1 b=AU1_AW2(AW2_AH2(i*AH2_(1.0/32768.0))); + return AU2(APermAGFE(AU2(d.x,b)),APermCGFE(AU2(d.y,b)));} +//------------------------------------------------------------------------------------------------------------------------------ + // Designed for 2 ops to do both AOS to SOA, and conversion. + AH2 ABuc0FromU2(AU2 i){return AH2_AW2(AW2_AU1(APerm0E0A(i)))*AH2_(32768.0);} + AH2 ABuc1FromU2(AU2 i){return AH2_AW2(AW2_AU1(APerm0F0B(i)))*AH2_(32768.0);} + AH2 ABuc2FromU2(AU2 i){return AH2_AW2(AW2_AU1(APerm0G0C(i)))*AH2_(32768.0);} + AH2 ABuc3FromU2(AU2 i){return AH2_AW2(AW2_AU1(APerm0H0D(i)))*AH2_(32768.0);} + #endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// [BSC] BYTE SIGNED CONVERSION +//------------------------------------------------------------------------------------------------------------------------------ +// Similar to [BUC]. +// Works on a range of {-/+ A_BSC_<32,16>}, for <32-bit, and 16-bit> respectively. +//------------------------------------------------------------------------------------------------------------------------------ +// ENCODING (without zero-based encoding) +// ======== +// 0 = unused (can be used to mean something else) +// 1 = lowest value +// 128 = exact zero center (zero based encoding +// 255 = highest value +//------------------------------------------------------------------------------------------------------------------------------ +// Zero-based [Zb] flips the MSB bit of the byte (making 128 "exact zero" actually zero). +// This is useful if there is a desire for cleared values to decode as zero. +//------------------------------------------------------------------------------------------------------------------------------ +// BYTE : FLOAT - ABsc{0,1,2,3}{To,From}U2() - Designed for 16-bit denormal tricks and V_PERM_B32. +// ==== ===== +// 0 : -127/512 (unused) +// 1 : -126/512 +// 2 : -125/512 +// ... +// 128 : 0 +// ... +// 255 : 127/512 +// : 1/4 (just outside the encoding range) +//============================================================================================================================== + // Peak range for 32-bit and 16-bit operations. + #define A_BSC_32 (127.0) + #define A_BSC_16 (127.0/512.0) +//============================================================================================================================== + #if 1 + AU1 ABsc0ToU1(AU1 d,AF1 i){return (d&0xffffff00u)|((min(AU1(i+128.0),255u) )&(0x000000ffu));} + AU1 ABsc1ToU1(AU1 d,AF1 i){return (d&0xffff00ffu)|((min(AU1(i+128.0),255u)<< 8)&(0x0000ff00u));} + AU1 ABsc2ToU1(AU1 d,AF1 i){return (d&0xff00ffffu)|((min(AU1(i+128.0),255u)<<16)&(0x00ff0000u));} + AU1 ABsc3ToU1(AU1 d,AF1 i){return (d&0x00ffffffu)|((min(AU1(i+128.0),255u)<<24)&(0xff000000u));} +//------------------------------------------------------------------------------------------------------------------------------ + AU1 ABsc0ToZbU1(AU1 d,AF1 i){return ((d&0xffffff00u)|((min(AU1(trunc(i)+128.0),255u) )&(0x000000ffu)))^0x00000080u;} + AU1 ABsc1ToZbU1(AU1 d,AF1 i){return ((d&0xffff00ffu)|((min(AU1(trunc(i)+128.0),255u)<< 8)&(0x0000ff00u)))^0x00008000u;} + AU1 ABsc2ToZbU1(AU1 d,AF1 i){return ((d&0xff00ffffu)|((min(AU1(trunc(i)+128.0),255u)<<16)&(0x00ff0000u)))^0x00800000u;} + AU1 ABsc3ToZbU1(AU1 d,AF1 i){return ((d&0x00ffffffu)|((min(AU1(trunc(i)+128.0),255u)<<24)&(0xff000000u)))^0x80000000u;} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 ABsc0FromU1(AU1 i){return AF1((i )&255u)-128.0;} + AF1 ABsc1FromU1(AU1 i){return AF1((i>> 8)&255u)-128.0;} + AF1 ABsc2FromU1(AU1 i){return AF1((i>>16)&255u)-128.0;} + AF1 ABsc3FromU1(AU1 i){return AF1((i>>24)&255u)-128.0;} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 ABsc0FromZbU1(AU1 i){return AF1(((i )&255u)^0x80u)-128.0;} + AF1 ABsc1FromZbU1(AU1 i){return AF1(((i>> 8)&255u)^0x80u)-128.0;} + AF1 ABsc2FromZbU1(AU1 i){return AF1(((i>>16)&255u)^0x80u)-128.0;} + AF1 ABsc3FromZbU1(AU1 i){return AF1(((i>>24)&255u)^0x80u)-128.0;} + #endif +//============================================================================================================================== + #ifdef A_HALF + // Takes {x0,x1} and {y0,y1} and builds {{x0,y0},{x1,y1}}. + AW2 ABsc01ToW2(AH2 x,AH2 y){x=x*AH2_(1.0/32768.0)+AH2_(0.25/32768.0);y=y*AH2_(1.0/32768.0)+AH2_(0.25/32768.0); + return AW2_AU1(APermGCEA(AU2(AU1_AW2(AW2_AH2(x)),AU1_AW2(AW2_AH2(y)))));} +//------------------------------------------------------------------------------------------------------------------------------ + AU2 ABsc0ToU2(AU2 d,AH2 i){AU1 b=AU1_AW2(AW2_AH2(i*AH2_(1.0/32768.0)+AH2_(0.25/32768.0))); + return AU2(APermHGFA(AU2(d.x,b)),APermHGFC(AU2(d.y,b)));} + AU2 ABsc1ToU2(AU2 d,AH2 i){AU1 b=AU1_AW2(AW2_AH2(i*AH2_(1.0/32768.0)+AH2_(0.25/32768.0))); + return AU2(APermHGAE(AU2(d.x,b)),APermHGCE(AU2(d.y,b)));} + AU2 ABsc2ToU2(AU2 d,AH2 i){AU1 b=AU1_AW2(AW2_AH2(i*AH2_(1.0/32768.0)+AH2_(0.25/32768.0))); + return AU2(APermHAFE(AU2(d.x,b)),APermHCFE(AU2(d.y,b)));} + AU2 ABsc3ToU2(AU2 d,AH2 i){AU1 b=AU1_AW2(AW2_AH2(i*AH2_(1.0/32768.0)+AH2_(0.25/32768.0))); + return AU2(APermAGFE(AU2(d.x,b)),APermCGFE(AU2(d.y,b)));} +//------------------------------------------------------------------------------------------------------------------------------ + AU2 ABsc0ToZbU2(AU2 d,AH2 i){AU1 b=AU1_AW2(AW2_AH2(i*AH2_(1.0/32768.0)+AH2_(0.25/32768.0)))^0x00800080u; + return AU2(APermHGFA(AU2(d.x,b)),APermHGFC(AU2(d.y,b)));} + AU2 ABsc1ToZbU2(AU2 d,AH2 i){AU1 b=AU1_AW2(AW2_AH2(i*AH2_(1.0/32768.0)+AH2_(0.25/32768.0)))^0x00800080u; + return AU2(APermHGAE(AU2(d.x,b)),APermHGCE(AU2(d.y,b)));} + AU2 ABsc2ToZbU2(AU2 d,AH2 i){AU1 b=AU1_AW2(AW2_AH2(i*AH2_(1.0/32768.0)+AH2_(0.25/32768.0)))^0x00800080u; + return AU2(APermHAFE(AU2(d.x,b)),APermHCFE(AU2(d.y,b)));} + AU2 ABsc3ToZbU2(AU2 d,AH2 i){AU1 b=AU1_AW2(AW2_AH2(i*AH2_(1.0/32768.0)+AH2_(0.25/32768.0)))^0x00800080u; + return AU2(APermAGFE(AU2(d.x,b)),APermCGFE(AU2(d.y,b)));} +//------------------------------------------------------------------------------------------------------------------------------ + AH2 ABsc0FromU2(AU2 i){return AH2_AW2(AW2_AU1(APerm0E0A(i)))*AH2_(32768.0)-AH2_(0.25);} + AH2 ABsc1FromU2(AU2 i){return AH2_AW2(AW2_AU1(APerm0F0B(i)))*AH2_(32768.0)-AH2_(0.25);} + AH2 ABsc2FromU2(AU2 i){return AH2_AW2(AW2_AU1(APerm0G0C(i)))*AH2_(32768.0)-AH2_(0.25);} + AH2 ABsc3FromU2(AU2 i){return AH2_AW2(AW2_AU1(APerm0H0D(i)))*AH2_(32768.0)-AH2_(0.25);} +//------------------------------------------------------------------------------------------------------------------------------ + AH2 ABsc0FromZbU2(AU2 i){return AH2_AW2(AW2_AU1(APerm0E0A(i)^0x00800080u))*AH2_(32768.0)-AH2_(0.25);} + AH2 ABsc1FromZbU2(AU2 i){return AH2_AW2(AW2_AU1(APerm0F0B(i)^0x00800080u))*AH2_(32768.0)-AH2_(0.25);} + AH2 ABsc2FromZbU2(AU2 i){return AH2_AW2(AW2_AU1(APerm0G0C(i)^0x00800080u))*AH2_(32768.0)-AH2_(0.25);} + AH2 ABsc3FromZbU2(AU2 i){return AH2_AW2(AW2_AU1(APerm0H0D(i)^0x00800080u))*AH2_(32768.0)-AH2_(0.25);} + #endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// HALF APPROXIMATIONS +//------------------------------------------------------------------------------------------------------------------------------ +// These support only positive inputs. +// Did not see value yet in specialization for range. +// Using quick testing, ended up mostly getting the same "best" approximation for various ranges. +// With hardware that can co-execute transcendentals, the value in approximations could be less than expected. +// However from a latency perspective, if execution of a transcendental is 4 clk, with no packed support, -> 8 clk total. +// And co-execution would require a compiler interleaving a lot of independent work for packed usage. +//------------------------------------------------------------------------------------------------------------------------------ +// The one Newton Raphson iteration form of rsq() was skipped (requires 6 ops total). +// Same with sqrt(), as this could be x*rsq() (7 ops). +//============================================================================================================================== + #ifdef A_HALF + // Minimize squared error across full positive range, 2 ops. + // The 0x1de2 based approximation maps {0 to 1} input maps to < 1 output. + AH1 APrxLoSqrtH1(AH1 a){return AH1_AW1((AW1_AH1(a)>>AW1_(1))+AW1_(0x1de2));} + AH2 APrxLoSqrtH2(AH2 a){return AH2_AW2((AW2_AH2(a)>>AW2_(1))+AW2_(0x1de2));} + AH3 APrxLoSqrtH3(AH3 a){return AH3_AW3((AW3_AH3(a)>>AW3_(1))+AW3_(0x1de2));} + AH4 APrxLoSqrtH4(AH4 a){return AH4_AW4((AW4_AH4(a)>>AW4_(1))+AW4_(0x1de2));} +//------------------------------------------------------------------------------------------------------------------------------ + // Lower precision estimation, 1 op. + // Minimize squared error across {smallest normal to 16384.0}. + AH1 APrxLoRcpH1(AH1 a){return AH1_AW1(AW1_(0x7784)-AW1_AH1(a));} + AH2 APrxLoRcpH2(AH2 a){return AH2_AW2(AW2_(0x7784)-AW2_AH2(a));} + AH3 APrxLoRcpH3(AH3 a){return AH3_AW3(AW3_(0x7784)-AW3_AH3(a));} + AH4 APrxLoRcpH4(AH4 a){return AH4_AW4(AW4_(0x7784)-AW4_AH4(a));} +//------------------------------------------------------------------------------------------------------------------------------ + // Medium precision estimation, one Newton Raphson iteration, 3 ops. + AH1 APrxMedRcpH1(AH1 a){AH1 b=AH1_AW1(AW1_(0x778d)-AW1_AH1(a));return b*(-b*a+AH1_(2.0));} + AH2 APrxMedRcpH2(AH2 a){AH2 b=AH2_AW2(AW2_(0x778d)-AW2_AH2(a));return b*(-b*a+AH2_(2.0));} + AH3 APrxMedRcpH3(AH3 a){AH3 b=AH3_AW3(AW3_(0x778d)-AW3_AH3(a));return b*(-b*a+AH3_(2.0));} + AH4 APrxMedRcpH4(AH4 a){AH4 b=AH4_AW4(AW4_(0x778d)-AW4_AH4(a));return b*(-b*a+AH4_(2.0));} +//------------------------------------------------------------------------------------------------------------------------------ + // Minimize squared error across {smallest normal to 16384.0}, 2 ops. + AH1 APrxLoRsqH1(AH1 a){return AH1_AW1(AW1_(0x59a3)-(AW1_AH1(a)>>AW1_(1)));} + AH2 APrxLoRsqH2(AH2 a){return AH2_AW2(AW2_(0x59a3)-(AW2_AH2(a)>>AW2_(1)));} + AH3 APrxLoRsqH3(AH3 a){return AH3_AW3(AW3_(0x59a3)-(AW3_AH3(a)>>AW3_(1)));} + AH4 APrxLoRsqH4(AH4 a){return AH4_AW4(AW4_(0x59a3)-(AW4_AH4(a)>>AW4_(1)));} + #endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// FLOAT APPROXIMATIONS +//------------------------------------------------------------------------------------------------------------------------------ +// Michal Drobot has an excellent presentation on these: "Low Level Optimizations For GCN", +// - Idea dates back to SGI, then to Quake 3, etc. +// - https://michaldrobot.files.wordpress.com/2014/05/gcn_alu_opt_digitaldragons2014.pdf +// - sqrt(x)=rsqrt(x)*x +// - rcp(x)=rsqrt(x)*rsqrt(x) for positive x +// - https://github.com/michaldrobot/ShaderFastLibs/blob/master/ShaderFastMathLib.h +//------------------------------------------------------------------------------------------------------------------------------ +// These below are from perhaps less complete searching for optimal. +// Used FP16 normal range for testing with +4096 32-bit step size for sampling error. +// So these match up well with the half approximations. +//============================================================================================================================== + AF1 APrxLoSqrtF1(AF1 a){return AF1_AU1((AU1_AF1(a)>>AU1_(1))+AU1_(0x1fbc4639));} + AF1 APrxLoRcpF1(AF1 a){return AF1_AU1(AU1_(0x7ef07ebb)-AU1_AF1(a));} + AF1 APrxMedRcpF1(AF1 a){AF1 b=AF1_AU1(AU1_(0x7ef19fff)-AU1_AF1(a));return b*(-b*a+AF1_(2.0));} + AF1 APrxLoRsqF1(AF1 a){return AF1_AU1(AU1_(0x5f347d74)-(AU1_AF1(a)>>AU1_(1)));} +//------------------------------------------------------------------------------------------------------------------------------ + AF2 APrxLoSqrtF2(AF2 a){return AF2_AU2((AU2_AF2(a)>>AU2_(1))+AU2_(0x1fbc4639));} + AF2 APrxLoRcpF2(AF2 a){return AF2_AU2(AU2_(0x7ef07ebb)-AU2_AF2(a));} + AF2 APrxMedRcpF2(AF2 a){AF2 b=AF2_AU2(AU2_(0x7ef19fff)-AU2_AF2(a));return b*(-b*a+AF2_(2.0));} + AF2 APrxLoRsqF2(AF2 a){return AF2_AU2(AU2_(0x5f347d74)-(AU2_AF2(a)>>AU2_(1)));} +//------------------------------------------------------------------------------------------------------------------------------ + AF3 APrxLoSqrtF3(AF3 a){return AF3_AU3((AU3_AF3(a)>>AU3_(1))+AU3_(0x1fbc4639));} + AF3 APrxLoRcpF3(AF3 a){return AF3_AU3(AU3_(0x7ef07ebb)-AU3_AF3(a));} + AF3 APrxMedRcpF3(AF3 a){AF3 b=AF3_AU3(AU3_(0x7ef19fff)-AU3_AF3(a));return b*(-b*a+AF3_(2.0));} + AF3 APrxLoRsqF3(AF3 a){return AF3_AU3(AU3_(0x5f347d74)-(AU3_AF3(a)>>AU3_(1)));} +//------------------------------------------------------------------------------------------------------------------------------ + AF4 APrxLoSqrtF4(AF4 a){return AF4_AU4((AU4_AF4(a)>>AU4_(1))+AU4_(0x1fbc4639));} + AF4 APrxLoRcpF4(AF4 a){return AF4_AU4(AU4_(0x7ef07ebb)-AU4_AF4(a));} + AF4 APrxMedRcpF4(AF4 a){AF4 b=AF4_AU4(AU4_(0x7ef19fff)-AU4_AF4(a));return b*(-b*a+AF4_(2.0));} + AF4 APrxLoRsqF4(AF4 a){return AF4_AU4(AU4_(0x5f347d74)-(AU4_AF4(a)>>AU4_(1)));} +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// PQ APPROXIMATIONS +//------------------------------------------------------------------------------------------------------------------------------ +// PQ is very close to x^(1/8). The functions below Use the fast float approximation method to do +// PQ<~>Gamma2 (4th power and fast 4th root) and PQ<~>Linear (8th power and fast 8th root). Maximum error is ~0.2%. +//============================================================================================================================== +// Helpers + AF1 Quart(AF1 a) { a = a * a; return a * a;} + AF1 Oct(AF1 a) { a = a * a; a = a * a; return a * a; } + AF2 Quart(AF2 a) { a = a * a; return a * a; } + AF2 Oct(AF2 a) { a = a * a; a = a * a; return a * a; } + AF3 Quart(AF3 a) { a = a * a; return a * a; } + AF3 Oct(AF3 a) { a = a * a; a = a * a; return a * a; } + AF4 Quart(AF4 a) { a = a * a; return a * a; } + AF4 Oct(AF4 a) { a = a * a; a = a * a; return a * a; } + //------------------------------------------------------------------------------------------------------------------------------ + AF1 APrxPQToGamma2(AF1 a) { return Quart(a); } + AF1 APrxPQToLinear(AF1 a) { return Oct(a); } + AF1 APrxLoGamma2ToPQ(AF1 a) { return AF1_AU1((AU1_AF1(a) >> AU1_(2)) + AU1_(0x2F9A4E46)); } + AF1 APrxMedGamma2ToPQ(AF1 a) { AF1 b = AF1_AU1((AU1_AF1(a) >> AU1_(2)) + AU1_(0x2F9A4E46)); AF1 b4 = Quart(b); return b - b * (b4 - a) / (AF1_(4.0) * b4); } + AF1 APrxHighGamma2ToPQ(AF1 a) { return sqrt(sqrt(a)); } + AF1 APrxLoLinearToPQ(AF1 a) { return AF1_AU1((AU1_AF1(a) >> AU1_(3)) + AU1_(0x378D8723)); } + AF1 APrxMedLinearToPQ(AF1 a) { AF1 b = AF1_AU1((AU1_AF1(a) >> AU1_(3)) + AU1_(0x378D8723)); AF1 b8 = Oct(b); return b - b * (b8 - a) / (AF1_(8.0) * b8); } + AF1 APrxHighLinearToPQ(AF1 a) { return sqrt(sqrt(sqrt(a))); } + //------------------------------------------------------------------------------------------------------------------------------ + AF2 APrxPQToGamma2(AF2 a) { return Quart(a); } + AF2 APrxPQToLinear(AF2 a) { return Oct(a); } + AF2 APrxLoGamma2ToPQ(AF2 a) { return AF2_AU2((AU2_AF2(a) >> AU2_(2)) + AU2_(0x2F9A4E46)); } + AF2 APrxMedGamma2ToPQ(AF2 a) { AF2 b = AF2_AU2((AU2_AF2(a) >> AU2_(2)) + AU2_(0x2F9A4E46)); AF2 b4 = Quart(b); return b - b * (b4 - a) / (AF1_(4.0) * b4); } + AF2 APrxHighGamma2ToPQ(AF2 a) { return sqrt(sqrt(a)); } + AF2 APrxLoLinearToPQ(AF2 a) { return AF2_AU2((AU2_AF2(a) >> AU2_(3)) + AU2_(0x378D8723)); } + AF2 APrxMedLinearToPQ(AF2 a) { AF2 b = AF2_AU2((AU2_AF2(a) >> AU2_(3)) + AU2_(0x378D8723)); AF2 b8 = Oct(b); return b - b * (b8 - a) / (AF1_(8.0) * b8); } + AF2 APrxHighLinearToPQ(AF2 a) { return sqrt(sqrt(sqrt(a))); } + //------------------------------------------------------------------------------------------------------------------------------ + AF3 APrxPQToGamma2(AF3 a) { return Quart(a); } + AF3 APrxPQToLinear(AF3 a) { return Oct(a); } + AF3 APrxLoGamma2ToPQ(AF3 a) { return AF3_AU3((AU3_AF3(a) >> AU3_(2)) + AU3_(0x2F9A4E46)); } + AF3 APrxMedGamma2ToPQ(AF3 a) { AF3 b = AF3_AU3((AU3_AF3(a) >> AU3_(2)) + AU3_(0x2F9A4E46)); AF3 b4 = Quart(b); return b - b * (b4 - a) / (AF1_(4.0) * b4); } + AF3 APrxHighGamma2ToPQ(AF3 a) { return sqrt(sqrt(a)); } + AF3 APrxLoLinearToPQ(AF3 a) { return AF3_AU3((AU3_AF3(a) >> AU3_(3)) + AU3_(0x378D8723)); } + AF3 APrxMedLinearToPQ(AF3 a) { AF3 b = AF3_AU3((AU3_AF3(a) >> AU3_(3)) + AU3_(0x378D8723)); AF3 b8 = Oct(b); return b - b * (b8 - a) / (AF1_(8.0) * b8); } + AF3 APrxHighLinearToPQ(AF3 a) { return sqrt(sqrt(sqrt(a))); } + //------------------------------------------------------------------------------------------------------------------------------ + AF4 APrxPQToGamma2(AF4 a) { return Quart(a); } + AF4 APrxPQToLinear(AF4 a) { return Oct(a); } + AF4 APrxLoGamma2ToPQ(AF4 a) { return AF4_AU4((AU4_AF4(a) >> AU4_(2)) + AU4_(0x2F9A4E46)); } + AF4 APrxMedGamma2ToPQ(AF4 a) { AF4 b = AF4_AU4((AU4_AF4(a) >> AU4_(2)) + AU4_(0x2F9A4E46)); AF4 b4 = Quart(b); return b - b * (b4 - a) / (AF1_(4.0) * b4); } + AF4 APrxHighGamma2ToPQ(AF4 a) { return sqrt(sqrt(a)); } + AF4 APrxLoLinearToPQ(AF4 a) { return AF4_AU4((AU4_AF4(a) >> AU4_(3)) + AU4_(0x378D8723)); } + AF4 APrxMedLinearToPQ(AF4 a) { AF4 b = AF4_AU4((AU4_AF4(a) >> AU4_(3)) + AU4_(0x378D8723)); AF4 b8 = Oct(b); return b - b * (b8 - a) / (AF1_(8.0) * b8); } + AF4 APrxHighLinearToPQ(AF4 a) { return sqrt(sqrt(sqrt(a))); } +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// PARABOLIC SIN & COS +//------------------------------------------------------------------------------------------------------------------------------ +// Approximate answers to transcendental questions. +//------------------------------------------------------------------------------------------------------------------------------ +//============================================================================================================================== + #if 1 + // Valid input range is {-1 to 1} representing {0 to 2 pi}. + // Output range is {-1/4 to 1/4} representing {-1 to 1}. + AF1 APSinF1(AF1 x){return x*abs(x)-x;} // MAD. + AF2 APSinF2(AF2 x){return x*abs(x)-x;} + AF1 APCosF1(AF1 x){x=AFractF1(x*AF1_(0.5)+AF1_(0.75));x=x*AF1_(2.0)-AF1_(1.0);return APSinF1(x);} // 3x MAD, FRACT + AF2 APCosF2(AF2 x){x=AFractF2(x*AF2_(0.5)+AF2_(0.75));x=x*AF2_(2.0)-AF2_(1.0);return APSinF2(x);} + AF2 APSinCosF1(AF1 x){AF1 y=AFractF1(x*AF1_(0.5)+AF1_(0.75));y=y*AF1_(2.0)-AF1_(1.0);return APSinF2(AF2(x,y));} + #endif +//------------------------------------------------------------------------------------------------------------------------------ + #ifdef A_HALF + // For a packed {sin,cos} pair, + // - Native takes 16 clocks and 4 issue slots (no packed transcendentals). + // - Parabolic takes 8 clocks and 8 issue slots (only fract is non-packed). + AH1 APSinH1(AH1 x){return x*abs(x)-x;} + AH2 APSinH2(AH2 x){return x*abs(x)-x;} // AND,FMA + AH1 APCosH1(AH1 x){x=AFractH1(x*AH1_(0.5)+AH1_(0.75));x=x*AH1_(2.0)-AH1_(1.0);return APSinH1(x);} + AH2 APCosH2(AH2 x){x=AFractH2(x*AH2_(0.5)+AH2_(0.75));x=x*AH2_(2.0)-AH2_(1.0);return APSinH2(x);} // 3x FMA, 2xFRACT, AND + AH2 APSinCosH1(AH1 x){AH1 y=AFractH1(x*AH1_(0.5)+AH1_(0.75));y=y*AH1_(2.0)-AH1_(1.0);return APSinH2(AH2(x,y));} + #endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// [ZOL] ZERO ONE LOGIC +//------------------------------------------------------------------------------------------------------------------------------ +// Conditional free logic designed for easy 16-bit packing, and backwards porting to 32-bit. +//------------------------------------------------------------------------------------------------------------------------------ +// 0 := false +// 1 := true +//------------------------------------------------------------------------------------------------------------------------------ +// AndNot(x,y) -> !(x&y) .... One op. +// AndOr(x,y,z) -> (x&y)|z ... One op. +// GtZero(x) -> x>0.0 ..... One op. +// Sel(x,y,z) -> x?y:z ..... Two ops, has no precision loss. +// Signed(x) -> x<0.0 ..... One op. +// ZeroPass(x,y) -> x?0:y ..... Two ops, 'y' is a pass through safe for aliasing as integer. +//------------------------------------------------------------------------------------------------------------------------------ +// OPTIMIZATION NOTES +// ================== +// - On Vega to use 2 constants in a packed op, pass in as one AW2 or one AH2 'k.xy' and use as 'k.xx' and 'k.yy'. +// For example 'a.xy*k.xx+k.yy'. +//============================================================================================================================== + #if 1 + AU1 AZolAndU1(AU1 x,AU1 y){return min(x,y);} + AU2 AZolAndU2(AU2 x,AU2 y){return min(x,y);} + AU3 AZolAndU3(AU3 x,AU3 y){return min(x,y);} + AU4 AZolAndU4(AU4 x,AU4 y){return min(x,y);} +//------------------------------------------------------------------------------------------------------------------------------ + AU1 AZolNotU1(AU1 x){return x^AU1_(1);} + AU2 AZolNotU2(AU2 x){return x^AU2_(1);} + AU3 AZolNotU3(AU3 x){return x^AU3_(1);} + AU4 AZolNotU4(AU4 x){return x^AU4_(1);} +//------------------------------------------------------------------------------------------------------------------------------ + AU1 AZolOrU1(AU1 x,AU1 y){return max(x,y);} + AU2 AZolOrU2(AU2 x,AU2 y){return max(x,y);} + AU3 AZolOrU3(AU3 x,AU3 y){return max(x,y);} + AU4 AZolOrU4(AU4 x,AU4 y){return max(x,y);} +//============================================================================================================================== + AU1 AZolF1ToU1(AF1 x){return AU1(x);} + AU2 AZolF2ToU2(AF2 x){return AU2(x);} + AU3 AZolF3ToU3(AF3 x){return AU3(x);} + AU4 AZolF4ToU4(AF4 x){return AU4(x);} +//------------------------------------------------------------------------------------------------------------------------------ + // 2 ops, denormals don't work in 32-bit on PC (and if they are enabled, OMOD is disabled). + AU1 AZolNotF1ToU1(AF1 x){return AU1(AF1_(1.0)-x);} + AU2 AZolNotF2ToU2(AF2 x){return AU2(AF2_(1.0)-x);} + AU3 AZolNotF3ToU3(AF3 x){return AU3(AF3_(1.0)-x);} + AU4 AZolNotF4ToU4(AF4 x){return AU4(AF4_(1.0)-x);} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AZolU1ToF1(AU1 x){return AF1(x);} + AF2 AZolU2ToF2(AU2 x){return AF2(x);} + AF3 AZolU3ToF3(AU3 x){return AF3(x);} + AF4 AZolU4ToF4(AU4 x){return AF4(x);} +//============================================================================================================================== + AF1 AZolAndF1(AF1 x,AF1 y){return min(x,y);} + AF2 AZolAndF2(AF2 x,AF2 y){return min(x,y);} + AF3 AZolAndF3(AF3 x,AF3 y){return min(x,y);} + AF4 AZolAndF4(AF4 x,AF4 y){return min(x,y);} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 ASolAndNotF1(AF1 x,AF1 y){return (-x)*y+AF1_(1.0);} + AF2 ASolAndNotF2(AF2 x,AF2 y){return (-x)*y+AF2_(1.0);} + AF3 ASolAndNotF3(AF3 x,AF3 y){return (-x)*y+AF3_(1.0);} + AF4 ASolAndNotF4(AF4 x,AF4 y){return (-x)*y+AF4_(1.0);} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AZolAndOrF1(AF1 x,AF1 y,AF1 z){return ASatF1(x*y+z);} + AF2 AZolAndOrF2(AF2 x,AF2 y,AF2 z){return ASatF2(x*y+z);} + AF3 AZolAndOrF3(AF3 x,AF3 y,AF3 z){return ASatF3(x*y+z);} + AF4 AZolAndOrF4(AF4 x,AF4 y,AF4 z){return ASatF4(x*y+z);} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AZolGtZeroF1(AF1 x){return ASatF1(x*AF1_(A_INFP_F));} + AF2 AZolGtZeroF2(AF2 x){return ASatF2(x*AF2_(A_INFP_F));} + AF3 AZolGtZeroF3(AF3 x){return ASatF3(x*AF3_(A_INFP_F));} + AF4 AZolGtZeroF4(AF4 x){return ASatF4(x*AF4_(A_INFP_F));} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AZolNotF1(AF1 x){return AF1_(1.0)-x;} + AF2 AZolNotF2(AF2 x){return AF2_(1.0)-x;} + AF3 AZolNotF3(AF3 x){return AF3_(1.0)-x;} + AF4 AZolNotF4(AF4 x){return AF4_(1.0)-x;} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AZolOrF1(AF1 x,AF1 y){return max(x,y);} + AF2 AZolOrF2(AF2 x,AF2 y){return max(x,y);} + AF3 AZolOrF3(AF3 x,AF3 y){return max(x,y);} + AF4 AZolOrF4(AF4 x,AF4 y){return max(x,y);} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AZolSelF1(AF1 x,AF1 y,AF1 z){AF1 r=(-x)*z+z;return x*y+r;} + AF2 AZolSelF2(AF2 x,AF2 y,AF2 z){AF2 r=(-x)*z+z;return x*y+r;} + AF3 AZolSelF3(AF3 x,AF3 y,AF3 z){AF3 r=(-x)*z+z;return x*y+r;} + AF4 AZolSelF4(AF4 x,AF4 y,AF4 z){AF4 r=(-x)*z+z;return x*y+r;} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AZolSignedF1(AF1 x){return ASatF1(x*AF1_(A_INFN_F));} + AF2 AZolSignedF2(AF2 x){return ASatF2(x*AF2_(A_INFN_F));} + AF3 AZolSignedF3(AF3 x){return ASatF3(x*AF3_(A_INFN_F));} + AF4 AZolSignedF4(AF4 x){return ASatF4(x*AF4_(A_INFN_F));} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AZolZeroPassF1(AF1 x,AF1 y){return AF1_AU1((AU1_AF1(x)!=AU1_(0))?AU1_(0):AU1_AF1(y));} + AF2 AZolZeroPassF2(AF2 x,AF2 y){return AF2_AU2((AU2_AF2(x)!=AU2_(0))?AU2_(0):AU2_AF2(y));} + AF3 AZolZeroPassF3(AF3 x,AF3 y){return AF3_AU3((AU3_AF3(x)!=AU3_(0))?AU3_(0):AU3_AF3(y));} + AF4 AZolZeroPassF4(AF4 x,AF4 y){return AF4_AU4((AU4_AF4(x)!=AU4_(0))?AU4_(0):AU4_AF4(y));} + #endif +//============================================================================================================================== + #ifdef A_HALF + AW1 AZolAndW1(AW1 x,AW1 y){return min(x,y);} + AW2 AZolAndW2(AW2 x,AW2 y){return min(x,y);} + AW3 AZolAndW3(AW3 x,AW3 y){return min(x,y);} + AW4 AZolAndW4(AW4 x,AW4 y){return min(x,y);} +//------------------------------------------------------------------------------------------------------------------------------ + AW1 AZolNotW1(AW1 x){return x^AW1_(1);} + AW2 AZolNotW2(AW2 x){return x^AW2_(1);} + AW3 AZolNotW3(AW3 x){return x^AW3_(1);} + AW4 AZolNotW4(AW4 x){return x^AW4_(1);} +//------------------------------------------------------------------------------------------------------------------------------ + AW1 AZolOrW1(AW1 x,AW1 y){return max(x,y);} + AW2 AZolOrW2(AW2 x,AW2 y){return max(x,y);} + AW3 AZolOrW3(AW3 x,AW3 y){return max(x,y);} + AW4 AZolOrW4(AW4 x,AW4 y){return max(x,y);} +//============================================================================================================================== + // Uses denormal trick. + AW1 AZolH1ToW1(AH1 x){return AW1_AH1(x*AH1_AW1(AW1_(1)));} + AW2 AZolH2ToW2(AH2 x){return AW2_AH2(x*AH2_AW2(AW2_(1)));} + AW3 AZolH3ToW3(AH3 x){return AW3_AH3(x*AH3_AW3(AW3_(1)));} + AW4 AZolH4ToW4(AH4 x){return AW4_AH4(x*AH4_AW4(AW4_(1)));} +//------------------------------------------------------------------------------------------------------------------------------ + // AMD arch lacks a packed conversion opcode. + AH1 AZolW1ToH1(AW1 x){return AH1_AW1(x*AW1_AH1(AH1_(1.0)));} + AH2 AZolW2ToH2(AW2 x){return AH2_AW2(x*AW2_AH2(AH2_(1.0)));} + AH3 AZolW1ToH3(AW3 x){return AH3_AW3(x*AW3_AH3(AH3_(1.0)));} + AH4 AZolW2ToH4(AW4 x){return AH4_AW4(x*AW4_AH4(AH4_(1.0)));} +//============================================================================================================================== + AH1 AZolAndH1(AH1 x,AH1 y){return min(x,y);} + AH2 AZolAndH2(AH2 x,AH2 y){return min(x,y);} + AH3 AZolAndH3(AH3 x,AH3 y){return min(x,y);} + AH4 AZolAndH4(AH4 x,AH4 y){return min(x,y);} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 ASolAndNotH1(AH1 x,AH1 y){return (-x)*y+AH1_(1.0);} + AH2 ASolAndNotH2(AH2 x,AH2 y){return (-x)*y+AH2_(1.0);} + AH3 ASolAndNotH3(AH3 x,AH3 y){return (-x)*y+AH3_(1.0);} + AH4 ASolAndNotH4(AH4 x,AH4 y){return (-x)*y+AH4_(1.0);} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AZolAndOrH1(AH1 x,AH1 y,AH1 z){return ASatH1(x*y+z);} + AH2 AZolAndOrH2(AH2 x,AH2 y,AH2 z){return ASatH2(x*y+z);} + AH3 AZolAndOrH3(AH3 x,AH3 y,AH3 z){return ASatH3(x*y+z);} + AH4 AZolAndOrH4(AH4 x,AH4 y,AH4 z){return ASatH4(x*y+z);} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AZolGtZeroH1(AH1 x){return ASatH1(x*AH1_(A_INFP_H));} + AH2 AZolGtZeroH2(AH2 x){return ASatH2(x*AH2_(A_INFP_H));} + AH3 AZolGtZeroH3(AH3 x){return ASatH3(x*AH3_(A_INFP_H));} + AH4 AZolGtZeroH4(AH4 x){return ASatH4(x*AH4_(A_INFP_H));} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AZolNotH1(AH1 x){return AH1_(1.0)-x;} + AH2 AZolNotH2(AH2 x){return AH2_(1.0)-x;} + AH3 AZolNotH3(AH3 x){return AH3_(1.0)-x;} + AH4 AZolNotH4(AH4 x){return AH4_(1.0)-x;} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AZolOrH1(AH1 x,AH1 y){return max(x,y);} + AH2 AZolOrH2(AH2 x,AH2 y){return max(x,y);} + AH3 AZolOrH3(AH3 x,AH3 y){return max(x,y);} + AH4 AZolOrH4(AH4 x,AH4 y){return max(x,y);} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AZolSelH1(AH1 x,AH1 y,AH1 z){AH1 r=(-x)*z+z;return x*y+r;} + AH2 AZolSelH2(AH2 x,AH2 y,AH2 z){AH2 r=(-x)*z+z;return x*y+r;} + AH3 AZolSelH3(AH3 x,AH3 y,AH3 z){AH3 r=(-x)*z+z;return x*y+r;} + AH4 AZolSelH4(AH4 x,AH4 y,AH4 z){AH4 r=(-x)*z+z;return x*y+r;} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AZolSignedH1(AH1 x){return ASatH1(x*AH1_(A_INFN_H));} + AH2 AZolSignedH2(AH2 x){return ASatH2(x*AH2_(A_INFN_H));} + AH3 AZolSignedH3(AH3 x){return ASatH3(x*AH3_(A_INFN_H));} + AH4 AZolSignedH4(AH4 x){return ASatH4(x*AH4_(A_INFN_H));} + #endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// COLOR CONVERSIONS +//------------------------------------------------------------------------------------------------------------------------------ +// These are all linear to/from some other space (where 'linear' has been shortened out of the function name). +// So 'ToGamma' is 'LinearToGamma', and 'FromGamma' is 'LinearFromGamma'. +// These are branch free implementations. +// The AToSrgbF1() function is useful for stores for compute shaders for GPUs without hardware linear->sRGB store conversion. +//------------------------------------------------------------------------------------------------------------------------------ +// TRANSFER FUNCTIONS +// ================== +// 709 ..... Rec709 used for some HDTVs +// Gamma ... Typically 2.2 for some PC displays, or 2.4-2.5 for CRTs, or 2.2 FreeSync2 native +// Pq ...... PQ native for HDR10 +// Srgb .... The sRGB output, typical of PC displays, useful for 10-bit output, or storing to 8-bit UNORM without SRGB type +// Two ..... Gamma 2.0, fastest conversion (useful for intermediate pass approximations) +// Three ... Gamma 3.0, less fast, but good for HDR. +//------------------------------------------------------------------------------------------------------------------------------ +// KEEPING TO SPEC +// =============== +// Both Rec.709 and sRGB have a linear segment which as spec'ed would intersect the curved segment 2 times. +// (a.) For 8-bit sRGB, steps {0 to 10.3} are in the linear region (4% of the encoding range). +// (b.) For 8-bit 709, steps {0 to 20.7} are in the linear region (8% of the encoding range). +// Also there is a slight step in the transition regions. +// Precision of the coefficients in the spec being the likely cause. +// Main usage case of the sRGB code is to do the linear->sRGB converstion in a compute shader before store. +// This is to work around lack of hardware (typically only ROP does the conversion for free). +// To "correct" the linear segment, would be to introduce error, because hardware decode of sRGB->linear is fixed (and free). +// So this header keeps with the spec. +// For linear->sRGB transforms, the linear segment in some respects reduces error, because rounding in that region is linear. +// Rounding in the curved region in hardware (and fast software code) introduces error due to rounding in non-linear. +//------------------------------------------------------------------------------------------------------------------------------ +// FOR PQ +// ====== +// Both input and output is {0.0-1.0}, and where output 1.0 represents 10000.0 cd/m^2. +// All constants are only specified to FP32 precision. +// External PQ source reference, +// - https://github.com/ampas/aces-dev/blob/master/transforms/ctl/utilities/ACESlib.Utilities_Color.a1.0.1.ctl +//------------------------------------------------------------------------------------------------------------------------------ +// PACKED VERSIONS +// =============== +// These are the A*H2() functions. +// There is no PQ functions as FP16 seemed to not have enough precision for the conversion. +// The remaining functions are "good enough" for 8-bit, and maybe 10-bit if not concerned about a few 1-bit errors. +// Precision is lowest in the 709 conversion, higher in sRGB, higher still in Two and Gamma (when using 2.2 at least). +//------------------------------------------------------------------------------------------------------------------------------ +// NOTES +// ===== +// Could be faster for PQ conversions to be in ALU or a texture lookup depending on usage case. +//============================================================================================================================== + #if 1 + AF1 ATo709F1(AF1 c){AF3 j=AF3(0.018*4.5,4.5,0.45);AF2 k=AF2(1.099,-0.099); + return clamp(j.x ,c*j.y ,pow(c,j.z )*k.x +k.y );} + AF2 ATo709F2(AF2 c){AF3 j=AF3(0.018*4.5,4.5,0.45);AF2 k=AF2(1.099,-0.099); + return clamp(j.xx ,c*j.yy ,pow(c,j.zz )*k.xx +k.yy );} + AF3 ATo709F3(AF3 c){AF3 j=AF3(0.018*4.5,4.5,0.45);AF2 k=AF2(1.099,-0.099); + return clamp(j.xxx,c*j.yyy,pow(c,j.zzz)*k.xxx+k.yyy);} +//------------------------------------------------------------------------------------------------------------------------------ + // Note 'rcpX' is '1/x', where the 'x' is what would be used in AFromGamma(). + AF1 AToGammaF1(AF1 c,AF1 rcpX){return pow(c,AF1_(rcpX));} + AF2 AToGammaF2(AF2 c,AF1 rcpX){return pow(c,AF2_(rcpX));} + AF3 AToGammaF3(AF3 c,AF1 rcpX){return pow(c,AF3_(rcpX));} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AToPqF1(AF1 x){AF1 p=pow(x,AF1_(0.159302)); + return pow((AF1_(0.835938)+AF1_(18.8516)*p)/(AF1_(1.0)+AF1_(18.6875)*p),AF1_(78.8438));} + AF2 AToPqF1(AF2 x){AF2 p=pow(x,AF2_(0.159302)); + return pow((AF2_(0.835938)+AF2_(18.8516)*p)/(AF2_(1.0)+AF2_(18.6875)*p),AF2_(78.8438));} + AF3 AToPqF1(AF3 x){AF3 p=pow(x,AF3_(0.159302)); + return pow((AF3_(0.835938)+AF3_(18.8516)*p)/(AF3_(1.0)+AF3_(18.6875)*p),AF3_(78.8438));} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AToSrgbF1(AF1 c){AF3 j=AF3(0.0031308*12.92,12.92,1.0/2.4);AF2 k=AF2(1.055,-0.055); + return clamp(j.x ,c*j.y ,pow(c,j.z )*k.x +k.y );} + AF2 AToSrgbF2(AF2 c){AF3 j=AF3(0.0031308*12.92,12.92,1.0/2.4);AF2 k=AF2(1.055,-0.055); + return clamp(j.xx ,c*j.yy ,pow(c,j.zz )*k.xx +k.yy );} + AF3 AToSrgbF3(AF3 c){AF3 j=AF3(0.0031308*12.92,12.92,1.0/2.4);AF2 k=AF2(1.055,-0.055); + return clamp(j.xxx,c*j.yyy,pow(c,j.zzz)*k.xxx+k.yyy);} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AToTwoF1(AF1 c){return sqrt(c);} + AF2 AToTwoF2(AF2 c){return sqrt(c);} + AF3 AToTwoF3(AF3 c){return sqrt(c);} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AToThreeF1(AF1 c){return pow(c,AF1_(1.0/3.0));} + AF2 AToThreeF2(AF2 c){return pow(c,AF2_(1.0/3.0));} + AF3 AToThreeF3(AF3 c){return pow(c,AF3_(1.0/3.0));} + #endif +//============================================================================================================================== + #if 1 + // Unfortunately median won't work here. + AF1 AFrom709F1(AF1 c){AF3 j=AF3(0.081/4.5,1.0/4.5,1.0/0.45);AF2 k=AF2(1.0/1.099,0.099/1.099); + return AZolSelF1(AZolSignedF1(c-j.x ),c*j.y ,pow(c*k.x +k.y ,j.z ));} + AF2 AFrom709F2(AF2 c){AF3 j=AF3(0.081/4.5,1.0/4.5,1.0/0.45);AF2 k=AF2(1.0/1.099,0.099/1.099); + return AZolSelF2(AZolSignedF2(c-j.xx ),c*j.yy ,pow(c*k.xx +k.yy ,j.zz ));} + AF3 AFrom709F3(AF3 c){AF3 j=AF3(0.081/4.5,1.0/4.5,1.0/0.45);AF2 k=AF2(1.0/1.099,0.099/1.099); + return AZolSelF3(AZolSignedF3(c-j.xxx),c*j.yyy,pow(c*k.xxx+k.yyy,j.zzz));} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AFromGammaF1(AF1 c,AF1 x){return pow(c,AF1_(x));} + AF2 AFromGammaF2(AF2 c,AF1 x){return pow(c,AF2_(x));} + AF3 AFromGammaF3(AF3 c,AF1 x){return pow(c,AF3_(x));} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AFromPqF1(AF1 x){AF1 p=pow(x,AF1_(0.0126833)); + return pow(ASatF1(p-AF1_(0.835938))/(AF1_(18.8516)-AF1_(18.6875)*p),AF1_(6.27739));} + AF2 AFromPqF1(AF2 x){AF2 p=pow(x,AF2_(0.0126833)); + return pow(ASatF2(p-AF2_(0.835938))/(AF2_(18.8516)-AF2_(18.6875)*p),AF2_(6.27739));} + AF3 AFromPqF1(AF3 x){AF3 p=pow(x,AF3_(0.0126833)); + return pow(ASatF3(p-AF3_(0.835938))/(AF3_(18.8516)-AF3_(18.6875)*p),AF3_(6.27739));} +//------------------------------------------------------------------------------------------------------------------------------ + // Unfortunately median won't work here. + AF1 AFromSrgbF1(AF1 c){AF3 j=AF3(0.04045/12.92,1.0/12.92,2.4);AF2 k=AF2(1.0/1.055,0.055/1.055); + return AZolSelF1(AZolSignedF1(c-j.x ),c*j.y ,pow(c*k.x +k.y ,j.z ));} + AF2 AFromSrgbF2(AF2 c){AF3 j=AF3(0.04045/12.92,1.0/12.92,2.4);AF2 k=AF2(1.0/1.055,0.055/1.055); + return AZolSelF2(AZolSignedF2(c-j.xx ),c*j.yy ,pow(c*k.xx +k.yy ,j.zz ));} + AF3 AFromSrgbF3(AF3 c){AF3 j=AF3(0.04045/12.92,1.0/12.92,2.4);AF2 k=AF2(1.0/1.055,0.055/1.055); + return AZolSelF3(AZolSignedF3(c-j.xxx),c*j.yyy,pow(c*k.xxx+k.yyy,j.zzz));} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AFromTwoF1(AF1 c){return c*c;} + AF2 AFromTwoF2(AF2 c){return c*c;} + AF3 AFromTwoF3(AF3 c){return c*c;} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AFromThreeF1(AF1 c){return c*c*c;} + AF2 AFromThreeF2(AF2 c){return c*c*c;} + AF3 AFromThreeF3(AF3 c){return c*c*c;} + #endif +//============================================================================================================================== + #ifdef A_HALF + AH1 ATo709H1(AH1 c){AH3 j=AH3(0.018*4.5,4.5,0.45);AH2 k=AH2(1.099,-0.099); + return clamp(j.x ,c*j.y ,pow(c,j.z )*k.x +k.y );} + AH2 ATo709H2(AH2 c){AH3 j=AH3(0.018*4.5,4.5,0.45);AH2 k=AH2(1.099,-0.099); + return clamp(j.xx ,c*j.yy ,pow(c,j.zz )*k.xx +k.yy );} + AH3 ATo709H3(AH3 c){AH3 j=AH3(0.018*4.5,4.5,0.45);AH2 k=AH2(1.099,-0.099); + return clamp(j.xxx,c*j.yyy,pow(c,j.zzz)*k.xxx+k.yyy);} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AToGammaH1(AH1 c,AH1 rcpX){return pow(c,AH1_(rcpX));} + AH2 AToGammaH2(AH2 c,AH1 rcpX){return pow(c,AH2_(rcpX));} + AH3 AToGammaH3(AH3 c,AH1 rcpX){return pow(c,AH3_(rcpX));} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AToSrgbH1(AH1 c){AH3 j=AH3(0.0031308*12.92,12.92,1.0/2.4);AH2 k=AH2(1.055,-0.055); + return clamp(j.x ,c*j.y ,pow(c,j.z )*k.x +k.y );} + AH2 AToSrgbH2(AH2 c){AH3 j=AH3(0.0031308*12.92,12.92,1.0/2.4);AH2 k=AH2(1.055,-0.055); + return clamp(j.xx ,c*j.yy ,pow(c,j.zz )*k.xx +k.yy );} + AH3 AToSrgbH3(AH3 c){AH3 j=AH3(0.0031308*12.92,12.92,1.0/2.4);AH2 k=AH2(1.055,-0.055); + return clamp(j.xxx,c*j.yyy,pow(c,j.zzz)*k.xxx+k.yyy);} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AToTwoH1(AH1 c){return sqrt(c);} + AH2 AToTwoH2(AH2 c){return sqrt(c);} + AH3 AToTwoH3(AH3 c){return sqrt(c);} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AToThreeF1(AH1 c){return pow(c,AH1_(1.0/3.0));} + AH2 AToThreeF2(AH2 c){return pow(c,AH2_(1.0/3.0));} + AH3 AToThreeF3(AH3 c){return pow(c,AH3_(1.0/3.0));} + #endif +//============================================================================================================================== + #ifdef A_HALF + AH1 AFrom709H1(AH1 c){AH3 j=AH3(0.081/4.5,1.0/4.5,1.0/0.45);AH2 k=AH2(1.0/1.099,0.099/1.099); + return AZolSelH1(AZolSignedH1(c-j.x ),c*j.y ,pow(c*k.x +k.y ,j.z ));} + AH2 AFrom709H2(AH2 c){AH3 j=AH3(0.081/4.5,1.0/4.5,1.0/0.45);AH2 k=AH2(1.0/1.099,0.099/1.099); + return AZolSelH2(AZolSignedH2(c-j.xx ),c*j.yy ,pow(c*k.xx +k.yy ,j.zz ));} + AH3 AFrom709H3(AH3 c){AH3 j=AH3(0.081/4.5,1.0/4.5,1.0/0.45);AH2 k=AH2(1.0/1.099,0.099/1.099); + return AZolSelH3(AZolSignedH3(c-j.xxx),c*j.yyy,pow(c*k.xxx+k.yyy,j.zzz));} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AFromGammaH1(AH1 c,AH1 x){return pow(c,AH1_(x));} + AH2 AFromGammaH2(AH2 c,AH1 x){return pow(c,AH2_(x));} + AH3 AFromGammaH3(AH3 c,AH1 x){return pow(c,AH3_(x));} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AHromSrgbF1(AH1 c){AH3 j=AH3(0.04045/12.92,1.0/12.92,2.4);AH2 k=AH2(1.0/1.055,0.055/1.055); + return AZolSelH1(AZolSignedH1(c-j.x ),c*j.y ,pow(c*k.x +k.y ,j.z ));} + AH2 AHromSrgbF2(AH2 c){AH3 j=AH3(0.04045/12.92,1.0/12.92,2.4);AH2 k=AH2(1.0/1.055,0.055/1.055); + return AZolSelH2(AZolSignedH2(c-j.xx ),c*j.yy ,pow(c*k.xx +k.yy ,j.zz ));} + AH3 AHromSrgbF3(AH3 c){AH3 j=AH3(0.04045/12.92,1.0/12.92,2.4);AH2 k=AH2(1.0/1.055,0.055/1.055); + return AZolSelH3(AZolSignedH3(c-j.xxx),c*j.yyy,pow(c*k.xxx+k.yyy,j.zzz));} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AFromTwoH1(AH1 c){return c*c;} + AH2 AFromTwoH2(AH2 c){return c*c;} + AH3 AFromTwoH3(AH3 c){return c*c;} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AFromThreeH1(AH1 c){return c*c*c;} + AH2 AFromThreeH2(AH2 c){return c*c*c;} + AH3 AFromThreeH3(AH3 c){return c*c*c;} + #endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// CS REMAP +//============================================================================================================================== + // Simple remap 64x1 to 8x8 with rotated 2x2 pixel quads in quad linear. + // 543210 + // ====== + // ..xxx. + // yy...y + AU2 ARmp8x8(AU1 a){return AU2(ABfe(a,1u,3u),ABfiM(ABfe(a,3u,3u),a,1u));} +//============================================================================================================================== + // More complex remap 64x1 to 8x8 which is necessary for 2D wave reductions. + // 543210 + // ====== + // .xx..x + // y..yy. + // Details, + // LANE TO 8x8 MAPPING + // =================== + // 00 01 08 09 10 11 18 19 + // 02 03 0a 0b 12 13 1a 1b + // 04 05 0c 0d 14 15 1c 1d + // 06 07 0e 0f 16 17 1e 1f + // 20 21 28 29 30 31 38 39 + // 22 23 2a 2b 32 33 3a 3b + // 24 25 2c 2d 34 35 3c 3d + // 26 27 2e 2f 36 37 3e 3f + AU2 ARmpRed8x8(AU1 a){return AU2(ABfiM(ABfe(a,2u,3u),a,1u),ABfiM(ABfe(a,3u,3u),ABfe(a,1u,2u),2u));} +//============================================================================================================================== + #ifdef A_HALF + AW2 ARmp8x8H(AU1 a){return AW2(ABfe(a,1u,3u),ABfiM(ABfe(a,3u,3u),a,1u));} + AW2 ARmpRed8x8H(AU1 a){return AW2(ABfiM(ABfe(a,2u,3u),a,1u),ABfiM(ABfe(a,3u,3u),ABfe(a,1u,2u),2u));} + #endif +#endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// +// REFERENCE +// +//------------------------------------------------------------------------------------------------------------------------------ +// IEEE FLOAT RULES +// ================ +// - saturate(NaN)=0, saturate(-INF)=0, saturate(+INF)=1 +// - {+/-}0 * {+/-}INF = NaN +// - -INF + (+INF) = NaN +// - {+/-}0 / {+/-}0 = NaN +// - {+/-}INF / {+/-}INF = NaN +// - a<(-0) := sqrt(a) = NaN (a=-0.0 won't NaN) +// - 0 == -0 +// - 4/0 = +INF +// - 4/-0 = -INF +// - 4+INF = +INF +// - 4-INF = -INF +// - 4*(+INF) = +INF +// - 4*(-INF) = -INF +// - -4*(+INF) = -INF +// - sqrt(+INF) = +INF +//------------------------------------------------------------------------------------------------------------------------------ +// FP16 ENCODING +// ============= +// fedcba9876543210 +// ---------------- +// ......mmmmmmmmmm 10-bit mantissa (encodes 11-bit 0.5 to 1.0 except for denormals) +// .eeeee.......... 5-bit exponent +// .00000.......... denormals +// .00001.......... -14 exponent +// .11110.......... 15 exponent +// .111110000000000 infinity +// .11111nnnnnnnnnn NaN with n!=0 +// s............... sign +//------------------------------------------------------------------------------------------------------------------------------ +// FP16/INT16 ALIASING DENORMAL +// ============================ +// 11-bit unsigned integers alias with half float denormal/normal values, +// 1 = 2^(-24) = 1/16777216 ....................... first denormal value +// 2 = 2^(-23) +// ... +// 1023 = 2^(-14)*(1-2^(-10)) = 2^(-14)*(1-1/1024) ... last denormal value +// 1024 = 2^(-14) = 1/16384 .......................... first normal value that still maps to integers +// 2047 .............................................. last normal value that still maps to integers +// Scaling limits, +// 2^15 = 32768 ...................................... largest power of 2 scaling +// Largest pow2 conversion mapping is at *32768, +// 1 : 2^(-9) = 1/512 +// 2 : 1/256 +// 4 : 1/128 +// 8 : 1/64 +// 16 : 1/32 +// 32 : 1/16 +// 64 : 1/8 +// 128 : 1/4 +// 256 : 1/2 +// 512 : 1 +// 1024 : 2 +// 2047 : a little less than 4 +//============================================================================================================================== +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// +// +// GPU/CPU PORTABILITY +// +// +//------------------------------------------------------------------------------------------------------------------------------ +// This is the GPU implementation. +// See the CPU implementation for docs. +//============================================================================================================================== +#ifdef A_GPU + #define A_TRUE true + #define A_FALSE false + #define A_STATIC +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// VECTOR ARGUMENT/RETURN/INITIALIZATION PORTABILITY +//============================================================================================================================== + #define retAD2 AD2 + #define retAD3 AD3 + #define retAD4 AD4 + #define retAF2 AF2 + #define retAF3 AF3 + #define retAF4 AF4 + #define retAL2 AL2 + #define retAL3 AL3 + #define retAL4 AL4 + #define retAU2 AU2 + #define retAU3 AU3 + #define retAU4 AU4 +//------------------------------------------------------------------------------------------------------------------------------ + #define inAD2 in AD2 + #define inAD3 in AD3 + #define inAD4 in AD4 + #define inAF2 in AF2 + #define inAF3 in AF3 + #define inAF4 in AF4 + #define inAL2 in AL2 + #define inAL3 in AL3 + #define inAL4 in AL4 + #define inAU2 in AU2 + #define inAU3 in AU3 + #define inAU4 in AU4 +//------------------------------------------------------------------------------------------------------------------------------ + #define inoutAD2 inout AD2 + #define inoutAD3 inout AD3 + #define inoutAD4 inout AD4 + #define inoutAF2 inout AF2 + #define inoutAF3 inout AF3 + #define inoutAF4 inout AF4 + #define inoutAL2 inout AL2 + #define inoutAL3 inout AL3 + #define inoutAL4 inout AL4 + #define inoutAU2 inout AU2 + #define inoutAU3 inout AU3 + #define inoutAU4 inout AU4 +//------------------------------------------------------------------------------------------------------------------------------ + #define outAD2 out AD2 + #define outAD3 out AD3 + #define outAD4 out AD4 + #define outAF2 out AF2 + #define outAF3 out AF3 + #define outAF4 out AF4 + #define outAL2 out AL2 + #define outAL3 out AL3 + #define outAL4 out AL4 + #define outAU2 out AU2 + #define outAU3 out AU3 + #define outAU4 out AU4 +//------------------------------------------------------------------------------------------------------------------------------ + #define varAD2(x) AD2 x + #define varAD3(x) AD3 x + #define varAD4(x) AD4 x + #define varAF2(x) AF2 x + #define varAF3(x) AF3 x + #define varAF4(x) AF4 x + #define varAL2(x) AL2 x + #define varAL3(x) AL3 x + #define varAL4(x) AL4 x + #define varAU2(x) AU2 x + #define varAU3(x) AU3 x + #define varAU4(x) AU4 x +//------------------------------------------------------------------------------------------------------------------------------ + #define initAD2(x,y) AD2(x,y) + #define initAD3(x,y,z) AD3(x,y,z) + #define initAD4(x,y,z,w) AD4(x,y,z,w) + #define initAF2(x,y) AF2(x,y) + #define initAF3(x,y,z) AF3(x,y,z) + #define initAF4(x,y,z,w) AF4(x,y,z,w) + #define initAL2(x,y) AL2(x,y) + #define initAL3(x,y,z) AL3(x,y,z) + #define initAL4(x,y,z,w) AL4(x,y,z,w) + #define initAU2(x,y) AU2(x,y) + #define initAU3(x,y,z) AU3(x,y,z) + #define initAU4(x,y,z,w) AU4(x,y,z,w) +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// SCALAR RETURN OPS +//============================================================================================================================== + #define AAbsD1(a) abs(AD1(a)) + #define AAbsF1(a) abs(AF1(a)) +//------------------------------------------------------------------------------------------------------------------------------ + #define ACosD1(a) cos(AD1(a)) + #define ACosF1(a) cos(AF1(a)) +//------------------------------------------------------------------------------------------------------------------------------ + #define ADotD2(a,b) dot(AD2(a),AD2(b)) + #define ADotD3(a,b) dot(AD3(a),AD3(b)) + #define ADotD4(a,b) dot(AD4(a),AD4(b)) + #define ADotF2(a,b) dot(AF2(a),AF2(b)) + #define ADotF3(a,b) dot(AF3(a),AF3(b)) + #define ADotF4(a,b) dot(AF4(a),AF4(b)) +//------------------------------------------------------------------------------------------------------------------------------ + #define AExp2D1(a) exp2(AD1(a)) + #define AExp2F1(a) exp2(AF1(a)) +//------------------------------------------------------------------------------------------------------------------------------ + #define AFloorD1(a) floor(AD1(a)) + #define AFloorF1(a) floor(AF1(a)) +//------------------------------------------------------------------------------------------------------------------------------ + #define ALog2D1(a) log2(AD1(a)) + #define ALog2F1(a) log2(AF1(a)) +//------------------------------------------------------------------------------------------------------------------------------ + #define AMaxD1(a,b) max(a,b) + #define AMaxF1(a,b) max(a,b) + #define AMaxL1(a,b) max(a,b) + #define AMaxU1(a,b) max(a,b) +//------------------------------------------------------------------------------------------------------------------------------ + #define AMinD1(a,b) min(a,b) + #define AMinF1(a,b) min(a,b) + #define AMinL1(a,b) min(a,b) + #define AMinU1(a,b) min(a,b) +//------------------------------------------------------------------------------------------------------------------------------ + #define ASinD1(a) sin(AD1(a)) + #define ASinF1(a) sin(AF1(a)) +//------------------------------------------------------------------------------------------------------------------------------ + #define ASqrtD1(a) sqrt(AD1(a)) + #define ASqrtF1(a) sqrt(AF1(a)) +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// SCALAR RETURN OPS - DEPENDENT +//============================================================================================================================== + #define APowD1(a,b) pow(AD1(a),AF1(b)) + #define APowF1(a,b) pow(AF1(a),AF1(b)) +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// VECTOR OPS +//------------------------------------------------------------------------------------------------------------------------------ +// These are added as needed for production or prototyping, so not necessarily a complete set. +// They follow a convention of taking in a destination and also returning the destination value to increase utility. +//============================================================================================================================== + #ifdef A_DUBL + AD2 opAAbsD2(outAD2 d,inAD2 a){d=abs(a);return d;} + AD3 opAAbsD3(outAD3 d,inAD3 a){d=abs(a);return d;} + AD4 opAAbsD4(outAD4 d,inAD4 a){d=abs(a);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AD2 opAAddD2(outAD2 d,inAD2 a,inAD2 b){d=a+b;return d;} + AD3 opAAddD3(outAD3 d,inAD3 a,inAD3 b){d=a+b;return d;} + AD4 opAAddD4(outAD4 d,inAD4 a,inAD4 b){d=a+b;return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AD2 opAAddOneD2(outAD2 d,inAD2 a,AD1 b){d=a+AD2_(b);return d;} + AD3 opAAddOneD3(outAD3 d,inAD3 a,AD1 b){d=a+AD3_(b);return d;} + AD4 opAAddOneD4(outAD4 d,inAD4 a,AD1 b){d=a+AD4_(b);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AD2 opACpyD2(outAD2 d,inAD2 a){d=a;return d;} + AD3 opACpyD3(outAD3 d,inAD3 a){d=a;return d;} + AD4 opACpyD4(outAD4 d,inAD4 a){d=a;return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AD2 opALerpD2(outAD2 d,inAD2 a,inAD2 b,inAD2 c){d=ALerpD2(a,b,c);return d;} + AD3 opALerpD3(outAD3 d,inAD3 a,inAD3 b,inAD3 c){d=ALerpD3(a,b,c);return d;} + AD4 opALerpD4(outAD4 d,inAD4 a,inAD4 b,inAD4 c){d=ALerpD4(a,b,c);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AD2 opALerpOneD2(outAD2 d,inAD2 a,inAD2 b,AD1 c){d=ALerpD2(a,b,AD2_(c));return d;} + AD3 opALerpOneD3(outAD3 d,inAD3 a,inAD3 b,AD1 c){d=ALerpD3(a,b,AD3_(c));return d;} + AD4 opALerpOneD4(outAD4 d,inAD4 a,inAD4 b,AD1 c){d=ALerpD4(a,b,AD4_(c));return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AD2 opAMaxD2(outAD2 d,inAD2 a,inAD2 b){d=max(a,b);return d;} + AD3 opAMaxD3(outAD3 d,inAD3 a,inAD3 b){d=max(a,b);return d;} + AD4 opAMaxD4(outAD4 d,inAD4 a,inAD4 b){d=max(a,b);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AD2 opAMinD2(outAD2 d,inAD2 a,inAD2 b){d=min(a,b);return d;} + AD3 opAMinD3(outAD3 d,inAD3 a,inAD3 b){d=min(a,b);return d;} + AD4 opAMinD4(outAD4 d,inAD4 a,inAD4 b){d=min(a,b);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AD2 opAMulD2(outAD2 d,inAD2 a,inAD2 b){d=a*b;return d;} + AD3 opAMulD3(outAD3 d,inAD3 a,inAD3 b){d=a*b;return d;} + AD4 opAMulD4(outAD4 d,inAD4 a,inAD4 b){d=a*b;return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AD2 opAMulOneD2(outAD2 d,inAD2 a,AD1 b){d=a*AD2_(b);return d;} + AD3 opAMulOneD3(outAD3 d,inAD3 a,AD1 b){d=a*AD3_(b);return d;} + AD4 opAMulOneD4(outAD4 d,inAD4 a,AD1 b){d=a*AD4_(b);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AD2 opANegD2(outAD2 d,inAD2 a){d=-a;return d;} + AD3 opANegD3(outAD3 d,inAD3 a){d=-a;return d;} + AD4 opANegD4(outAD4 d,inAD4 a){d=-a;return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AD2 opARcpD2(outAD2 d,inAD2 a){d=ARcpD2(a);return d;} + AD3 opARcpD3(outAD3 d,inAD3 a){d=ARcpD3(a);return d;} + AD4 opARcpD4(outAD4 d,inAD4 a){d=ARcpD4(a);return d;} + #endif +//============================================================================================================================== + AF2 opAAbsF2(outAF2 d,inAF2 a){d=abs(a);return d;} + AF3 opAAbsF3(outAF3 d,inAF3 a){d=abs(a);return d;} + AF4 opAAbsF4(outAF4 d,inAF4 a){d=abs(a);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AF2 opAAddF2(outAF2 d,inAF2 a,inAF2 b){d=a+b;return d;} + AF3 opAAddF3(outAF3 d,inAF3 a,inAF3 b){d=a+b;return d;} + AF4 opAAddF4(outAF4 d,inAF4 a,inAF4 b){d=a+b;return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AF2 opAAddOneF2(outAF2 d,inAF2 a,AF1 b){d=a+AF2_(b);return d;} + AF3 opAAddOneF3(outAF3 d,inAF3 a,AF1 b){d=a+AF3_(b);return d;} + AF4 opAAddOneF4(outAF4 d,inAF4 a,AF1 b){d=a+AF4_(b);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AF2 opACpyF2(outAF2 d,inAF2 a){d=a;return d;} + AF3 opACpyF3(outAF3 d,inAF3 a){d=a;return d;} + AF4 opACpyF4(outAF4 d,inAF4 a){d=a;return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AF2 opALerpF2(outAF2 d,inAF2 a,inAF2 b,inAF2 c){d=ALerpF2(a,b,c);return d;} + AF3 opALerpF3(outAF3 d,inAF3 a,inAF3 b,inAF3 c){d=ALerpF3(a,b,c);return d;} + AF4 opALerpF4(outAF4 d,inAF4 a,inAF4 b,inAF4 c){d=ALerpF4(a,b,c);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AF2 opALerpOneF2(outAF2 d,inAF2 a,inAF2 b,AF1 c){d=ALerpF2(a,b,AF2_(c));return d;} + AF3 opALerpOneF3(outAF3 d,inAF3 a,inAF3 b,AF1 c){d=ALerpF3(a,b,AF3_(c));return d;} + AF4 opALerpOneF4(outAF4 d,inAF4 a,inAF4 b,AF1 c){d=ALerpF4(a,b,AF4_(c));return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AF2 opAMaxF2(outAF2 d,inAF2 a,inAF2 b){d=max(a,b);return d;} + AF3 opAMaxF3(outAF3 d,inAF3 a,inAF3 b){d=max(a,b);return d;} + AF4 opAMaxF4(outAF4 d,inAF4 a,inAF4 b){d=max(a,b);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AF2 opAMinF2(outAF2 d,inAF2 a,inAF2 b){d=min(a,b);return d;} + AF3 opAMinF3(outAF3 d,inAF3 a,inAF3 b){d=min(a,b);return d;} + AF4 opAMinF4(outAF4 d,inAF4 a,inAF4 b){d=min(a,b);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AF2 opAMulF2(outAF2 d,inAF2 a,inAF2 b){d=a*b;return d;} + AF3 opAMulF3(outAF3 d,inAF3 a,inAF3 b){d=a*b;return d;} + AF4 opAMulF4(outAF4 d,inAF4 a,inAF4 b){d=a*b;return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AF2 opAMulOneF2(outAF2 d,inAF2 a,AF1 b){d=a*AF2_(b);return d;} + AF3 opAMulOneF3(outAF3 d,inAF3 a,AF1 b){d=a*AF3_(b);return d;} + AF4 opAMulOneF4(outAF4 d,inAF4 a,AF1 b){d=a*AF4_(b);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AF2 opANegF2(outAF2 d,inAF2 a){d=-a;return d;} + AF3 opANegF3(outAF3 d,inAF3 a){d=-a;return d;} + AF4 opANegF4(outAF4 d,inAF4 a){d=-a;return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AF2 opARcpF2(outAF2 d,inAF2 a){d=ARcpF2(a);return d;} + AF3 opARcpF3(outAF3 d,inAF3 a){d=ARcpF3(a);return d;} + AF4 opARcpF4(outAF4 d,inAF4 a){d=ARcpF4(a);return d;} +#endif diff --git a/app/src/shaders/third_party/ffx_fsr1.h b/app/src/shaders/third_party/ffx_fsr1.h new file mode 100644 index 0000000..4e0b3d5 --- /dev/null +++ b/app/src/shaders/third_party/ffx_fsr1.h @@ -0,0 +1,1199 @@ +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// +// +// AMD FidelityFX SUPER RESOLUTION [FSR 1] ::: SPATIAL SCALING & EXTRAS - v1.20210629 +// +// +//------------------------------------------------------------------------------------------------------------------------------ +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//------------------------------------------------------------------------------------------------------------------------------ +// FidelityFX Super Resolution Sample +// +// Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved. +// 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. +//------------------------------------------------------------------------------------------------------------------------------ +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//------------------------------------------------------------------------------------------------------------------------------ +// ABOUT +// ===== +// FSR is a collection of algorithms relating to generating a higher resolution image. +// This specific header focuses on single-image non-temporal image scaling, and related tools. +// +// The core functions are EASU and RCAS: +// [EASU] Edge Adaptive Spatial Upsampling ....... 1x to 4x area range spatial scaling, clamped adaptive elliptical filter. +// [RCAS] Robust Contrast Adaptive Sharpening .... A non-scaling variation on CAS. +// RCAS needs to be applied after EASU as a separate pass. +// +// Optional utility functions are: +// [LFGA] Linear Film Grain Applicator ........... Tool to apply film grain after scaling. +// [SRTM] Simple Reversible Tone-Mapper .......... Linear HDR {0 to FP16_MAX} to {0 to 1} and back. +// [TEPD] Temporal Energy Preserving Dither ...... Temporally energy preserving dithered {0 to 1} linear to gamma 2.0 conversion. +// See each individual sub-section for inline documentation. +//------------------------------------------------------------------------------------------------------------------------------ +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//------------------------------------------------------------------------------------------------------------------------------ +// FUNCTION PERMUTATIONS +// ===================== +// *F() ..... Single item computation with 32-bit. +// *H() ..... Single item computation with 16-bit, with packing (aka two 16-bit ops in parallel) when possible. +// *Hx2() ... Processing two items in parallel with 16-bit, easier packing. +// Not all interfaces in this file have a *Hx2() form. +//============================================================================================================================== +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// +// FSR - [EASU] EDGE ADAPTIVE SPATIAL UPSAMPLING +// +//------------------------------------------------------------------------------------------------------------------------------ +// EASU provides a high quality spatial-only scaling at relatively low cost. +// Meaning EASU is appropiate for laptops and other low-end GPUs. +// Quality from 1x to 4x area scaling is good. +//------------------------------------------------------------------------------------------------------------------------------ +// The scalar uses a modified fast approximation to the standard lanczos(size=2) kernel. +// EASU runs in a single pass, so it applies a directionally and anisotropically adaptive radial lanczos. +// This is also kept as simple as possible to have minimum runtime. +//------------------------------------------------------------------------------------------------------------------------------ +// The lanzcos filter has negative lobes, so by itself it will introduce ringing. +// To remove all ringing, the algorithm uses the nearest 2x2 input texels as a neighborhood, +// and limits output to the minimum and maximum of that neighborhood. +//------------------------------------------------------------------------------------------------------------------------------ +// Input image requirements: +// +// Color needs to be encoded as 3 channel[red, green, blue](e.g.XYZ not supported) +// Each channel needs to be in the range[0, 1] +// Any color primaries are supported +// Display / tonemapping curve needs to be as if presenting to sRGB display or similar(e.g.Gamma 2.0) +// There should be no banding in the input +// There should be no high amplitude noise in the input +// There should be no noise in the input that is not at input pixel granularity +// For performance purposes, use 32bpp formats +//------------------------------------------------------------------------------------------------------------------------------ +// Best to apply EASU at the end of the frame after tonemapping +// but before film grain or composite of the UI. +//------------------------------------------------------------------------------------------------------------------------------ +// Example of including this header for D3D HLSL : +// +// #define A_GPU 1 +// #define A_HLSL 1 +// #define A_HALF 1 +// #include "ffx_a.h" +// #define FSR_EASU_H 1 +// #define FSR_RCAS_H 1 +// //declare input callbacks +// #include "ffx_fsr1.h" +// +// Example of including this header for Vulkan GLSL : +// +// #define A_GPU 1 +// #define A_GLSL 1 +// #define A_HALF 1 +// #include "ffx_a.h" +// #define FSR_EASU_H 1 +// #define FSR_RCAS_H 1 +// //declare input callbacks +// #include "ffx_fsr1.h" +// +// Example of including this header for Vulkan HLSL : +// +// #define A_GPU 1 +// #define A_HLSL 1 +// #define A_HLSL_6_2 1 +// #define A_NO_16_BIT_CAST 1 +// #define A_HALF 1 +// #include "ffx_a.h" +// #define FSR_EASU_H 1 +// #define FSR_RCAS_H 1 +// //declare input callbacks +// #include "ffx_fsr1.h" +// +// Example of declaring the required input callbacks for GLSL : +// The callbacks need to gather4 for each color channel using the specified texture coordinate 'p'. +// EASU uses gather4 to reduce position computation logic and for free Arrays of Structures to Structures of Arrays conversion. +// +// AH4 FsrEasuRH(AF2 p){return AH4(textureGather(sampler2D(tex,sam),p,0));} +// AH4 FsrEasuGH(AF2 p){return AH4(textureGather(sampler2D(tex,sam),p,1));} +// AH4 FsrEasuBH(AF2 p){return AH4(textureGather(sampler2D(tex,sam),p,2));} +// ... +// The FsrEasuCon function needs to be called from the CPU or GPU to set up constants. +// The difference in viewport and input image size is there to support Dynamic Resolution Scaling. +// To use FsrEasuCon() on the CPU, define A_CPU before including ffx_a and ffx_fsr1. +// Including a GPU example here, the 'con0' through 'con3' values would be stored out to a constant buffer. +// AU4 con0,con1,con2,con3; +// FsrEasuCon(con0,con1,con2,con3, +// 1920.0,1080.0, // Viewport size (top left aligned) in the input image which is to be scaled. +// 3840.0,2160.0, // The size of the input image. +// 2560.0,1440.0); // The output resolution. +//============================================================================================================================== +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// CONSTANT SETUP +//============================================================================================================================== +// Call to setup required constant values (works on CPU or GPU). +A_STATIC void FsrEasuCon( +outAU4 con0, +outAU4 con1, +outAU4 con2, +outAU4 con3, +// This the rendered image resolution being upscaled +AF1 inputViewportInPixelsX, +AF1 inputViewportInPixelsY, +// This is the resolution of the resource containing the input image (useful for dynamic resolution) +AF1 inputSizeInPixelsX, +AF1 inputSizeInPixelsY, +// This is the display resolution which the input image gets upscaled to +AF1 outputSizeInPixelsX, +AF1 outputSizeInPixelsY){ + // Output integer position to a pixel position in viewport. + con0[0]=AU1_AF1(inputViewportInPixelsX*ARcpF1(outputSizeInPixelsX)); + con0[1]=AU1_AF1(inputViewportInPixelsY*ARcpF1(outputSizeInPixelsY)); + con0[2]=AU1_AF1(AF1_(0.5)*inputViewportInPixelsX*ARcpF1(outputSizeInPixelsX)-AF1_(0.5)); + con0[3]=AU1_AF1(AF1_(0.5)*inputViewportInPixelsY*ARcpF1(outputSizeInPixelsY)-AF1_(0.5)); + // Viewport pixel position to normalized image space. + // This is used to get upper-left of 'F' tap. + con1[0]=AU1_AF1(ARcpF1(inputSizeInPixelsX)); + con1[1]=AU1_AF1(ARcpF1(inputSizeInPixelsY)); + // Centers of gather4, first offset from upper-left of 'F'. + // +---+---+ + // | | | + // +--(0)--+ + // | b | c | + // +---F---+---+---+ + // | e | f | g | h | + // +--(1)--+--(2)--+ + // | i | j | k | l | + // +---+---+---+---+ + // | n | o | + // +--(3)--+ + // | | | + // +---+---+ + con1[2]=AU1_AF1(AF1_( 1.0)*ARcpF1(inputSizeInPixelsX)); + con1[3]=AU1_AF1(AF1_(-1.0)*ARcpF1(inputSizeInPixelsY)); + // These are from (0) instead of 'F'. + con2[0]=AU1_AF1(AF1_(-1.0)*ARcpF1(inputSizeInPixelsX)); + con2[1]=AU1_AF1(AF1_( 2.0)*ARcpF1(inputSizeInPixelsY)); + con2[2]=AU1_AF1(AF1_( 1.0)*ARcpF1(inputSizeInPixelsX)); + con2[3]=AU1_AF1(AF1_( 2.0)*ARcpF1(inputSizeInPixelsY)); + con3[0]=AU1_AF1(AF1_( 0.0)*ARcpF1(inputSizeInPixelsX)); + con3[1]=AU1_AF1(AF1_( 4.0)*ARcpF1(inputSizeInPixelsY)); + con3[2]=con3[3]=0;} + +//If the an offset into the input image resource +A_STATIC void FsrEasuConOffset( + outAU4 con0, + outAU4 con1, + outAU4 con2, + outAU4 con3, + // This the rendered image resolution being upscaled + AF1 inputViewportInPixelsX, + AF1 inputViewportInPixelsY, + // This is the resolution of the resource containing the input image (useful for dynamic resolution) + AF1 inputSizeInPixelsX, + AF1 inputSizeInPixelsY, + // This is the display resolution which the input image gets upscaled to + AF1 outputSizeInPixelsX, + AF1 outputSizeInPixelsY, + // This is the input image offset into the resource containing it (useful for dynamic resolution) + AF1 inputOffsetInPixelsX, + AF1 inputOffsetInPixelsY) { + FsrEasuCon(con0, con1, con2, con3, inputViewportInPixelsX, inputViewportInPixelsY, inputSizeInPixelsX, inputSizeInPixelsY, outputSizeInPixelsX, outputSizeInPixelsY); + con0[2] = AU1_AF1(AF1_(0.5) * inputViewportInPixelsX * ARcpF1(outputSizeInPixelsX) - AF1_(0.5) + inputOffsetInPixelsX); + con0[3] = AU1_AF1(AF1_(0.5) * inputViewportInPixelsY * ARcpF1(outputSizeInPixelsY) - AF1_(0.5) + inputOffsetInPixelsY); +} +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// NON-PACKED 32-BIT VERSION +//============================================================================================================================== +#if defined(A_GPU)&&defined(FSR_EASU_F) + // Input callback prototypes, need to be implemented by calling shader + AF4 FsrEasuRF(AF2 p); + AF4 FsrEasuGF(AF2 p); + AF4 FsrEasuBF(AF2 p); +//------------------------------------------------------------------------------------------------------------------------------ + // Filtering for a given tap for the scalar. + void FsrEasuTapF( + inout AF3 aC, // Accumulated color, with negative lobe. + inout AF1 aW, // Accumulated weight. + AF2 off, // Pixel offset from resolve position to tap. + AF2 dir, // Gradient direction. + AF2 len, // Length. + AF1 lob, // Negative lobe strength. + AF1 clp, // Clipping point. + AF3 c){ // Tap color. + // Rotate offset by direction. + AF2 v; + v.x=(off.x*( dir.x))+(off.y*dir.y); + v.y=(off.x*(-dir.y))+(off.y*dir.x); + // Anisotropy. + v*=len; + // Compute distance^2. + AF1 d2=v.x*v.x+v.y*v.y; + // Limit to the window as at corner, 2 taps can easily be outside. + d2=min(d2,clp); + // Approximation of lancos2 without sin() or rcp(), or sqrt() to get x. + // (25/16 * (2/5 * x^2 - 1)^2 - (25/16 - 1)) * (1/4 * x^2 - 1)^2 + // |_______________________________________| |_______________| + // base window + // The general form of the 'base' is, + // (a*(b*x^2-1)^2-(a-1)) + // Where 'a=1/(2*b-b^2)' and 'b' moves around the negative lobe. + AF1 wB=AF1_(2.0/5.0)*d2+AF1_(-1.0); + AF1 wA=lob*d2+AF1_(-1.0); + wB*=wB; + wA*=wA; + wB=AF1_(25.0/16.0)*wB+AF1_(-(25.0/16.0-1.0)); + AF1 w=wB*wA; + // Do weighted average. + aC+=c*w;aW+=w;} +//------------------------------------------------------------------------------------------------------------------------------ + // Accumulate direction and length. + void FsrEasuSetF( + inout AF2 dir, + inout AF1 len, + AF2 pp, + AP1 biS,AP1 biT,AP1 biU,AP1 biV, + AF1 lA,AF1 lB,AF1 lC,AF1 lD,AF1 lE){ + // Compute bilinear weight, branches factor out as predicates are compiler time immediates. + // s t + // u v + AF1 w = AF1_(0.0); + if(biS)w=(AF1_(1.0)-pp.x)*(AF1_(1.0)-pp.y); + if(biT)w= pp.x *(AF1_(1.0)-pp.y); + if(biU)w=(AF1_(1.0)-pp.x)* pp.y ; + if(biV)w= pp.x * pp.y ; + // Direction is the '+' diff. + // a + // b c d + // e + // Then takes magnitude from abs average of both sides of 'c'. + // Length converts gradient reversal to 0, smoothly to non-reversal at 1, shaped, then adding horz and vert terms. + AF1 dc=lD-lC; + AF1 cb=lC-lB; + AF1 lenX=max(abs(dc),abs(cb)); + lenX=APrxLoRcpF1(lenX); + AF1 dirX=lD-lB; + dir.x+=dirX*w; + lenX=ASatF1(abs(dirX)*lenX); + lenX*=lenX; + len+=lenX*w; + // Repeat for the y axis. + AF1 ec=lE-lC; + AF1 ca=lC-lA; + AF1 lenY=max(abs(ec),abs(ca)); + lenY=APrxLoRcpF1(lenY); + AF1 dirY=lE-lA; + dir.y+=dirY*w; + lenY=ASatF1(abs(dirY)*lenY); + lenY*=lenY; + len+=lenY*w;} +//------------------------------------------------------------------------------------------------------------------------------ + void FsrEasuF( + out AF3 pix, + AU2 ip, // Integer pixel position in output. + AU4 con0, // Constants generated by FsrEasuCon(). + AU4 con1, + AU4 con2, + AU4 con3){ +//------------------------------------------------------------------------------------------------------------------------------ + // Get position of 'f'. + AF2 pp=AF2(ip)*AF2_AU2(con0.xy)+AF2_AU2(con0.zw); + AF2 fp=floor(pp); + pp-=fp; +//------------------------------------------------------------------------------------------------------------------------------ + // 12-tap kernel. + // b c + // e f g h + // i j k l + // n o + // Gather 4 ordering. + // a b + // r g + // For packed FP16, need either {rg} or {ab} so using the following setup for gather in all versions, + // a b <- unused (z) + // r g + // a b a b + // r g r g + // a b + // r g <- unused (z) + // Allowing dead-code removal to remove the 'z's. + AF2 p0=fp*AF2_AU2(con1.xy)+AF2_AU2(con1.zw); + // These are from p0 to avoid pulling two constants on pre-Navi hardware. + AF2 p1=p0+AF2_AU2(con2.xy); + AF2 p2=p0+AF2_AU2(con2.zw); + AF2 p3=p0+AF2_AU2(con3.xy); + AF4 bczzR=FsrEasuRF(p0); + AF4 bczzG=FsrEasuGF(p0); + AF4 bczzB=FsrEasuBF(p0); + AF4 ijfeR=FsrEasuRF(p1); + AF4 ijfeG=FsrEasuGF(p1); + AF4 ijfeB=FsrEasuBF(p1); + AF4 klhgR=FsrEasuRF(p2); + AF4 klhgG=FsrEasuGF(p2); + AF4 klhgB=FsrEasuBF(p2); + AF4 zzonR=FsrEasuRF(p3); + AF4 zzonG=FsrEasuGF(p3); + AF4 zzonB=FsrEasuBF(p3); +//------------------------------------------------------------------------------------------------------------------------------ + // Simplest multi-channel approximate luma possible (luma times 2, in 2 FMA/MAD). + AF4 bczzL=bczzB*AF4_(0.5)+(bczzR*AF4_(0.5)+bczzG); + AF4 ijfeL=ijfeB*AF4_(0.5)+(ijfeR*AF4_(0.5)+ijfeG); + AF4 klhgL=klhgB*AF4_(0.5)+(klhgR*AF4_(0.5)+klhgG); + AF4 zzonL=zzonB*AF4_(0.5)+(zzonR*AF4_(0.5)+zzonG); + // Rename. + AF1 bL=bczzL.x; + AF1 cL=bczzL.y; + AF1 iL=ijfeL.x; + AF1 jL=ijfeL.y; + AF1 fL=ijfeL.z; + AF1 eL=ijfeL.w; + AF1 kL=klhgL.x; + AF1 lL=klhgL.y; + AF1 hL=klhgL.z; + AF1 gL=klhgL.w; + AF1 oL=zzonL.z; + AF1 nL=zzonL.w; + // Accumulate for bilinear interpolation. + AF2 dir=AF2_(0.0); + AF1 len=AF1_(0.0); + FsrEasuSetF(dir,len,pp,true, false,false,false,bL,eL,fL,gL,jL); + FsrEasuSetF(dir,len,pp,false,true ,false,false,cL,fL,gL,hL,kL); + FsrEasuSetF(dir,len,pp,false,false,true ,false,fL,iL,jL,kL,nL); + FsrEasuSetF(dir,len,pp,false,false,false,true ,gL,jL,kL,lL,oL); +//------------------------------------------------------------------------------------------------------------------------------ + // Normalize with approximation, and cleanup close to zero. + AF2 dir2=dir*dir; + AF1 dirR=dir2.x+dir2.y; + AP1 zro=dirR w = -m/(n+e+w+s) +// 1 == (w*(n+e+w+s)+m)/(4*w+1) -> w = (1-m)/(n+e+w+s-4*1) +// Then chooses the 'w' which results in no clipping, limits 'w', and multiplies by the 'sharp' amount. +// This solution above has issues with MSAA input as the steps along the gradient cause edge detection issues. +// So RCAS uses 4x the maximum and 4x the minimum (depending on equation)in place of the individual taps. +// As well as switching from 'm' to either the minimum or maximum (depending on side), to help in energy conservation. +// This stabilizes RCAS. +// RCAS does a simple highpass which is normalized against the local contrast then shaped, +// 0.25 +// 0.25 -1 0.25 +// 0.25 +// This is used as a noise detection filter, to reduce the effect of RCAS on grain, and focus on real edges. +// +// GLSL example for the required callbacks : +// +// AH4 FsrRcasLoadH(ASW2 p){return AH4(imageLoad(imgSrc,ASU2(p)));} +// void FsrRcasInputH(inout AH1 r,inout AH1 g,inout AH1 b) +// { +// //do any simple input color conversions here or leave empty if none needed +// } +// +// FsrRcasCon need to be called from the CPU or GPU to set up constants. +// Including a GPU example here, the 'con' value would be stored out to a constant buffer. +// +// AU4 con; +// FsrRcasCon(con, +// 0.0); // The scale is {0.0 := maximum sharpness, to N>0, where N is the number of stops (halving) of the reduction of sharpness}. +// --------------- +// RCAS sharpening supports a CAS-like pass-through alpha via, +// #define FSR_RCAS_PASSTHROUGH_ALPHA 1 +// RCAS also supports a define to enable a more expensive path to avoid some sharpening of noise. +// Would suggest it is better to apply film grain after RCAS sharpening (and after scaling) instead of using this define, +// #define FSR_RCAS_DENOISE 1 +//============================================================================================================================== +// This is set at the limit of providing unnatural results for sharpening. +#define FSR_RCAS_LIMIT (0.25-(1.0/16.0)) +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// CONSTANT SETUP +//============================================================================================================================== +// Call to setup required constant values (works on CPU or GPU). +A_STATIC void FsrRcasCon( +outAU4 con, +// The scale is {0.0 := maximum, to N>0, where N is the number of stops (halving) of the reduction of sharpness}. +AF1 sharpness){ + // Transform from stops to linear value. + sharpness=AExp2F1(-sharpness); + varAF2(hSharp)=initAF2(sharpness,sharpness); + con[0]=AU1_AF1(sharpness); + con[1]=AU1_AH2_AF2(hSharp); + con[2]=0; + con[3]=0;} +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// NON-PACKED 32-BIT VERSION +//============================================================================================================================== +#if defined(A_GPU)&&defined(FSR_RCAS_F) + // Input callback prototypes that need to be implemented by calling shader + AF4 FsrRcasLoadF(ASU2 p); + void FsrRcasInputF(inout AF1 r,inout AF1 g,inout AF1 b); +//------------------------------------------------------------------------------------------------------------------------------ + void FsrRcasF( + out AF1 pixR, // Output values, non-vector so port between RcasFilter() and RcasFilterH() is easy. + out AF1 pixG, + out AF1 pixB, + #ifdef FSR_RCAS_PASSTHROUGH_ALPHA + out AF1 pixA, + #endif + AU2 ip, // Integer pixel position in output. + AU4 con){ // Constant generated by RcasSetup(). + // Algorithm uses minimal 3x3 pixel neighborhood. + // b + // d e f + // h + ASU2 sp=ASU2(ip); + AF3 b=FsrRcasLoadF(sp+ASU2( 0,-1)).rgb; + AF3 d=FsrRcasLoadF(sp+ASU2(-1, 0)).rgb; + #ifdef FSR_RCAS_PASSTHROUGH_ALPHA + AF4 ee=FsrRcasLoadF(sp); + AF3 e=ee.rgb;pixA=ee.a; + #else + AF3 e=FsrRcasLoadF(sp).rgb; + #endif + AF3 f=FsrRcasLoadF(sp+ASU2( 1, 0)).rgb; + AF3 h=FsrRcasLoadF(sp+ASU2( 0, 1)).rgb; + // Rename (32-bit) or regroup (16-bit). + AF1 bR=b.r; + AF1 bG=b.g; + AF1 bB=b.b; + AF1 dR=d.r; + AF1 dG=d.g; + AF1 dB=d.b; + AF1 eR=e.r; + AF1 eG=e.g; + AF1 eB=e.b; + AF1 fR=f.r; + AF1 fG=f.g; + AF1 fB=f.b; + AF1 hR=h.r; + AF1 hG=h.g; + AF1 hB=h.b; + // Run optional input transform. + FsrRcasInputF(bR,bG,bB); + FsrRcasInputF(dR,dG,dB); + FsrRcasInputF(eR,eG,eB); + FsrRcasInputF(fR,fG,fB); + FsrRcasInputF(hR,hG,hB); + // Luma times 2. + AF1 bL=bB*AF1_(0.5)+(bR*AF1_(0.5)+bG); + AF1 dL=dB*AF1_(0.5)+(dR*AF1_(0.5)+dG); + AF1 eL=eB*AF1_(0.5)+(eR*AF1_(0.5)+eG); + AF1 fL=fB*AF1_(0.5)+(fR*AF1_(0.5)+fG); + AF1 hL=hB*AF1_(0.5)+(hR*AF1_(0.5)+hG); + // Noise detection. + AF1 nz=AF1_(0.25)*bL+AF1_(0.25)*dL+AF1_(0.25)*fL+AF1_(0.25)*hL-eL; + nz=ASatF1(abs(nz)*APrxMedRcpF1(AMax3F1(AMax3F1(bL,dL,eL),fL,hL)-AMin3F1(AMin3F1(bL,dL,eL),fL,hL))); + nz=AF1_(-0.5)*nz+AF1_(1.0); + // Min and max of ring. + AF1 mn4R=min(AMin3F1(bR,dR,fR),hR); + AF1 mn4G=min(AMin3F1(bG,dG,fG),hG); + AF1 mn4B=min(AMin3F1(bB,dB,fB),hB); + AF1 mx4R=max(AMax3F1(bR,dR,fR),hR); + AF1 mx4G=max(AMax3F1(bG,dG,fG),hG); + AF1 mx4B=max(AMax3F1(bB,dB,fB),hB); + // Immediate constants for peak range. + AF2 peakC=AF2(1.0,-1.0*4.0); + // Limiters, these need to be high precision RCPs. + AF1 hitMinR=min(mn4R,eR)*ARcpF1(AF1_(4.0)*mx4R); + AF1 hitMinG=min(mn4G,eG)*ARcpF1(AF1_(4.0)*mx4G); + AF1 hitMinB=min(mn4B,eB)*ARcpF1(AF1_(4.0)*mx4B); + AF1 hitMaxR=(peakC.x-max(mx4R,eR))*ARcpF1(AF1_(4.0)*mn4R+peakC.y); + AF1 hitMaxG=(peakC.x-max(mx4G,eG))*ARcpF1(AF1_(4.0)*mn4G+peakC.y); + AF1 hitMaxB=(peakC.x-max(mx4B,eB))*ARcpF1(AF1_(4.0)*mn4B+peakC.y); + AF1 lobeR=max(-hitMinR,hitMaxR); + AF1 lobeG=max(-hitMinG,hitMaxG); + AF1 lobeB=max(-hitMinB,hitMaxB); + AF1 lobe=max(AF1_(-FSR_RCAS_LIMIT),min(AMax3F1(lobeR,lobeG,lobeB),AF1_(0.0)))*AF1_AU1(con.x); + // Apply noise removal. + #ifdef FSR_RCAS_DENOISE + lobe*=nz; + #endif + // Resolve, which needs the medium precision rcp approximation to avoid visible tonality changes. + AF1 rcpL=APrxMedRcpF1(AF1_(4.0)*lobe+AF1_(1.0)); + pixR=(lobe*bR+lobe*dR+lobe*hR+lobe*fR+eR)*rcpL; + pixG=(lobe*bG+lobe*dG+lobe*hG+lobe*fG+eG)*rcpL; + pixB=(lobe*bB+lobe*dB+lobe*hB+lobe*fB+eB)*rcpL; + return;} +#endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// NON-PACKED 16-BIT VERSION +//============================================================================================================================== +#if defined(A_GPU)&&defined(A_HALF)&&defined(FSR_RCAS_H) + // Input callback prototypes that need to be implemented by calling shader + AH4 FsrRcasLoadH(ASW2 p); + void FsrRcasInputH(inout AH1 r,inout AH1 g,inout AH1 b); +//------------------------------------------------------------------------------------------------------------------------------ + void FsrRcasH( + out AH1 pixR, // Output values, non-vector so port between RcasFilter() and RcasFilterH() is easy. + out AH1 pixG, + out AH1 pixB, + #ifdef FSR_RCAS_PASSTHROUGH_ALPHA + out AH1 pixA, + #endif + AU2 ip, // Integer pixel position in output. + AU4 con){ // Constant generated by RcasSetup(). + // Sharpening algorithm uses minimal 3x3 pixel neighborhood. + // b + // d e f + // h + ASW2 sp=ASW2(ip); + AH3 b=FsrRcasLoadH(sp+ASW2( 0,-1)).rgb; + AH3 d=FsrRcasLoadH(sp+ASW2(-1, 0)).rgb; + #ifdef FSR_RCAS_PASSTHROUGH_ALPHA + AH4 ee=FsrRcasLoadH(sp); + AH3 e=ee.rgb;pixA=ee.a; + #else + AH3 e=FsrRcasLoadH(sp).rgb; + #endif + AH3 f=FsrRcasLoadH(sp+ASW2( 1, 0)).rgb; + AH3 h=FsrRcasLoadH(sp+ASW2( 0, 1)).rgb; + // Rename (32-bit) or regroup (16-bit). + AH1 bR=b.r; + AH1 bG=b.g; + AH1 bB=b.b; + AH1 dR=d.r; + AH1 dG=d.g; + AH1 dB=d.b; + AH1 eR=e.r; + AH1 eG=e.g; + AH1 eB=e.b; + AH1 fR=f.r; + AH1 fG=f.g; + AH1 fB=f.b; + AH1 hR=h.r; + AH1 hG=h.g; + AH1 hB=h.b; + // Run optional input transform. + FsrRcasInputH(bR,bG,bB); + FsrRcasInputH(dR,dG,dB); + FsrRcasInputH(eR,eG,eB); + FsrRcasInputH(fR,fG,fB); + FsrRcasInputH(hR,hG,hB); + // Luma times 2. + AH1 bL=bB*AH1_(0.5)+(bR*AH1_(0.5)+bG); + AH1 dL=dB*AH1_(0.5)+(dR*AH1_(0.5)+dG); + AH1 eL=eB*AH1_(0.5)+(eR*AH1_(0.5)+eG); + AH1 fL=fB*AH1_(0.5)+(fR*AH1_(0.5)+fG); + AH1 hL=hB*AH1_(0.5)+(hR*AH1_(0.5)+hG); + // Noise detection. + AH1 nz=AH1_(0.25)*bL+AH1_(0.25)*dL+AH1_(0.25)*fL+AH1_(0.25)*hL-eL; + nz=ASatH1(abs(nz)*APrxMedRcpH1(AMax3H1(AMax3H1(bL,dL,eL),fL,hL)-AMin3H1(AMin3H1(bL,dL,eL),fL,hL))); + nz=AH1_(-0.5)*nz+AH1_(1.0); + // Min and max of ring. + AH1 mn4R=min(AMin3H1(bR,dR,fR),hR); + AH1 mn4G=min(AMin3H1(bG,dG,fG),hG); + AH1 mn4B=min(AMin3H1(bB,dB,fB),hB); + AH1 mx4R=max(AMax3H1(bR,dR,fR),hR); + AH1 mx4G=max(AMax3H1(bG,dG,fG),hG); + AH1 mx4B=max(AMax3H1(bB,dB,fB),hB); + // Immediate constants for peak range. + AH2 peakC=AH2(1.0,-1.0*4.0); + // Limiters, these need to be high precision RCPs. + AH1 hitMinR=min(mn4R,eR)*ARcpH1(AH1_(4.0)*mx4R); + AH1 hitMinG=min(mn4G,eG)*ARcpH1(AH1_(4.0)*mx4G); + AH1 hitMinB=min(mn4B,eB)*ARcpH1(AH1_(4.0)*mx4B); + AH1 hitMaxR=(peakC.x-max(mx4R,eR))*ARcpH1(AH1_(4.0)*mn4R+peakC.y); + AH1 hitMaxG=(peakC.x-max(mx4G,eG))*ARcpH1(AH1_(4.0)*mn4G+peakC.y); + AH1 hitMaxB=(peakC.x-max(mx4B,eB))*ARcpH1(AH1_(4.0)*mn4B+peakC.y); + AH1 lobeR=max(-hitMinR,hitMaxR); + AH1 lobeG=max(-hitMinG,hitMaxG); + AH1 lobeB=max(-hitMinB,hitMaxB); + AH1 lobe=max(AH1_(-FSR_RCAS_LIMIT),min(AMax3H1(lobeR,lobeG,lobeB),AH1_(0.0)))*AH2_AU1(con.y).x; + // Apply noise removal. + #ifdef FSR_RCAS_DENOISE + lobe*=nz; + #endif + // Resolve, which needs the medium precision rcp approximation to avoid visible tonality changes. + AH1 rcpL=APrxMedRcpH1(AH1_(4.0)*lobe+AH1_(1.0)); + pixR=(lobe*bR+lobe*dR+lobe*hR+lobe*fR+eR)*rcpL; + pixG=(lobe*bG+lobe*dG+lobe*hG+lobe*fG+eG)*rcpL; + pixB=(lobe*bB+lobe*dB+lobe*hB+lobe*fB+eB)*rcpL;} +#endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// PACKED 16-BIT VERSION +//============================================================================================================================== +#if defined(A_GPU)&&defined(A_HALF)&&defined(FSR_RCAS_HX2) + // Input callback prototypes that need to be implemented by the calling shader + AH4 FsrRcasLoadHx2(ASW2 p); + void FsrRcasInputHx2(inout AH2 r,inout AH2 g,inout AH2 b); +//------------------------------------------------------------------------------------------------------------------------------ + // Can be used to convert from packed Structures of Arrays to Arrays of Structures for store. + void FsrRcasDepackHx2(out AH4 pix0,out AH4 pix1,AH2 pixR,AH2 pixG,AH2 pixB){ + #ifdef A_HLSL + // Invoke a slower path for DX only, since it won't allow uninitialized values. + pix0.a=pix1.a=0.0; + #endif + pix0.rgb=AH3(pixR.x,pixG.x,pixB.x); + pix1.rgb=AH3(pixR.y,pixG.y,pixB.y);} +//------------------------------------------------------------------------------------------------------------------------------ + void FsrRcasHx2( + // Output values are for 2 8x8 tiles in a 16x8 region. + // pix.x = left 8x8 tile + // pix.y = right 8x8 tile + // This enables later processing to easily be packed as well. + out AH2 pixR, + out AH2 pixG, + out AH2 pixB, + #ifdef FSR_RCAS_PASSTHROUGH_ALPHA + out AH2 pixA, + #endif + AU2 ip, // Integer pixel position in output. + AU4 con){ // Constant generated by RcasSetup(). + // No scaling algorithm uses minimal 3x3 pixel neighborhood. + ASW2 sp0=ASW2(ip); + AH3 b0=FsrRcasLoadHx2(sp0+ASW2( 0,-1)).rgb; + AH3 d0=FsrRcasLoadHx2(sp0+ASW2(-1, 0)).rgb; + #ifdef FSR_RCAS_PASSTHROUGH_ALPHA + AH4 ee0=FsrRcasLoadHx2(sp0); + AH3 e0=ee0.rgb;pixA.r=ee0.a; + #else + AH3 e0=FsrRcasLoadHx2(sp0).rgb; + #endif + AH3 f0=FsrRcasLoadHx2(sp0+ASW2( 1, 0)).rgb; + AH3 h0=FsrRcasLoadHx2(sp0+ASW2( 0, 1)).rgb; + ASW2 sp1=sp0+ASW2(8,0); + AH3 b1=FsrRcasLoadHx2(sp1+ASW2( 0,-1)).rgb; + AH3 d1=FsrRcasLoadHx2(sp1+ASW2(-1, 0)).rgb; + #ifdef FSR_RCAS_PASSTHROUGH_ALPHA + AH4 ee1=FsrRcasLoadHx2(sp1); + AH3 e1=ee1.rgb;pixA.g=ee1.a; + #else + AH3 e1=FsrRcasLoadHx2(sp1).rgb; + #endif + AH3 f1=FsrRcasLoadHx2(sp1+ASW2( 1, 0)).rgb; + AH3 h1=FsrRcasLoadHx2(sp1+ASW2( 0, 1)).rgb; + // Arrays of Structures to Structures of Arrays conversion. + AH2 bR=AH2(b0.r,b1.r); + AH2 bG=AH2(b0.g,b1.g); + AH2 bB=AH2(b0.b,b1.b); + AH2 dR=AH2(d0.r,d1.r); + AH2 dG=AH2(d0.g,d1.g); + AH2 dB=AH2(d0.b,d1.b); + AH2 eR=AH2(e0.r,e1.r); + AH2 eG=AH2(e0.g,e1.g); + AH2 eB=AH2(e0.b,e1.b); + AH2 fR=AH2(f0.r,f1.r); + AH2 fG=AH2(f0.g,f1.g); + AH2 fB=AH2(f0.b,f1.b); + AH2 hR=AH2(h0.r,h1.r); + AH2 hG=AH2(h0.g,h1.g); + AH2 hB=AH2(h0.b,h1.b); + // Run optional input transform. + FsrRcasInputHx2(bR,bG,bB); + FsrRcasInputHx2(dR,dG,dB); + FsrRcasInputHx2(eR,eG,eB); + FsrRcasInputHx2(fR,fG,fB); + FsrRcasInputHx2(hR,hG,hB); + // Luma times 2. + AH2 bL=bB*AH2_(0.5)+(bR*AH2_(0.5)+bG); + AH2 dL=dB*AH2_(0.5)+(dR*AH2_(0.5)+dG); + AH2 eL=eB*AH2_(0.5)+(eR*AH2_(0.5)+eG); + AH2 fL=fB*AH2_(0.5)+(fR*AH2_(0.5)+fG); + AH2 hL=hB*AH2_(0.5)+(hR*AH2_(0.5)+hG); + // Noise detection. + AH2 nz=AH2_(0.25)*bL+AH2_(0.25)*dL+AH2_(0.25)*fL+AH2_(0.25)*hL-eL; + nz=ASatH2(abs(nz)*APrxMedRcpH2(AMax3H2(AMax3H2(bL,dL,eL),fL,hL)-AMin3H2(AMin3H2(bL,dL,eL),fL,hL))); + nz=AH2_(-0.5)*nz+AH2_(1.0); + // Min and max of ring. + AH2 mn4R=min(AMin3H2(bR,dR,fR),hR); + AH2 mn4G=min(AMin3H2(bG,dG,fG),hG); + AH2 mn4B=min(AMin3H2(bB,dB,fB),hB); + AH2 mx4R=max(AMax3H2(bR,dR,fR),hR); + AH2 mx4G=max(AMax3H2(bG,dG,fG),hG); + AH2 mx4B=max(AMax3H2(bB,dB,fB),hB); + // Immediate constants for peak range. + AH2 peakC=AH2(1.0,-1.0*4.0); + // Limiters, these need to be high precision RCPs. + AH2 hitMinR=min(mn4R,eR)*ARcpH2(AH2_(4.0)*mx4R); + AH2 hitMinG=min(mn4G,eG)*ARcpH2(AH2_(4.0)*mx4G); + AH2 hitMinB=min(mn4B,eB)*ARcpH2(AH2_(4.0)*mx4B); + AH2 hitMaxR=(peakC.x-max(mx4R,eR))*ARcpH2(AH2_(4.0)*mn4R+peakC.y); + AH2 hitMaxG=(peakC.x-max(mx4G,eG))*ARcpH2(AH2_(4.0)*mn4G+peakC.y); + AH2 hitMaxB=(peakC.x-max(mx4B,eB))*ARcpH2(AH2_(4.0)*mn4B+peakC.y); + AH2 lobeR=max(-hitMinR,hitMaxR); + AH2 lobeG=max(-hitMinG,hitMaxG); + AH2 lobeB=max(-hitMinB,hitMaxB); + AH2 lobe=max(AH2_(-FSR_RCAS_LIMIT),min(AMax3H2(lobeR,lobeG,lobeB),AH2_(0.0)))*AH2_(AH2_AU1(con.y).x); + // Apply noise removal. + #ifdef FSR_RCAS_DENOISE + lobe*=nz; + #endif + // Resolve, which needs the medium precision rcp approximation to avoid visible tonality changes. + AH2 rcpL=APrxMedRcpH2(AH2_(4.0)*lobe+AH2_(1.0)); + pixR=(lobe*bR+lobe*dR+lobe*hR+lobe*fR+eR)*rcpL; + pixG=(lobe*bG+lobe*dG+lobe*hG+lobe*fG+eG)*rcpL; + pixB=(lobe*bB+lobe*dB+lobe*hB+lobe*fB+eB)*rcpL;} +#endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// +// FSR - [LFGA] LINEAR FILM GRAIN APPLICATOR +// +//------------------------------------------------------------------------------------------------------------------------------ +// Adding output-resolution film grain after scaling is a good way to mask both rendering and scaling artifacts. +// Suggest using tiled blue noise as film grain input, with peak noise frequency set for a specific look and feel. +// The 'Lfga*()' functions provide a convenient way to introduce grain. +// These functions limit grain based on distance to signal limits. +// This is done so that the grain is temporally energy preserving, and thus won't modify image tonality. +// Grain application should be done in a linear colorspace. +// The grain should be temporally changing, but have a temporal sum per pixel that adds to zero (non-biased). +//------------------------------------------------------------------------------------------------------------------------------ +// Usage, +// FsrLfga*( +// color, // In/out linear colorspace color {0 to 1} ranged. +// grain, // Per pixel grain texture value {-0.5 to 0.5} ranged, input is 3-channel to support colored grain. +// amount); // Amount of grain (0 to 1} ranged. +//------------------------------------------------------------------------------------------------------------------------------ +// Example if grain texture is monochrome: 'FsrLfgaF(color,AF3_(grain),amount)' +//============================================================================================================================== +#if defined(A_GPU) + // Maximum grain is the minimum distance to the signal limit. + void FsrLfgaF(inout AF3 c,AF3 t,AF1 a){c+=(t*AF3_(a))*min(AF3_(1.0)-c,c);} +#endif +//============================================================================================================================== +#if defined(A_GPU)&&defined(A_HALF) + // Half precision version (slower). + void FsrLfgaH(inout AH3 c,AH3 t,AH1 a){c+=(t*AH3_(a))*min(AH3_(1.0)-c,c);} +//------------------------------------------------------------------------------------------------------------------------------ + // Packed half precision version (faster). + void FsrLfgaHx2(inout AH2 cR,inout AH2 cG,inout AH2 cB,AH2 tR,AH2 tG,AH2 tB,AH1 a){ + cR+=(tR*AH2_(a))*min(AH2_(1.0)-cR,cR);cG+=(tG*AH2_(a))*min(AH2_(1.0)-cG,cG);cB+=(tB*AH2_(a))*min(AH2_(1.0)-cB,cB);} +#endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// +// FSR - [SRTM] SIMPLE REVERSIBLE TONE-MAPPER +// +//------------------------------------------------------------------------------------------------------------------------------ +// This provides a way to take linear HDR color {0 to FP16_MAX} and convert it into a temporary {0 to 1} ranged post-tonemapped linear. +// The tonemapper preserves RGB ratio, which helps maintain HDR color bleed during filtering. +//------------------------------------------------------------------------------------------------------------------------------ +// Reversible tonemapper usage, +// FsrSrtm*(color); // {0 to FP16_MAX} converted to {0 to 1}. +// FsrSrtmInv*(color); // {0 to 1} converted into {0 to 32768, output peak safe for FP16}. +//============================================================================================================================== +#if defined(A_GPU) + void FsrSrtmF(inout AF3 c){c*=AF3_(ARcpF1(AMax3F1(c.r,c.g,c.b)+AF1_(1.0)));} + // The extra max solves the c=1.0 case (which is a /0). + void FsrSrtmInvF(inout AF3 c){c*=AF3_(ARcpF1(max(AF1_(1.0/32768.0),AF1_(1.0)-AMax3F1(c.r,c.g,c.b))));} +#endif +//============================================================================================================================== +#if defined(A_GPU)&&defined(A_HALF) + void FsrSrtmH(inout AH3 c){c*=AH3_(ARcpH1(AMax3H1(c.r,c.g,c.b)+AH1_(1.0)));} + void FsrSrtmInvH(inout AH3 c){c*=AH3_(ARcpH1(max(AH1_(1.0/32768.0),AH1_(1.0)-AMax3H1(c.r,c.g,c.b))));} +//------------------------------------------------------------------------------------------------------------------------------ + void FsrSrtmHx2(inout AH2 cR,inout AH2 cG,inout AH2 cB){ + AH2 rcp=ARcpH2(AMax3H2(cR,cG,cB)+AH2_(1.0));cR*=rcp;cG*=rcp;cB*=rcp;} + void FsrSrtmInvHx2(inout AH2 cR,inout AH2 cG,inout AH2 cB){ + AH2 rcp=ARcpH2(max(AH2_(1.0/32768.0),AH2_(1.0)-AMax3H2(cR,cG,cB)));cR*=rcp;cG*=rcp;cB*=rcp;} +#endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// +// FSR - [TEPD] TEMPORAL ENERGY PRESERVING DITHER +// +//------------------------------------------------------------------------------------------------------------------------------ +// Temporally energy preserving dithered {0 to 1} linear to gamma 2.0 conversion. +// Gamma 2.0 is used so that the conversion back to linear is just to square the color. +// The conversion comes in 8-bit and 10-bit modes, designed for output to 8-bit UNORM or 10:10:10:2 respectively. +// Given good non-biased temporal blue noise as dither input, +// the output dither will temporally conserve energy. +// This is done by choosing the linear nearest step point instead of perceptual nearest. +// See code below for details. +//------------------------------------------------------------------------------------------------------------------------------ +// DX SPEC RULES FOR FLOAT->UNORM 8-BIT CONVERSION +// =============================================== +// - Output is 'uint(floor(saturate(n)*255.0+0.5))'. +// - Thus rounding is to nearest. +// - NaN gets converted to zero. +// - INF is clamped to {0.0 to 1.0}. +//============================================================================================================================== +#if defined(A_GPU) + // Hand tuned integer position to dither value, with more values than simple checkerboard. + // Only 32-bit has enough precision for this compddation. + // Output is {0 to <1}. + AF1 FsrTepdDitF(AU2 p,AU1 f){ + AF1 x=AF1_(p.x+f); + AF1 y=AF1_(p.y); + // The 1.61803 golden ratio. + AF1 a=AF1_((1.0+sqrt(5.0))/2.0); + // Number designed to provide a good visual pattern. + AF1 b=AF1_(1.0/3.69); + x=x*a+(y*b); + return AFractF1(x);} +//------------------------------------------------------------------------------------------------------------------------------ + // This version is 8-bit gamma 2.0. + // The 'c' input is {0 to 1}. + // Output is {0 to 1} ready for image store. + void FsrTepdC8F(inout AF3 c,AF1 dit){ + AF3 n=sqrt(c); + n=floor(n*AF3_(255.0))*AF3_(1.0/255.0); + AF3 a=n*n; + AF3 b=n+AF3_(1.0/255.0);b=b*b; + // Ratio of 'a' to 'b' required to produce 'c'. + // APrxLoRcpF1() won't work here (at least for very high dynamic ranges). + // APrxMedRcpF1() is an IADD,FMA,MUL. + AF3 r=(c-b)*APrxMedRcpF3(a-b); + // Use the ratio as a cutoff to choose 'a' or 'b'. + // AGtZeroF1() is a MUL. + c=ASatF3(n+AGtZeroF3(AF3_(dit)-r)*AF3_(1.0/255.0));} +//------------------------------------------------------------------------------------------------------------------------------ + // This version is 10-bit gamma 2.0. + // The 'c' input is {0 to 1}. + // Output is {0 to 1} ready for image store. + void FsrTepdC10F(inout AF3 c,AF1 dit){ + AF3 n=sqrt(c); + n=floor(n*AF3_(1023.0))*AF3_(1.0/1023.0); + AF3 a=n*n; + AF3 b=n+AF3_(1.0/1023.0);b=b*b; + AF3 r=(c-b)*APrxMedRcpF3(a-b); + c=ASatF3(n+AGtZeroF3(AF3_(dit)-r)*AF3_(1.0/1023.0));} +#endif +//============================================================================================================================== +#if defined(A_GPU)&&defined(A_HALF) + AH1 FsrTepdDitH(AU2 p,AU1 f){ + AF1 x=AF1_(p.x+f); + AF1 y=AF1_(p.y); + AF1 a=AF1_((1.0+sqrt(5.0))/2.0); + AF1 b=AF1_(1.0/3.69); + x=x*a+(y*b); + return AH1(AFractF1(x));} +//------------------------------------------------------------------------------------------------------------------------------ + void FsrTepdC8H(inout AH3 c,AH1 dit){ + AH3 n=sqrt(c); + n=floor(n*AH3_(255.0))*AH3_(1.0/255.0); + AH3 a=n*n; + AH3 b=n+AH3_(1.0/255.0);b=b*b; + AH3 r=(c-b)*APrxMedRcpH3(a-b); + c=ASatH3(n+AGtZeroH3(AH3_(dit)-r)*AH3_(1.0/255.0));} +//------------------------------------------------------------------------------------------------------------------------------ + void FsrTepdC10H(inout AH3 c,AH1 dit){ + AH3 n=sqrt(c); + n=floor(n*AH3_(1023.0))*AH3_(1.0/1023.0); + AH3 a=n*n; + AH3 b=n+AH3_(1.0/1023.0);b=b*b; + AH3 r=(c-b)*APrxMedRcpH3(a-b); + c=ASatH3(n+AGtZeroH3(AH3_(dit)-r)*AH3_(1.0/1023.0));} +//============================================================================================================================== + // This computes dither for positions 'p' and 'p+{8,0}'. + AH2 FsrTepdDitHx2(AU2 p,AU1 f){ + AF2 x; + x.x=AF1_(p.x+f); + x.y=x.x+AF1_(8.0); + AF1 y=AF1_(p.y); + AF1 a=AF1_((1.0+sqrt(5.0))/2.0); + AF1 b=AF1_(1.0/3.69); + x=x*AF2_(a)+AF2_(y*b); + return AH2(AFractF2(x));} +//------------------------------------------------------------------------------------------------------------------------------ + void FsrTepdC8Hx2(inout AH2 cR,inout AH2 cG,inout AH2 cB,AH2 dit){ + AH2 nR=sqrt(cR); + AH2 nG=sqrt(cG); + AH2 nB=sqrt(cB); + nR=floor(nR*AH2_(255.0))*AH2_(1.0/255.0); + nG=floor(nG*AH2_(255.0))*AH2_(1.0/255.0); + nB=floor(nB*AH2_(255.0))*AH2_(1.0/255.0); + AH2 aR=nR*nR; + AH2 aG=nG*nG; + AH2 aB=nB*nB; + AH2 bR=nR+AH2_(1.0/255.0);bR=bR*bR; + AH2 bG=nG+AH2_(1.0/255.0);bG=bG*bG; + AH2 bB=nB+AH2_(1.0/255.0);bB=bB*bB; + AH2 rR=(cR-bR)*APrxMedRcpH2(aR-bR); + AH2 rG=(cG-bG)*APrxMedRcpH2(aG-bG); + AH2 rB=(cB-bB)*APrxMedRcpH2(aB-bB); + cR=ASatH2(nR+AGtZeroH2(dit-rR)*AH2_(1.0/255.0)); + cG=ASatH2(nG+AGtZeroH2(dit-rG)*AH2_(1.0/255.0)); + cB=ASatH2(nB+AGtZeroH2(dit-rB)*AH2_(1.0/255.0));} +//------------------------------------------------------------------------------------------------------------------------------ + void FsrTepdC10Hx2(inout AH2 cR,inout AH2 cG,inout AH2 cB,AH2 dit){ + AH2 nR=sqrt(cR); + AH2 nG=sqrt(cG); + AH2 nB=sqrt(cB); + nR=floor(nR*AH2_(1023.0))*AH2_(1.0/1023.0); + nG=floor(nG*AH2_(1023.0))*AH2_(1.0/1023.0); + nB=floor(nB*AH2_(1023.0))*AH2_(1.0/1023.0); + AH2 aR=nR*nR; + AH2 aG=nG*nG; + AH2 aB=nB*nB; + AH2 bR=nR+AH2_(1.0/1023.0);bR=bR*bR; + AH2 bG=nG+AH2_(1.0/1023.0);bG=bG*bG; + AH2 bB=nB+AH2_(1.0/1023.0);bB=bB*bB; + AH2 rR=(cR-bR)*APrxMedRcpH2(aR-bR); + AH2 rG=(cG-bG)*APrxMedRcpH2(aG-bG); + AH2 rB=(cB-bB)*APrxMedRcpH2(aB-bB); + cR=ASatH2(nR+AGtZeroH2(dit-rR)*AH2_(1.0/1023.0)); + cG=ASatH2(nG+AGtZeroH2(dit-rG)*AH2_(1.0/1023.0)); + cB=ASatH2(nB+AGtZeroH2(dit-rB)*AH2_(1.0/1023.0));} +#endif diff --git a/docs/API.md b/docs/API.md index 320c044..59960f8 100644 --- a/docs/API.md +++ b/docs/API.md @@ -111,7 +111,7 @@ float samples). ```json { - "version": "1.0", + "version": "1.5", "backend": "h264", "width": 1920, "height": 1080, @@ -120,6 +120,8 @@ float samples). "fps": 60.3, "kbps": 1008.8, "clients": 1, + "viewers": 1, + "bitrate": 20000000, "recording": false, "recording_name": "", "recording_frames": 0, @@ -137,6 +139,8 @@ float samples). time since the server last (re)started, so they overcount after an encoder reopen. The app shows its own rate over the last 2 s instead. `clients` counts every open request socket (including status polling). +`viewers` is how many people are watching: 1 while the current viewer has a +stream open, else 0 (see [One viewer at a time](#one-viewer-at-a-time)). ## Recording @@ -190,3 +194,35 @@ Response body shape: `{"message":"..."}` over `HTTP/1.1 Profile`. | Receive timeout | 1 s | | Max video frame | 2 MiB | | Max audio packet | 64 KiB | + +## One viewer at a time + +`/frames`, `/audio` and `/rtp/video` belong to one viewer at a time. A viewer +is named by `?viewer=` (letters, digits, `-`, `_`; the dashboard makes a +new one per page) or, without it, by the client's IP address (the desktop app). + +- A different viewer connecting takes over: every stream of the current viewer + ends. +- A viewer that was pushed out is refused with **HTTP 409** while the one that + pushed it is still watching (or reconnecting within 5 s), so two clients that + reconnect on their own can't take turns kicking each other. +- `&take=1` takes over anyway (the dashboard's **Watch here** button). +- Once the current viewer has been gone for 5 s, anyone can connect again. + +## Bitrate + +The encoder runs at **20 Mbit/s** (`bitrate` in `status.json`; a `bitrate=N` +start argument changes it). Measured in a busy game over Wi-Fi, 20 Mbit/s +hitched about half as often as 30, and 40 and 60 more still; a calm home +screen needs far less. + +It is set once, before `Start`, and can't change while Glint runs (tested on a +PS5, 13.60): + +- `SetVideoBitrate` on a running session returns ok, but every `ReadVideo` + after it fails with 0x80c78000 and the encoder stays locked until a restart. +- Closing the session cleanly (Stop, Close, arbitrator cleared) and opening a + new one gets through `OpenVideo` and `SetVideoBitrate`, then `Start` is + refused with 0x80c78000. The encoder takes one capture session per boot. +- Every frame is a reference frame (`nal_ref_idc` 2), so a cap after the + encoder can't drop frames without breaking the picture. diff --git a/docs/CONSOLE.md b/docs/CONSOLE.md index 57b2327..6b4ec5b 100644 --- a/docs/CONSOLE.md +++ b/docs/CONSOLE.md @@ -36,7 +36,7 @@ over any other payload's folder: ```bash curl -s --ftp-create-dirs -T payload/build/glint-payload.elf \ - ftp://$PS5:2121/data/pldmgr/payloads/local/glint/Glint-1.0-ps5.elf + ftp://$PS5:2121/data/pldmgr/payloads/local/glint/Glint-1.5-ps5.elf ``` Payload Manager only accepts files under its payload tree and a name shaped like @@ -46,7 +46,7 @@ After uploading, read the file back and compare the hash before loading — an upload interrupted by the console sleeping can leave a truncated file: ```bash -curl -s ftp://$PS5:2121/data/pldmgr/payloads/local/glint/Glint-1.0-ps5.elf -o check.elf +curl -s ftp://$PS5:2121/data/pldmgr/payloads/local/glint/Glint-1.5-ps5.elf -o check.elf sha256sum payload/build/glint-payload.elf check.elf ``` @@ -54,13 +54,13 @@ sha256sum payload/build/glint-payload.elf check.elf ```bash curl -s -X POST -H "X-PLDMGR-Request: 1" \ - "http://$PS5:8084/loadpayload:/data/pldmgr/payloads/local/glint/Glint-1.0-ps5.elf" + "http://$PS5:8084/loadpayload:/data/pldmgr/payloads/local/glint/Glint-1.5-ps5.elf" ``` The payload shows a banner on the console: "Glint loaded", then "Glint ready on port 7231" once capture starts. If the encoder is busy it -shows "the PS5 refused to start video capture (0x80c78000)" — wait a minute and -load it again. +shows "the PS5 refused to start video capture (0x80c78000)" — load it again. +This often happens on the first try after the PS5 starts; the second works. ## 4. Validate diff --git a/docs/STATUS.md b/docs/STATUS.md index 58d79d7..078b6d6 100644 --- a/docs/STATUS.md +++ b/docs/STATUS.md @@ -46,7 +46,7 @@ minute between sessions before it will start again. - **Built-in viewer** for the gallery: recordings play with sound, seek and volume; screenshots zoom and pan. `--view ` opens one directly. - **One file, no console window**: static exe built as a Windows app; version - 1.0 (app and payload). + 1.5 (app and payload). - **Video page**: GPU/CPU decode, GPU/CPU colour conversion, Latency, graphics info. The top chip shows the fps and Mbit/s actually received over the last 2 s. @@ -72,7 +72,6 @@ real console stream (the host build's synthetic stream is not a decodable image) - Re-encoding PC recorder (frame-rate / bitrate options). - Console recording library in the app (browse/download console recordings). -- Image-quality panel (upscale / sharpen / denoise). - Plugin manager. Out of scope: Sony Remote Play and cloud sessions. diff --git a/payload/assets/dashboard.html b/payload/assets/dashboard.html index 554c42e..9696fb6 100644 --- a/payload/assets/dashboard.html +++ b/payload/assets/dashboard.html @@ -130,6 +130,9 @@ .b.outline:hover{background:var(--raised)} .b.danger{border:0;background:var(--live);color:#fff} .b.danger:hover{filter:brightness(.92)} + .b.primary{border:0;background:var(--primary);color:var(--on-primary)} + .b.primary:hover{background:var(--primary-hover)} + #takeover{margin-top:18px;pointer-events:auto} .toast{position:fixed;left:50%;bottom:96px;transform:translate(-50%,10px);padding:10px 16px;border-radius:12px;background:var(--raised);border:1px solid var(--line);box-shadow:0 8px 24px var(--shadow);opacity:0;pointer-events:none;transition:opacity .22s,transform .3s cubic-bezier(.22,1,.36,1);white-space:nowrap} .toast.show{opacity:1;transform:translate(-50%,0)} @@ -155,6 +158,7 @@

Connecting to your PS5

Talking to the Glint payload.

+ @@ -165,7 +169,6 @@ Connecting -