106 lines
2.7 KiB
JavaScript
106 lines
2.7 KiB
JavaScript
// Metro module 4818 (f4819).
|
|
import Module4819 from "./Module4819";
|
|
export default {
|
|
read: function read(a0, a1) {
|
|
const shortAt = Module4819.getShortAt(a0, a1);
|
|
const r8 = 8 > shortAt;
|
|
let r12 = void 0;
|
|
if (!r8) {
|
|
const byteAt = Module4819.getByteAt(a0, a1 + 7);
|
|
r12 = {
|
|
value: byteAt,
|
|
description: "" + byteAt
|
|
};
|
|
}
|
|
const r32 = 3 > shortAt;
|
|
let r33 = void 0;
|
|
if (!r32) {
|
|
const byteAt2 = Module4819.getByteAt(a0, a1 + 2);
|
|
r33 = {
|
|
value: byteAt2,
|
|
description: "" + byteAt2
|
|
};
|
|
}
|
|
const r43 = 5 > shortAt;
|
|
let r44 = void 0;
|
|
if (!r43) {
|
|
const shortAt2 = Module4819.getShortAt(a0, a1 + 3);
|
|
r44 = {
|
|
value: shortAt2,
|
|
description: `${shortAt2}px`
|
|
};
|
|
}
|
|
const r54 = 7 > shortAt;
|
|
let r55 = void 0;
|
|
if (!r54) {
|
|
const shortAt3 = Module4819.getShortAt(a0, a1 + 5);
|
|
r55 = {
|
|
value: shortAt3,
|
|
description: `${shortAt3}px`
|
|
};
|
|
}
|
|
let Subsampling = r12;
|
|
if (Subsampling) {
|
|
const value = r12.value;
|
|
const r72 = 8 + 3 * value > shortAt;
|
|
let r73 = void 0;
|
|
if (!r72) {
|
|
const value2 = [];
|
|
const r76 = 0 < value;
|
|
let r0 = 0;
|
|
if (r76) {
|
|
do {
|
|
const r79 = a1 + 8 + 3 * r0;
|
|
value2.push([Module4819.getByteAt(a0, r79), Module4819.getByteAt(a0, r79 + 1), Module4819.getByteAt(a0, r79 + 2)]);
|
|
r0 = r0 + 1;
|
|
} while (r0 < value);
|
|
}
|
|
const r99 = value2.length > 1;
|
|
let description = "";
|
|
if (r99) {
|
|
let c14446_0 = {
|
|
1: "Y",
|
|
2: "Cb",
|
|
3: "Cr",
|
|
4: "I",
|
|
5: "Q"
|
|
};
|
|
const r108 = value2.map((item) => c14446_0[item[0]]).join("");
|
|
const length = value2.length;
|
|
let r110 = "";
|
|
if (length !== 0) {
|
|
const r112 = value2[0][1];
|
|
r110 = "";
|
|
if (r112 !== void 0) {
|
|
const r113 = {
|
|
17: "4:4:4 (1 1)",
|
|
18: "4:4:0 (1 2)",
|
|
20: "4:4:1 (1 4)",
|
|
33: "4:2:2 (2 1)",
|
|
34: "4:2:0 (2 2)",
|
|
36: "4:2:1 (2 4)",
|
|
65: "4:1:1 (4 1)",
|
|
66: "4:1:0 (4 2)"
|
|
};
|
|
r110 = r113[value2[0][1]] !== void 0 ? r113[value2[0][1]] : "";
|
|
}
|
|
}
|
|
description = r108 + r110;
|
|
}
|
|
r73 = {
|
|
value: value2,
|
|
description
|
|
};
|
|
}
|
|
Subsampling = r73;
|
|
}
|
|
return {
|
|
"Bits Per Sample": r33,
|
|
"Image Height": r44,
|
|
"Image Width": r55,
|
|
"Color Components": r12,
|
|
Subsampling
|
|
};
|
|
}
|
|
};
|