Refactor code structure for improved readability and maintainability

Remove debugging border from the websr plugin's styling

Enhance canvas sizing logic in artplayer-plugin-websr

- Updated canvas positioning to center it within the player.
- Introduced a new function to calculate canvas size based on the video aspect ratio.
- Adjusted canvas dimensions during initialization and on resize events to maintain aspect ratio.
- Ensured canvas styles are updated to reflect the calculated dimensions.

feat: add comparison mode to artplayer-plugin-websr

- Updated README.md to reflect new comparison feature and simplified content.
- Modified package.json to remove unnecessary keywords.
- Enhanced index.js to implement comparison functionality, allowing users to compare original and upscaled video.
- Added new methods for enabling, disabling, and toggling comparison mode, as well as setting and getting the comparison position.
- Updated TypeScript definitions to include new comparison options and methods.
This commit is contained in:
Harvey Zhao committed 2026-02-10 23:02:31 +08:00
1 parent 07a5b0c0f0
commit 7dffd99cfd
308 files changed
+3175 -852

No files matched your search

+1
View File
@@ -0,0 +1 @@
{"name": "anime4k/cnn-2x-m", "layers": {"conv2d_tf": {"name": "conv2d_tf", "type": "conv", "inputs": ["input_image"], "output": "conv2d_tf", "weights": [-0.43700448, -0.12383181, -0.39803663, 0.52009004, -0.42380998, 0.07342348, -0.10417725, -0.1929202, -0.20059313, 0.08596013, -0.036150236, 0.1943204, 0.0, 0.0, 0.0, 0.0, 0.5285974, -0.14970095, 0.21255529, 0.36134776, -0.0778857, 0.061038077, 0.24571013, -0.06840865, 0.06106429, -0.06369855, 0.17126374, -0.025089366, 0.0, 0.0, 0.0, 0.0, -0.0073111467, 0.15535195, -0.089282654, -0.165693, -0.13300648, -0.0011212918, 0.15022895, 0.20636183, 0.09242716, -0.026319012, -0.21280405, -0.024262758, 0.0, 0.0, 0.0, 0.0, 0.1622117, -0.07452305, 0.27938735, 0.14650205, 0.18462916, 0.1800196, -0.23781396, -0.31704575, 0.17726475, -0.07114437, -0.091533884, -0.14328986, 0.0, 0.0, 0.0, 0.0, -0.42393574, -0.15274704, 0.32710415, -0.6862922, 0.4688005, -0.6634383, 0.66417086, 0.1555097, -0.02981386, -0.2933985, 0.33087853, 0.11909872, 0.0, 0.0, 0.0, 0.0, 0.33267993, -0.15994301, -0.26408252, -0.086990856, -0.22168767, 0.26116654, 0.22150806, 0.09417441, -0.0658948, 0.10053972, 0.27021578, -0.026661402, 0.0, 0.0, 0.0, 0.0, 0.16740121, 0.1931361, 0.20080176, 0.01869556, -0.11620115, -0.30608, -0.22552842, 0.0681357, 0.0069506024, 0.052228536, 0.24273908, -0.07155123, 0.0, 0.0, 0.0, 0.0, -0.18680367, 0.08907917, 0.13614553, 0.024371676, 0.14730337, -0.23263486, -0.33878776, -0.29022864, -0.14831644, 0.088786215, -0.21803996, -0.05703613, 0.0, 0.0, 0.0, 0.0, -0.14036681, 0.03581416, -0.11044763, -0.19030686, 0.1583473, 0.34034556, 0.097776145, 0.28929195, 0.10333786, 0.0068274974, -0.2546084, 0.011477104, 0.0, 0.0, 0.0, 0.0], "bias": [-0.049156994, 0.0032814543, -0.021223499, 0.04594601]}, "conv2d_1_tf": {"name": "conv2d_1_tf", "type": "conv", "inputs": ["conv2d_tf"], "output": "conv2d_1_tf", "weights": [-0.084388204, -0.03754589, -0.03338206, -0.022792505, -0.11356078, -0.076055825, -0.116272084, 0.009878847, 0.050765485, -0.016359871, -0.0662348, -0.029309144, -0.0333739, -0.036814813, -0.051065993, -0.12447015, 0.14584453, -0.043335147, -0.14875184, -0.2461169, 0.34755084, 0.15603498, 0.12930207, -0.25289717, -0.09891424, 0.18705226, 0.29315478, 0.17761377, 0.35723284, 0.058198802, -0.058125, -0.021009078, -0.111764, 0.09134145, 0.21115285, 0.100136325, -0.072855465, 0.15357259, 0.15194869, 0.0178175, 0.09330566, -0.098077565, 0.038239785, 0.059173394, -0.068434745, 0.045846846, -0.17534588, 0.07933592, -0.066422224, 0.022894884, -0.07700093, 0.08097129, -0.14496642, -0.14080046, 0.11690855, -0.0130255865, 0.08388152, -0.04426715, 0.07650244, -0.08116129, 0.053052384, 0.016861709, -0.07543915, -0.06905064, -0.21035792, -0.105432585, -0.0056535043, -0.23794414, 0.48689848, 0.31393805, 0.3530186, -0.19768368, -0.1997345, -0.26513356, -0.18177964, -0.039847106, -0.21796939, -0.21797366, -0.014920429, -0.03402468, 0.22454734, -0.2740147, 0.37796697, 0.4131328, 0.17031397, -0.2167817, -0.18882456, -0.06301378, 0.09259609, 0.14579444, -0.1731323, -0.2815266, -0.09086814, 0.22318031, 0.13372593, -0.0059168623, -0.041474655, 0.049808305, 0.070003934, 0.07624304, -0.20659865, 0.11079161, -0.14937906, 0.04126273, 0.08142401, -0.07068922, -0.020291204, -0.017090015, -0.025190167, -0.013943749, 0.049148437, -0.0019008453, 0.026148785, 0.2774172, 0.040490817, 0.08888442, -0.0321537, -0.010025804, 0.29734322, 0.059648763, -0.06863294, 0.02136135, 0.08915012, -0.1493992, -0.14656575, 0.07361045, -0.0784827, 0.20458257, 0.013372844, 0.2095454, 0.28334874, -0.17267562, 0.049244374, 0.09788063, -0.12814337, -0.18134497, -0.057618555, 0.17491128, -0.16961642, -0.10532874, -0.05132699, -0.11516367, 0.057307858, 0.3841081, -0.012563992, -0.005472043, 0.012879804, 0.048063014, -0.46123943, 0.23493885, 0.030362573, -0.16059463, -0.007925698, 0.084083386, -0.02318799, -0.0648104, -0.013350591, 0.080370896, -0.015556411, 0.109980844, -0.12998067, 0.069770575, 0.13883549, 0.21138588, -0.05804825, -0.21146816, 0.3263755, 0.21483842, 0.023421993, -0.20007822, -0.29615954, -0.15914749, -0.09120564, -0.120906316, 0.016582696, 0.081140004, 0.05719205, -0.11219546, -0.09251098, -0.047495708, -0.0054177176, -0.18277131, -0.19931898, -0.026179295, -0.259792, 0.12538151, 0.12978444, -0.084640495, 0.075031735, 0.038247548, -0.018510683, -0.13305412, -0.02436355, -0.018553583, 0.07399168, -0.051803768, -0.027177656, 0.19410136, -0.007979428, 0.03406536, 0.037885316, 0.04339598, -0.017780855, 0.1151958, -0.08222779, -0.05242254, 0.09643237, 0.10336347, 0.0150745055, -0.10105735, 0.15461528, 0.15281117, -0.31552103, -0.24329075, -0.044556107, -0.045301564, 0.47285315, 0.13444383, 0.05405222, -0.008511255, -0.102524556, 0.002268493, 0.0722259, -0.168346, -0.20540647, 0.09040869, 0.00019255982, -0.2921076, 0.06381097, 0.2187697, -0.0608732, 0.012592055, -0.12938985, -0.20120203, 0.34224886, 0.37817004, 0.039558195, -0.1321521, -0.09888887, -0.1906491, 0.04147559, -0.06910313, -0.05176795, 0.031068431, 0.055590235Line truncated