@luxonis/visualizer-protobuf 2.67.2 → 2.68.1
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/{deserialization.worker-BRNDCptR.js → deserialization.worker--zLKCNB5.js} +67 -8
- package/dist/{index-BhLYvhjo.js → index-6-56hcEh.js} +1 -1
- package/dist/{index-C92x9EiC.js → index-B25oQun6.js} +2 -2
- package/dist/{index-B3cHfrcw.js → index-BCdQdtW5.js} +1 -1
- package/dist/{index-D7JYN_IN.js → index-BOD1lNuW.js} +914 -486
- package/dist/{index-BNMXWFDA.js → index-BR6d3Vau.js} +1 -1
- package/dist/{index-CCsfCpZT.js → index-BRbo2R3_.js} +1 -1
- package/dist/{index-CRTwfb76.js → index-BguswDvx.js} +1 -1
- package/dist/{index-CZkF1YCY.js → index-CWqy3204.js} +1 -1
- package/dist/{index-BuGHi09K.js → index-CYLvsgL5.js} +1 -1
- package/dist/{index-2Ajz1Y1F.js → index-Cay2B7V3.js} +1 -1
- package/dist/{index-CLHPbWo6.js → index-CiGEicGF.js} +38 -25
- package/dist/{index-KDfpYD4q.js → index-CjHYdviO.js} +1 -1
- package/dist/{index-CZ6h7zpz.js → index-CkdQyQ56.js} +1 -1
- package/dist/{index-FM6vEyS1.js → index-DWfIq18N.js} +1 -1
- package/dist/{index-DW9FJFJz.js → index-DXpkVS7w.js} +1 -1
- package/dist/{index-ugbolO1H.js → index-DZF3BDjA.js} +1 -1
- package/dist/{index-HcH5t5Pw.js → index-DuW_6rXO.js} +1 -1
- package/dist/{index-BzAo-6Ol.js → index-ZiR_XG5f.js} +1 -1
- package/dist/{index-CaE-gPi_.js → index-infICipp.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/src/connection/connection.d.ts +3 -1
- package/dist/lib/src/connection/connection.d.ts.map +1 -1
- package/dist/lib/src/connection/connection.js +3 -2
- package/dist/lib/src/connection/connection.js.map +1 -1
- package/dist/lib/src/messaging/deserialization/video/h264.d.ts.map +1 -1
- package/dist/lib/src/messaging/deserialization/video/h264.js +59 -7
- package/dist/lib/src/messaging/deserialization/video/h264.js.map +1 -1
- package/dist/lib/src/messaging/deserialization.worker.js +1 -1
- package/dist/lib/src/messaging/deserialization.worker.js.map +1 -1
- package/dist/lib/src/output.css +1 -1
- package/dist/lib/src/utils/config-store.d.ts +3 -0
- package/dist/lib/src/utils/config-store.d.ts.map +1 -1
- package/dist/lib/src/utils/config-store.js +8 -0
- package/dist/lib/src/utils/config-store.js.map +1 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/ImageMode/ImageMode.d.ts.map +1 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/ImageMode/ImageMode.js +2 -2
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/ImageMode/ImageMode.js.map +1 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/ImageMode/MessageHandler.d.ts +3 -3
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/ImageMode/MessageHandler.d.ts.map +1 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/ImageMode/MessageHandler.js +1 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/ImageMode/MessageHandler.js.map +1 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/ImageMode/MessageHandlerFactory.d.ts +11 -0
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/ImageMode/MessageHandlerFactory.d.ts.map +1 -0
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/ImageMode/MessageHandlerFactory.js +24 -0
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/ImageMode/MessageHandlerFactory.js.map +1 -0
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/ImageMode/MessageHandlerV2.d.ts +94 -0
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/ImageMode/MessageHandlerV2.d.ts.map +1 -0
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/ImageMode/MessageHandlerV2.js +410 -0
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/ImageMode/MessageHandlerV2.js.map +1 -0
- package/package.json +1 -1
|
@@ -759,6 +759,63 @@ function ensureWebCodecsSupported(target) {
|
|
|
759
759
|
// License, v2.0. If a copy of the MPL was not distributed with this
|
|
760
760
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/
|
|
761
761
|
|
|
762
|
+
function bgrxToI420(bgrx, width, height) {
|
|
763
|
+
if ((width & 1) !== 0 || (height & 1) !== 0) {
|
|
764
|
+
throw new Error("I420 requires even width and height.");
|
|
765
|
+
}
|
|
766
|
+
const ySize = width * height;
|
|
767
|
+
const uvSize = width * height >> 2;
|
|
768
|
+
const out = new Uint8Array(ySize + uvSize + uvSize);
|
|
769
|
+
const Y = out.subarray(0, ySize);
|
|
770
|
+
const U = out.subarray(ySize, ySize + uvSize);
|
|
771
|
+
const V = out.subarray(ySize + uvSize);
|
|
772
|
+
const stride = width * 4;
|
|
773
|
+
const clamp8 = x => x < 0 ? 0 : x > 255 ? 255 : x | 0;
|
|
774
|
+
for (let y = 0; y < height; y += 2) {
|
|
775
|
+
const row0 = y * stride;
|
|
776
|
+
const row1 = (y + 1) * stride;
|
|
777
|
+
for (let x = 0; x < width; x += 2) {
|
|
778
|
+
const p00 = row0 + x * 4;
|
|
779
|
+
const p01 = row0 + (x + 1) * 4;
|
|
780
|
+
const p10 = row1 + x * 4;
|
|
781
|
+
const p11 = row1 + (x + 1) * 4;
|
|
782
|
+
const B00 = bgrx[p00 + 0],
|
|
783
|
+
G00 = bgrx[p00 + 1],
|
|
784
|
+
R00 = bgrx[p00 + 2];
|
|
785
|
+
const B01 = bgrx[p01 + 0],
|
|
786
|
+
G01 = bgrx[p01 + 1],
|
|
787
|
+
R01 = bgrx[p01 + 2];
|
|
788
|
+
const B10 = bgrx[p10 + 0],
|
|
789
|
+
G10 = bgrx[p10 + 1],
|
|
790
|
+
R10 = bgrx[p10 + 2];
|
|
791
|
+
const B11 = bgrx[p11 + 0],
|
|
792
|
+
G11 = bgrx[p11 + 1],
|
|
793
|
+
R11 = bgrx[p11 + 2];
|
|
794
|
+
const Y00 = 77 * R00 + 150 * G00 + 29 * B00 + 128 >> 8;
|
|
795
|
+
const Y01 = 77 * R01 + 150 * G01 + 29 * B01 + 128 >> 8;
|
|
796
|
+
const Y10 = 77 * R10 + 150 * G10 + 29 * B10 + 128 >> 8;
|
|
797
|
+
const Y11 = 77 * R11 + 150 * G11 + 29 * B11 + 128 >> 8;
|
|
798
|
+
const yRow0 = y * width + x;
|
|
799
|
+
const yRow1 = (y + 1) * width + x;
|
|
800
|
+
Y[yRow0 + 0] = Y00;
|
|
801
|
+
Y[yRow0 + 1] = Y01;
|
|
802
|
+
Y[yRow1 + 0] = Y10;
|
|
803
|
+
Y[yRow1 + 1] = Y11;
|
|
804
|
+
const Ravg = R00 + R01 + R10 + R11 >> 2;
|
|
805
|
+
const Gavg = G00 + G01 + G10 + G11 >> 2;
|
|
806
|
+
const Bavg = B00 + B01 + B10 + B11 >> 2;
|
|
807
|
+
const Uval = clamp8((-43 * Ravg - 85 * Gavg + 128 * Bavg >> 8) + 128);
|
|
808
|
+
const Vval = clamp8((128 * Ravg - 107 * Gavg - 21 * Bavg >> 8) + 128);
|
|
809
|
+
const uvCol = x >> 1;
|
|
810
|
+
const uvRow = y >> 1;
|
|
811
|
+
const uvW = width >> 1;
|
|
812
|
+
const uvPos = uvRow * uvW + uvCol;
|
|
813
|
+
U[uvPos] = Uval;
|
|
814
|
+
V[uvPos] = Vval;
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
return out;
|
|
818
|
+
}
|
|
762
819
|
function convertNv12ToI420(nv12Buffer, width, height) {
|
|
763
820
|
const ySize = width * height;
|
|
764
821
|
const uvSize = ySize / 4;
|
|
@@ -784,19 +841,21 @@ function createVideoDecoder$1({
|
|
|
784
841
|
}) {
|
|
785
842
|
return new VideoDecoder({
|
|
786
843
|
output: async frame => {
|
|
787
|
-
let finalBuffer;
|
|
788
|
-
let finalEncoding;
|
|
844
|
+
let finalBuffer = new Uint8Array(frame.allocationSize());
|
|
789
845
|
if (frame.format === "I420") {
|
|
790
846
|
finalBuffer = new Uint8Array(frame.allocationSize());
|
|
791
847
|
await frame.copyTo(finalBuffer);
|
|
792
|
-
|
|
793
|
-
} else {
|
|
848
|
+
} else if (frame.format === "NV12") {
|
|
794
849
|
const nv12Buffer = new Uint8Array(frame.allocationSize());
|
|
795
850
|
await frame.copyTo(nv12Buffer);
|
|
796
851
|
finalBuffer = convertNv12ToI420(nv12Buffer, frame.codedWidth, frame.codedHeight);
|
|
797
|
-
|
|
852
|
+
} else if (frame.format === "RGBX") {
|
|
853
|
+
const bgrxBuffer = new Uint8Array(frame.allocationSize());
|
|
854
|
+
await frame.copyTo(bgrxBuffer);
|
|
855
|
+
console.warn("PointCloud decoder received RGBX frame.");
|
|
856
|
+
finalBuffer = bgrxToI420(bgrxBuffer, frame.codedWidth, frame.codedHeight);
|
|
798
857
|
}
|
|
799
|
-
if (frame.format !== 'I420' && frame.format !== 'NV12') {
|
|
858
|
+
if (frame.format !== 'I420' && frame.format !== 'NV12' && frame.format !== 'RGBX') {
|
|
800
859
|
console.warn("PointCloud decoder received unexpected frame format:", frame.format);
|
|
801
860
|
}
|
|
802
861
|
const receiveTime = topicDecoders.get(topic)?.timing.get(frame.timestamp) ?? dist.fromMicros(frame.timestamp);
|
|
@@ -806,7 +865,7 @@ function createVideoDecoder$1({
|
|
|
806
865
|
width: frame.displayWidth,
|
|
807
866
|
height: frame.displayHeight,
|
|
808
867
|
data: finalBuffer,
|
|
809
|
-
encoding:
|
|
868
|
+
encoding: "yuv420p",
|
|
810
869
|
step: frame.displayWidth
|
|
811
870
|
};
|
|
812
871
|
callback({
|
|
@@ -1146,7 +1205,7 @@ async function deserializeDepthAiMessage(args) {
|
|
|
1146
1205
|
message,
|
|
1147
1206
|
callback
|
|
1148
1207
|
});
|
|
1149
|
-
|
|
1208
|
+
void deserializeDepthFrame({
|
|
1150
1209
|
topic,
|
|
1151
1210
|
message,
|
|
1152
1211
|
callback,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Y as styleTags, Z as tags, ak as javascriptLanguage, $ as LRLanguage, a0 as LanguageSupport, a2 as LRParser, ah as html, ai as parseMixed, a1 as ExternalTokenizer } from './index-
|
|
1
|
+
import { Y as styleTags, Z as tags, ak as javascriptLanguage, $ as LRLanguage, a0 as LanguageSupport, a2 as LRParser, ah as html, ai as parseMixed, a1 as ExternalTokenizer } from './index-CiGEicGF.js';
|
|
2
2
|
import './depth-CFY2W_Vf.js';
|
|
3
3
|
import './comlink-CsH1ih07.js';
|
|
4
4
|
import 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ImagePanel } from './index-
|
|
1
|
+
import { ImagePanel } from './index-BOD1lNuW.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'react-dom';
|
|
4
4
|
import './depth-CFY2W_Vf.js';
|
|
@@ -9,7 +9,7 @@ import './protobuf-BFCtaU7c.js';
|
|
|
9
9
|
import 'protobufjs/minimal';
|
|
10
10
|
import '@mui/material';
|
|
11
11
|
import './isArrayLikeObject-Bytw9p-q.js';
|
|
12
|
-
import './index-
|
|
12
|
+
import './index-CiGEicGF.js';
|
|
13
13
|
import './utils-Hzt3wxhG.js';
|
|
14
14
|
import './FoxgloveServer-h5m-pXp3.js';
|
|
15
15
|
import 'ms';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a1 as ExternalTokenizer, a9 as ContextTracker, Y as styleTags, Z as tags, a2 as LRParser, aa as LocalTokenGroup, ab as snippetCompletion, a5 as syntaxTree, $ as LRLanguage, U as indentNodeProp, V as continuedIndent, a6 as flatIndent, a7 as delimitedIndent, X as foldNodeProp, a8 as foldInside, a0 as LanguageSupport, a3 as ifNotIn, a4 as completeFromList, ac as IterMode, ad as NodeWeakMap } from './index-
|
|
1
|
+
import { a1 as ExternalTokenizer, a9 as ContextTracker, Y as styleTags, Z as tags, a2 as LRParser, aa as LocalTokenGroup, ab as snippetCompletion, a5 as syntaxTree, $ as LRLanguage, U as indentNodeProp, V as continuedIndent, a6 as flatIndent, a7 as delimitedIndent, X as foldNodeProp, a8 as foldInside, a0 as LanguageSupport, a3 as ifNotIn, a4 as completeFromList, ac as IterMode, ad as NodeWeakMap } from './index-CiGEicGF.js';
|
|
2
2
|
import './depth-CFY2W_Vf.js';
|
|
3
3
|
import './comlink-CsH1ih07.js';
|
|
4
4
|
import 'react';
|