@luxonis/visualizer-protobuf 2.40.0 → 2.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{WorkerImageDecoder.worker-C3ZBQ2Wk.js → WorkerImageDecoder.worker-B8iTthbG.js} +1 -1
- package/dist/{decodeImage-CxUhz2gE.js → decodeImage-DAWmFdMI.js} +56 -0
- package/dist/{index-BVjYgfIS.js → index-BAB9s-Jt.js} +1 -1
- package/dist/{index-DIvlB71Y.js → index-BHVgUIM3.js} +1 -1
- package/dist/{index-9Tyh0kLM.js → index-BQ-3rJO1.js} +1 -1
- package/dist/{index-B6HlbGsq.js → index-BSazwR59.js} +1 -1
- package/dist/{index-xjxIYb7x.js → index-BYGgot6i.js} +129 -49
- package/dist/{index-BXw9XAtq.js → index-BaQ1pmPM.js} +1 -1
- package/dist/{index-MXZP0RG4.js → index-Bi_aBbAG.js} +1 -1
- package/dist/{index-ok4WDE4X.js → index-Bto9_z-v.js} +3 -3
- package/dist/{index-BF8y50SS.js → index-C0l7I-RJ.js} +3 -3
- package/dist/{index-DMwj27wf.js → index-C58xxwlH.js} +1 -1
- package/dist/{index--iQfQ_BM.js → index-Ca4pdvW8.js} +1 -1
- package/dist/{index-DKBjhfFf.js → index-CvP32rZ8.js} +1 -1
- package/dist/{index-DarWKW89.js → index-DqD6uRat.js} +1 -1
- package/dist/{index-Zf_aqI9D.js → index-MRPHqkzS.js} +1 -1
- package/dist/{index-CVcETMbV.js → index-RgUNvXXb.js} +1 -1
- package/dist/{index-DGOR7UPX.js → index-UJOLOo0U.js} +1 -1
- package/dist/{index-DCAb3slV.js → index-VC3yg0lD.js} +1 -1
- package/dist/{index-CGKMb8B_.js → index-Vz6cVDT2.js} +1 -1
- package/dist/{index-CphhTBOZ.js → index-wzHkwYbj.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/src/components/Panel.d.ts.map +1 -1
- package/dist/lib/src/components/Panel.js +1 -1
- package/dist/lib/src/components/Panel.js.map +1 -1
- package/dist/lib/src/components/PanelToolbar.d.ts +1 -0
- package/dist/lib/src/components/PanelToolbar.d.ts.map +1 -1
- package/dist/lib/src/components/PanelToolbar.js +25 -15
- package/dist/lib/src/components/PanelToolbar.js.map +1 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/Images/decodeImage.d.ts.map +1 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/Images/decodeImage.js +4 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/Images/decodeImage.js.map +1 -1
- package/package.json +1 -1
|
@@ -406,6 +406,59 @@ const decodeBayerRGGB8 = makeSpecializedDecodeBayer("r", "g0", "g1", "b");
|
|
|
406
406
|
const decodeBayerBGGR8 = makeSpecializedDecodeBayer("b", "g0", "g1", "r");
|
|
407
407
|
const decodeBayerGBRG8 = makeSpecializedDecodeBayer("g0", "b", "r", "g1");
|
|
408
408
|
const decodeBayerGRBG8 = makeSpecializedDecodeBayer("g0", "r", "b", "g1");
|
|
409
|
+
function decodeYUV420p(yuvData, width, height, _step, output, _yStride,
|
|
410
|
+
// Optional Y plane stride
|
|
411
|
+
_uvStride,
|
|
412
|
+
// Optional UV plane stride
|
|
413
|
+
_uPlaneOffset,
|
|
414
|
+
// Optional offset where the U plane starts
|
|
415
|
+
_vPlaneOffset // Optional offset where the V plane starts
|
|
416
|
+
) {
|
|
417
|
+
// Calculate strides and offsets if not provided
|
|
418
|
+
const yStride = width;
|
|
419
|
+
const uvStride = width >> 1; // UV planes are half the width
|
|
420
|
+
|
|
421
|
+
// Calculate plane offsets if not provided
|
|
422
|
+
const yPlaneSize = yStride * height;
|
|
423
|
+
const uPlaneOffset = yPlaneSize;
|
|
424
|
+
const uvPlaneSize = uvStride * (height >> 1); // UV planes are half the height
|
|
425
|
+
const vPlaneOffset = uPlaneOffset + uvPlaneSize;
|
|
426
|
+
for (let y = 0; y < height; y++) {
|
|
427
|
+
for (let x = 0; x < width; x++) {
|
|
428
|
+
// Get Y value
|
|
429
|
+
const yIndex = y * yStride + x;
|
|
430
|
+
const yValue = Number(yuvData[yIndex]) - 16;
|
|
431
|
+
|
|
432
|
+
// Calculate the corresponding position in the UV planes
|
|
433
|
+
const uvX = x >> 1;
|
|
434
|
+
const uvY = y >> 1;
|
|
435
|
+
const uIndex = uPlaneOffset + uvY * uvStride + uvX;
|
|
436
|
+
const vIndex = vPlaneOffset + uvY * uvStride + uvX;
|
|
437
|
+
|
|
438
|
+
// Get U and V values
|
|
439
|
+
const uValue = Number(yuvData[uIndex]) - 128;
|
|
440
|
+
const vValue = Number(yuvData[vIndex]) - 128;
|
|
441
|
+
|
|
442
|
+
// Convert YUV to RGB using the standard BT.601 conversion
|
|
443
|
+
// These are similar coefficients to those used in other decoders
|
|
444
|
+
let r = yValue + 1.402 * vValue;
|
|
445
|
+
let g = yValue - 0.344 * uValue - 0.714 * vValue;
|
|
446
|
+
let b = yValue + 1.772 * uValue;
|
|
447
|
+
|
|
448
|
+
// Clamp RGB values to [0, 255]
|
|
449
|
+
r = Math.min(Math.max(r, 0), 255);
|
|
450
|
+
g = Math.min(Math.max(g, 0), 255);
|
|
451
|
+
b = Math.min(Math.max(b, 0), 255);
|
|
452
|
+
|
|
453
|
+
// Write to output buffer (RGBA format)
|
|
454
|
+
const outIndex = (y * width + x) * 4;
|
|
455
|
+
output[outIndex] = r;
|
|
456
|
+
output[outIndex + 1] = g;
|
|
457
|
+
output[outIndex + 2] = b;
|
|
458
|
+
output[outIndex + 3] = 255; // Full opacity
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
}
|
|
409
462
|
|
|
410
463
|
/**
|
|
411
464
|
* @license
|
|
@@ -52861,6 +52914,9 @@ async function decodeRawImage(image, options, output) {
|
|
|
52861
52914
|
case "yuyv":
|
|
52862
52915
|
decodeYUYV(image.data, width, height, step, output);
|
|
52863
52916
|
break;
|
|
52917
|
+
case "yuv420p":
|
|
52918
|
+
decodeYUV420p(image.data, width, height, step, output);
|
|
52919
|
+
break;
|
|
52864
52920
|
case "rgb8":
|
|
52865
52921
|
decodeRGB8(image.data, width, height, step, output);
|
|
52866
52922
|
break;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O as styleTags, Q as tags, T as LRLanguage, U as LanguageSupport, X as LRParser, a4 as LocalTokenGroup, ab as html, ac as parseMixed, ae as javascriptLanguage } from './index-
|
|
1
|
+
import { O as styleTags, Q as tags, T as LRLanguage, U as LanguageSupport, X as LRParser, a4 as LocalTokenGroup, ab as html, ac as parseMixed, ae as javascriptLanguage } from './index-BYGgot6i.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a3 as ContextTracker, V as ExternalTokenizer, O as styleTags, Q as tags, X as LRParser, T as LRLanguage, K as indentNodeProp, N as foldNodeProp, ad as bracketMatchingHandle, U as LanguageSupport, a9 as EditorView, $ as syntaxTree, aa as EditorSelection } from './index-
|
|
1
|
+
import { a3 as ContextTracker, V as ExternalTokenizer, O as styleTags, Q as tags, X as LRParser, T as LRLanguage, K as indentNodeProp, N as foldNodeProp, ad as bracketMatchingHandle, U as LanguageSupport, a9 as EditorView, $ as syntaxTree, aa as EditorSelection } from './index-BYGgot6i.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as ExternalTokenizer, a3 as ContextTracker, O as styleTags, Q as tags, X as LRParser, $ as syntaxTree, Y as ifNotIn, T as LRLanguage, K as indentNodeProp, a1 as delimitedIndent, N as foldNodeProp, a2 as foldInside, U as LanguageSupport, a6 as IterMode, Z as completeFromList, a7 as NodeWeakMap, a5 as snippetCompletion } from './index-
|
|
1
|
+
import { V as ExternalTokenizer, a3 as ContextTracker, O as styleTags, Q as tags, X as LRParser, $ as syntaxTree, Y as ifNotIn, T as LRLanguage, K as indentNodeProp, a1 as delimitedIndent, N as foldNodeProp, a2 as foldInside, U as LanguageSupport, a6 as IterMode, Z as completeFromList, a7 as NodeWeakMap, a5 as snippetCompletion } from './index-BYGgot6i.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O as styleTags, Q as tags, X as LRParser, T as LRLanguage, K as indentNodeProp, M as continuedIndent, a0 as flatIndent, a1 as delimitedIndent, N as foldNodeProp, a2 as foldInside, U as LanguageSupport } from './index-
|
|
1
|
+
import { O as styleTags, Q as tags, X as LRParser, T as LRLanguage, K as indentNodeProp, M as continuedIndent, a0 as flatIndent, a1 as delimitedIndent, N as foldNodeProp, a2 as foldInside, U as LanguageSupport } from './index-BYGgot6i.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|