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-s", "layers": {"conv2d_tf": {"name": "conv2d_tf", "type": "conv", "inputs": ["input_image"], "output": "conv2d_tf", "weights": [-0.25782192, 0.15356855, -0.07591801, 0.025576258, 0.15639038, -0.003467518, 0.12388964, -0.074463956, 0.1363419, 0.10602972, -0.08083917, -0.0098574, 0.0, 0.0, 0.0, 0.0, 0.23684815, -0.06991441, -0.26512906, 0.04322338, 0.13556279, -0.35494795, -0.13624676, 0.020295974, -0.0999787, -0.04245641, -0.1272923, 0.10147985, 0.0, 0.0, 0.0, 0.0, 0.12914264, 0.09177784, 0.3579164, -0.11445263, -0.16305687, 0.052706085, 0.36622983, -0.0011837523, 0.033064514, 0.096229866, 0.0552606, -0.034237757, 0.0, 0.0, 0.0, 0.0, 0.27514997, -0.1300823, 0.027395383, 0.12283199, 0.5383546, 0.09842804, -0.12462158, -0.17170155, -0.01863094, -0.10540424, 0.18628319, 0.12033461, 0.0, 0.0, 0.0, 0.0, -0.43199503, -0.41099274, -0.3517322, -0.44664156, -0.4758843, -0.24648757, -0.3566836, -0.017266102, -0.20802185, -0.3654689, -0.19757888, -0.29120144, 0.0, 0.0, 0.0, 0.0, -0.15593381, -0.18778, 0.2499271, -0.037658677, 0.14603312, 0.015572719, 0.10806066, -0.4077356, -0.1000264, -0.12753147, 0.18192403, -0.24150863, 0.0, 0.0, 0.0, 0.0, 0.07505814, 0.015251832, 0.09499054, 0.044957004, -0.18697514, 0.02458684, -0.02497988, -0.029909676, -0.05428892, 0.106657036, -0.06808904, -0.041664355, 0.0, 0.0, 0.0, 0.0, -0.20078097, 0.03437222, 0.038230244, 0.10970939, -0.43864843, -0.13626677, 0.17990443, 0.41581368, 0.024597576, 0.11880136, -0.10763169, 0.19922386, 0.0, 0.0, 0.0, 0.0, 0.3384449, 0.14787383, -0.08111384, 0.32002708, 0.33851552, 0.0048022484, -0.1369224, 0.37011376, 0.25997162, 0.06434332, 0.15082477, 0.2148611, 0.0, 0.0, 0.0, 0.0], "bias": [-0.09206034, 0.14355598, 0.10932139, 0.0016021392]}, "conv2d_1_tf": {"name": "conv2d_1_tf", "type": "conv", "inputs": ["conv2d_tf"], "output": "conv2d_1_tf", "weights": [-0.095783316, 0.16888501, 0.05321395, -0.030030794, -0.08823816, -0.045243666, -0.06268558, 0.21276858, -0.0624856, -0.01006017, 0.0030589101, -0.058050346, -0.10185547, 0.013074036, -0.060340375, -0.059404477, -0.082710035, -0.3164221, -0.14149888, -0.0500287, 0.1165336, -0.24514209, -0.22980696, -0.08769986, -0.12874982, 0.026991324, -0.051623344, -0.09652709, -0.13059464, -0.1155648, -0.15023601, -0.2606064, 0.13881665, 0.06292556, -0.073230885, 0.030548356, -0.1894414, 0.20438747, -0.1020142, 0.038716204, 0.047450725, -0.042745817, -0.009961303, 0.0043113427, -0.103798516, 0.0057283384, 0.025602754, 0.06838202, -0.084471785, 0.1186411, -0.023158437, -0.019586418, 0.14019564, -0.20072576, -0.09657145, -0.03009908, -0.13227277, -0.08167413, -0.036809705, 0.15459986, -0.1175294, -0.0159718, -0.07684084, 0.0029121442, 0.38679013, -0.086696684, 0.040943615, -0.10347326, -0.113701634, -0.16794261, 0.46800423, -0.4380119, -0.063318215, -0.07943689, 0.014833392, 0.09416196, 0.088914625, 0.021966234, -0.0046327873, -0.2657651, -0.22693971, 0.1888593, 0.14114356, -0.052431874, 0.019335985, 0.15687473, 0.14059441, -0.049555086, -0.032860175, 0.03814611, 0.19610809, -0.07544432, 0.19492854, -0.0364603, -0.0852338, 0.0940062, 0.01977914, 0.07460088, 0.00649084, -0.0076678796, -0.042637978, 0.13390307, -0.12892081, 0.1885971, -0.26436746, -0.054088645, -0.05617448, -0.11635425, 0.10515732, 0.070723996, -0.011394824, -0.058781527, 0.036073864, 0.20427327, -0.05082124, -0.07998257, -0.11126785, -0.32909214, 0.16723558, -0.06990673, 0.068846, 0.07962057, -0.09518244, 0.1964481, -0.18227482, 0.0012983003, -0.010337137, 0.059369925, -0.017423645, -0.015004898, -0.12347797, 0.03555082, 0.16950843, 0.3905411, 0.31619287, 0.07669911, 0.06830832, -0.15560928, 0.011061299, -0.0471216, -0.019609185, -0.10293927, -0.0074584717, 0.025274256, 0.0401996, 0.04994626, 0.04033721, -0.031158779, -0.020250803, -0.04343525, 0.008512854, -0.025068643, 0.024087055, 0.14313996, -0.017925745, 0.14695233, 0.17547527, -0.12131518, 0.08256627, 0.024314117, 0.073618114, 0.11204843, 0.029775916, -0.06307828, -0.048083175, 0.17052896, -0.016592458, 0.04766689, 0.264522, -0.07116043, -0.027477346, 0.11058124, 0.26533633, -0.009387501, 0.19483726, 0.059977174, -0.12358764, -0.025961788, 0.04777405, -0.08508629, 0.18727924, -0.02720344, -0.07284181, 0.08025612, -0.012793925, -0.02129287, -0.014057591, -0.10034754, 0.057004917, 0.0037808765, -0.03774303, -0.003233076, -0.017357104, -0.0037230153, -0.006728777, -0.037507925, -0.009744604, 0.07082, -0.03264124, -0.14104879, 0.37448314, 0.12911771, 0.02214634, -0.43490615, 0.12378615, 0.094145015, -0.07473948, 0.0048840935, -0.099796765, 0.05870187, -0.11705587, 0.05676388, 0.023533033, -0.032874126, -0.06726595, 0.012210867, -0.09490625, 0.09094358, -0.10220125, 0.064988695, -0.097893566, -0.023668293, -0.27130198, 0.18235227, 0.07178437, -0.07974578, -0.21608166, 0.13351338, 0.07526229, -0.013628629, 0.20969899, 0.019102097, 0.061184246, -0.077816315, -0.058578897, 0.08472013, -0.09029159, -0.01493887, -0.042308304, 0.03848113, -0.027789878, -0.0044137137, -0.0030754514, -0Line truncated