diff --git a/src/scripts/libs/bar-detection.js b/src/scripts/libs/bar-detection.js index cca97fa..91b6847 100644 --- a/src/scripts/libs/bar-detection.js +++ b/src/scripts/libs/bar-detection.js @@ -799,7 +799,8 @@ const workerCode = function () { xOffset ) => { const partSizeBorderMultiplier = - allowedAnomaliesPercentage > 20 ? 0.6 : 0.1; + -0.1 + (2 * allowedAnomaliesPercentage) / 100; + // .1 .6 .6 .6 // xOffset = partSizeBorderMultiplier ? xOffset * .5 : xOffset const partSize = Math.floor( @@ -953,6 +954,9 @@ const workerCode = function () { // // https://www.youtube.com/watch?v=64FVUoGCxWw // // https://www.youtube.com/watch?v=37-6GeQg2xY + // Bars keep cropping long texts in the next 4 graphs (because the white space between text and orange/red bar is not seen as different?) + // https://youtu.be/CIQe2jdYAJ0?si=yFWu2SD5eVRSG9CB&t=366 + // console.log(JSON.stringify(topEdges), JSON.stringify(bottomEdges)) // console.log(topEdges, bottomEdges) @@ -1274,7 +1278,7 @@ export default class BarDetection { if (!this.worker) { this.worker = workerFromCode(workerCode); this.worker.onmessage = (e) => { - if(this.onWorkerMessageListener) { + if (this.onWorkerMessageListener) { return this.onWorkerMessageListener(e); } if (e.data.id !== -1) { @@ -1286,11 +1290,11 @@ export default class BarDetection { } }; this.worker.onerror = (err) => { - if(this.onWorkerRejectListener) { + if (this.onWorkerRejectListener) { return this.onWorkerRejectListener(err); } SentryReporter.captureException(err); - } + }; } // Ignore previous percentages in cases: new video src, seeked or setting changed diff --git a/src/scripts/libs/canvas-webgl.js b/src/scripts/libs/canvas-webgl.js index 39e0cb6..1eb6748 100644 --- a/src/scripts/libs/canvas-webgl.js +++ b/src/scripts/libs/canvas-webgl.js @@ -159,7 +159,7 @@ export class WebGLContext { if (!this.ctx) { this.ctxOptions = { failIfMajorPerformanceCaveat: false, - preserveDrawingBuffer: false, + preserveDrawingBuffer: false, // Allows the browser to swap the visible- and drawbuffers, which is faster // alpha: false, // Decreases performance on some platforms depth: false, antialias: false, diff --git a/src/scripts/libs/projector-webgl.js b/src/scripts/libs/projector-webgl.js index f91ade6..8adde93 100644 --- a/src/scripts/libs/projector-webgl.js +++ b/src/scripts/libs/projector-webgl.js @@ -515,7 +515,7 @@ export default class ProjectorWebGL { if (!this.ctx) { this.ctxOptions = { failIfMajorPerformanceCaveat: true, - preserveDrawingBuffer: false, + preserveDrawingBuffer: false, // Allows the browser to swap the visible- and drawbuffers, which is faster premultipliedAlpha: false, alpha: true, depth: false, diff --git a/src/scripts/libs/settings-config.js b/src/scripts/libs/settings-config.js index c8b6dc6..3edddbe 100644 --- a/src/scripts/libs/settings-config.js +++ b/src/scripts/libs/settings-config.js @@ -470,14 +470,14 @@ Click on the questionmark for more and updated information about these artifacts label: 'Detection: Certainty threshold', questionMark: { title: - 'At 10% only full sized bars are removed.\nA higher percentage can also remove bars with squared elements in the corners \nor crop to a squared element in the center.', + 'At 10% only clear bars are removed.\nA higher percentage can also remove bars with some elements.\nAnd an even higher percentage can crop to a squared element in the center.', }, type: 'list', - default: 30, + default: 20, min: 10, max: 90, step: 10, - advanced: true, + // advanced: true, }, { name: 'barSizeDetectionAllowedUnevenBarsPercentage',