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.0022612927, 0.056973718, -0.018455653, 0.14739583, -0.122750364, 0.23741247, 0.15598795, 0.05692804, 0.18175821, 0.13481095, -0.08827108, 0.05554242, 0.0, 0.0, 0.0, 0.0, 0.04206811, 0.23834495, 0.13003352, -0.077002496, 0.17685443, -0.20654015, 0.06842113, 0.2903542, -0.26250055, 0.13811174, 0.26133212, -0.02114791, 0.0, 0.0, 0.0, 0.0, 0.093419984, -0.07030613, 0.29529554, -0.04851454, -0.18972242, 0.14136502, -0.04747689, -0.06364426, 0.22331561, -0.10553665, 0.16183273, 0.05455794, 0.0, 0.0, 0.0, 0.0, 0.24077286, 0.23530032, -0.058636595, -0.37148198, -0.06763021, 0.3874437, 0.15182178, -0.5923735, -0.13545403, 0.15376179, 0.21833488, -0.2147259, 0.0, 0.0, 0.0, 0.0, -0.2060378, 0.20107107, -0.57699513, 0.17214543, 0.26857927, 0.21768239, -0.54763824, 0.022310967, 0.24290903, 0.0074973702, -0.73197544, 0.16953811, 0.0, 0.0, 0.0, 0.0, -0.53420544, -0.09096746, -0.25905782, 0.13050057, -0.21312474, -0.046465185, -0.19382372, -0.079869874, -0.48216957, 0.036481928, -0.2352641, -0.059043337, 0.0, 0.0, 0.0, 0.0, -0.030450007, -0.10884538, 0.18111393, -0.1775848, 0.27219498, -0.09239544, -0.026854752, -0.14357966, -0.1850866, 0.1308016, 0.028251573, -0.21514907, 0.0, 0.0, 0.0, 0.0, -0.10568889, 0.15597937, 0.27339727, 0.0804553, 0.04280254, -0.08279245, 0.20513073, 0.055260282, 0.31278867, -0.24821152, 0.29145843, 0.10567111, 0.0, 0.0, 0.0, 0.0, 0.25927135, -0.16821514, 0.005973275, -0.11551916, -0.49868804, 0.103718266, 0.1801412, 0.06371136, -0.06251711, 0.058491655, 0.08287211, -0.04250653, 0.0, 0.0, 0.0, 0.0], "bias": [0.42747816, -0.50199944, -0.008679179, 0.002979711]}, "conv2d_1_tf": {"name": "conv2d_1_tf", "type": "conv", "inputs": ["conv2d_tf"], "output": "conv2d_1_tf", "weights": [0.14501162, 0.08745608, 0.047154814, 0.11138436, -0.030867573, -0.0009166872, 0.055052515, -0.12617113, -0.104578145, 0.0068466533, 0.013762538, 0.111968696, 0.07529147, 0.006874992, 0.15803319, 0.19343081, 0.10959786, -0.057358194, 0.061577655, -0.008993094, 0.048110843, -0.0864788, 0.01113672, -0.22644496, -0.12960532, 0.030239241, -0.08421794, -0.13423525, -0.07145387, 0.044097863, 0.009972901, 0.04685787, -0.023261277, 0.03164763, 0.028907845, -0.0102096815, 0.1474105, -0.03114013, 0.15159902, -0.086211964, 0.04718239, 0.0018872966, 0.03155034, 0.028671373, 0.08148231, 0.17568494, 0.047075186, 0.34778616, 0.036335807, -0.094797246, -0.4159549, 0.24694933, 0.24209529, -0.07121227, 0.1532561, 0.3843501, -0.07694775, 0.19775048, -0.32267457, -0.09720791, 0.020951513, -0.09151028, 0.3170201, 0.1605608, -0.07707157, 0.043557756, 0.05671068, -0.01463445, -0.26492572, 0.18719704, -0.095243685, 0.4080296, 0.41637594, 0.11404859, -0.033315994, 0.066214, 0.021033298, 0.18487465, -0.18571156, -0.54635674, 0.068084195, -0.096393734, 0.0035257551, 0.012287477, -0.07196971, 0.025817184, -0.07986198, 0.07784954, -0.16452111, 0.031261202, 0.023056887, -0.0522975, -0.009634468, -0.31535807, -0.12919909, 0.033792194, 0.10813535, -0.05337902, 0.06076626, 0.07202521, 0.09736061, -0.08541826, -0.027104156, 0.10542381, -0.005607362, -0.11555167, 0.14021239, 0.18931355, -0.017547207, -0.108811274, -0.03125718, 0.14564131, -0.1093017, 0.013502633, 0.018116413, 0.018391598, -0.18378423, -0.401403, 0.012552945, 0.15719055, -0.0228895, 0.02655741, -0.043465126, -0.044321306, 0.23494045, -0.15205893, 0.18678686, 0.3955797, -0.02278326, 0.039361916, 0.011373453, 0.013933539, 0.11071886, 0.11702748, -0.12705022, 0.19540352, -0.07263767, 0.041922275, 0.009229501, 0.024164628, 0.10296556, 0.16725765, -0.0818962, -0.0047961213, 0.29457232, 0.13599043, -0.008714703, -0.16847761, 0.040908597, -0.04422869, 0.011877597, 0.075768694, 0.14954948, 0.040835135, 0.0846475, -0.22214502, -0.056186993, 0.0638945, -0.0042281435, -0.23239982, -0.06668496, 0.1756623, 0.007815604, -0.25763178, -0.04470249, 0.06488682, 0.028682206, 0.16186592, -0.011941624, -0.06400568, 0.10282864, 0.039630037, 0.19423516, -0.031500183, 0.106168106, 0.036937393, 0.09141408, -0.010553094, 0.1342473, -0.043508966, -0.17903467, 0.08791904, -0.036400225, 0.028037839, -0.029616812, -0.026422223, -0.022944598, -0.010333497, -0.031189896, 0.03240508, -0.0785576, 0.015098909, -0.041526146, 0.26786005, -0.46808454, -0.22427405, -0.22540379, 0.1254596, 0.08504417, -0.4350252, 0.008509114, -0.11203634, -0.26448494, 0.08993352, -0.06692775, 0.0062625394, -0.1925751, -0.19362088, 0.018179841, -0.05096496, 0.0597967, -0.05776889, 0.035965182, -0.065931715, -0.37168455, -0.10637159, -0.23258503, 0.09219399, 0.12451923, -0.04139515, 0.11661162, -0.40143165, -0.19453132, 0.16580793, -0.12704377, -0.058811054, -0.030635664, 0.040619805, 0.18785484, 0.019730633, 0.0033181638, 0.03790057, 0.073501006, 0.006731647, 0.028191924, -0.010616595, -0.29848912, 0.10158166, 0.059347004, 0.0060802675, -0.15607527, 0.13109104, 0.11584357, -0.20041798, -0.08759147,Line truncated