diff --git a/src/ext/lib/Settings.js b/src/ext/lib/Settings.js index f95a8fd..171a31c 100644 --- a/src/ext/lib/Settings.js +++ b/src/ext/lib/Settings.js @@ -279,17 +279,17 @@ class Settings { try{ // if site is not defined, we use default mode: if (! this.active.sites[site]) { - return this.active.sites['@global'] === ExtensionMode.Enabled; + return this.active.sites['@global'].mode === ExtensionMode.Enabled; } - if(this.active.sites['@global'] === ExtensionMode.Enabled) { + if(this.active.sites['@global'].mode === ExtensionMode.Enabled) { return this.active.sites[site].mode !== ExtensionMode.Disabled; - } else if (this.active.sites['@global'] === ExtensionMode.Whitelist) { + } else if (this.active.sites['@global'].mode === ExtensionMode.Whitelist) { return this.active.sites[site].mode === ExtensionMode.Enabled; } else { return false; } - }catch(e){ + } catch(e){ if(Debug.debug){ console.log("[Settings.js::canStartExtension] Something went wrong — are settings defined/has init() been called?\nSettings object:", this) } diff --git a/src/ext/lib/ar-detect/ArDetector.js b/src/ext/lib/ar-detect/ArDetector.js index e9358cf..be59502 100644 --- a/src/ext/lib/ar-detect/ArDetector.js +++ b/src/ext/lib/ar-detect/ArDetector.js @@ -611,7 +611,9 @@ class ArDetector { } return; } else { - console.log("%c[ArDetect::frameCheck] Black frame analysis suggests this frame is not completely black. Doing further analysis,", "color: #3fa", bfanalysis); + // if (Debug.debug && Debug.arDetect) { + // console.log("%c[ArDetect::frameCheck] Black frame analysis suggests this frame is not completely black. Doing further analysis,", "color: #3fa", bfanalysis); + // } } diff --git a/src/options/AutodetectionSettings.vue b/src/options/AutodetectionSettings.vue index 55121bf..86f7c02 100644 --- a/src/options/AutodetectionSettings.vue +++ b/src/options/AutodetectionSettings.vue @@ -2,27 +2,29 @@

Quick settings

-
+
How often should autodetection check for changes?
Shorter intervals (left side of the slider) are more responsive to changes in aspect ratio detections, - but requires more system resources. + but requires more system resources. Slider is logarithmic.
+ More often (~60/s) + /> +   Less often (~1/10s)
-
+
How sensitive should aspect ratio detection be?
@@ -56,13 +58,13 @@ />
-

Autodetection settings in detail

-
+

Autodetection settings in detail

+
Autodetection frequency
@@ -72,6 +74,13 @@ Delays are given in milliseconds.
+
Note that tick rate must be smaller than check frequency. + +
+
@@ -118,11 +127,7 @@
-
Setting values under 100 milliseconds will have no effect unless you also reduce the tickrate. - Show advanced options -
+
Fallback mode
@@ -256,7 +261,7 @@ higher values —> detection is more forgiving to videos with less-than-ideal contrast ratios.
Threshold: If pixel is darker than the sum of black level and this value, it's considered black. In theory, lower -> better. In practice, this value needs to be kept surprisingly high (8 might not be high enough), otherwise compression artifacts in videos - start having an adverse effect on quality of automatic detection. + start having an adverse effect on quality of automatic detection.
Gradient detection: Attempt to discriminate between hard edges and gradients. 'Strict' and 'Lax' prevent aspect ratio changes if we detected gradients instead of a legit edge. This results in fewer false positives, but may cause aspect ratio detection to not work on darker frames.
@@ -293,7 +298,11 @@ Gradient detection:
- TODO: insert select here +
@@ -334,7 +343,13 @@ Black frame detection is a quick test that tries to determine whether we're looking at a black frame. This test prevents us from wasting precious time trying to detect aspect ratio on frames that are too dark for reliable aspect ratio detection.
Sample width, height: Sample size. Since we're checking every pixel in this sample, dimensions should be kept small.
- Cumulative threshold: If we add the maximum of red, green, blue values of every pixel in the sample and they total more than this, the frame is bright enough.
+ Color variance treshold: In videos (such as movie trailers), any text that appears on the black background is usually of + a roughly the same color, while dark movie footage is not. This allows us to trigger autodetection on dark movie footage and + to not trigger autodetection when movie trailer flashes some text on black background. If color variance is greater than this value, + blackframe detection will use 'lax' (lower) cummulative threshold to determine whether the frame is black or not. If color variance + is less than this value, 'strict' (higher) cummulative threshold will be used to determine whether the frame is black or not instead.
+ Cumulative threshold: If we add the maximum of red, green, blue values of every pixel in the sample and they total more than this, the frame is bright enough. + Comes in 'lax' and 'strict' versions. See 'color variance threshold' description for details about 'lax' and 'strict.'
Black pixel threshold: If more than this fraction of pixels from the sample are "black", we consider the frame black. This overrules cumulative threshold.
@@ -360,11 +375,31 @@
- Cumulative threshold: + Color variance treshold:
+
+
+
+
+ Cumulative threshold (lax mode): +
+
+ +
+
+
+
+ Cumulative threshold (strict mode): +
+
+
@@ -450,7 +485,7 @@
@@ -559,7 +594,7 @@ export default { props: ['settings'], data() { return { - showAdvancedOptions: false, + showAdvancedOptions: true, fallbackModeAvailable: false, sensitivity: 'sensitive', }