@yume-chan/media-codec 3.0.0-beta.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/LICENSE +21 -0
- package/README.md +3 -0
- package/esm/av1.d.ts +470 -0
- package/esm/av1.d.ts.map +1 -0
- package/esm/av1.js +666 -0
- package/esm/av1.js.map +1 -0
- package/esm/format.d.ts +4 -0
- package/esm/format.d.ts.map +1 -0
- package/esm/format.js +44 -0
- package/esm/format.js.map +1 -0
- package/esm/h264.d.ts +47 -0
- package/esm/h264.d.ts.map +1 -0
- package/esm/h264.js +240 -0
- package/esm/h264.js.map +1 -0
- package/esm/h265.d.ts +501 -0
- package/esm/h265.d.ts.map +1 -0
- package/esm/h265.js +1095 -0
- package/esm/h265.js.map +1 -0
- package/esm/index.d.ts +6 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +6 -0
- package/esm/index.js.map +1 -0
- package/esm/nalu.d.ts +28 -0
- package/esm/nalu.d.ts.map +1 -0
- package/esm/nalu.js +250 -0
- package/esm/nalu.js.map +1 -0
- package/package.json +43 -0
- package/src/av1.ts +782 -0
- package/src/format.ts +53 -0
- package/src/h264.ts +306 -0
- package/src/h265.ts +1393 -0
- package/src/index.ts +5 -0
- package/src/nalu.ts +304 -0
- package/tsconfig.build.json +3 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020-2026 Simon Chan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
package/esm/av1.d.ts
ADDED
|
@@ -0,0 +1,470 @@
|
|
|
1
|
+
export declare const AndroidAv1Profile: {
|
|
2
|
+
Main8: number;
|
|
3
|
+
Main10: number;
|
|
4
|
+
Main10Hdr10: number;
|
|
5
|
+
Main10Hdr10Plus: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const AndroidAv1Level: {
|
|
8
|
+
Level2: number;
|
|
9
|
+
Level21: number;
|
|
10
|
+
Level22: number;
|
|
11
|
+
Level23: number;
|
|
12
|
+
Level3: number;
|
|
13
|
+
Level31: number;
|
|
14
|
+
Level32: number;
|
|
15
|
+
Level33: number;
|
|
16
|
+
Level4: number;
|
|
17
|
+
Level41: number;
|
|
18
|
+
Level42: number;
|
|
19
|
+
Level43: number;
|
|
20
|
+
Level5: number;
|
|
21
|
+
Level51: number;
|
|
22
|
+
Level52: number;
|
|
23
|
+
Level53: number;
|
|
24
|
+
Level6: number;
|
|
25
|
+
Level61: number;
|
|
26
|
+
Level62: number;
|
|
27
|
+
Level63: number;
|
|
28
|
+
Level7: number;
|
|
29
|
+
Level71: number;
|
|
30
|
+
Level72: number;
|
|
31
|
+
Level73: number;
|
|
32
|
+
};
|
|
33
|
+
declare class BitReader {
|
|
34
|
+
#private;
|
|
35
|
+
get byteAligned(): boolean;
|
|
36
|
+
get ended(): boolean;
|
|
37
|
+
constructor(data: Uint8Array);
|
|
38
|
+
f1(): number;
|
|
39
|
+
f(n: number): number;
|
|
40
|
+
skip(n: number): void;
|
|
41
|
+
readBytes(n: number): Uint8Array<ArrayBufferLike>;
|
|
42
|
+
getPosition(): readonly [number, number];
|
|
43
|
+
setPosition([bytePosition, bitPosition]: readonly [number, number]): void;
|
|
44
|
+
}
|
|
45
|
+
declare const ObuType: {
|
|
46
|
+
readonly SequenceHeader: 1;
|
|
47
|
+
readonly TemporalDelimiter: 2;
|
|
48
|
+
readonly FrameHeader: 3;
|
|
49
|
+
readonly TileGroup: 4;
|
|
50
|
+
readonly Metadata: 5;
|
|
51
|
+
readonly Frame: 6;
|
|
52
|
+
readonly RedundantFrameHeader: 7;
|
|
53
|
+
readonly TileList: 8;
|
|
54
|
+
readonly Padding: 15;
|
|
55
|
+
};
|
|
56
|
+
type ObuType = (typeof ObuType)[keyof typeof ObuType];
|
|
57
|
+
declare const ColorPrimaries: {
|
|
58
|
+
readonly Bt709: 1;
|
|
59
|
+
readonly Unspecified: 2;
|
|
60
|
+
readonly Bt470M: 4;
|
|
61
|
+
readonly Bt470BG: 5;
|
|
62
|
+
readonly Bt601: 6;
|
|
63
|
+
readonly Smpte240: 7;
|
|
64
|
+
readonly GenericFilm: 8;
|
|
65
|
+
readonly Bt2020: 9;
|
|
66
|
+
readonly Xyz: 10;
|
|
67
|
+
readonly Smpte431: 11;
|
|
68
|
+
readonly Smpte432: 12;
|
|
69
|
+
readonly Ebu3213: 22;
|
|
70
|
+
};
|
|
71
|
+
declare const TransferCharacteristics: {
|
|
72
|
+
readonly Bt709: 1;
|
|
73
|
+
readonly Unspecified: 2;
|
|
74
|
+
readonly Bt470M: 4;
|
|
75
|
+
readonly Bt470BG: 5;
|
|
76
|
+
readonly Bt601: 6;
|
|
77
|
+
readonly Smpte240: 7;
|
|
78
|
+
readonly Linear: 8;
|
|
79
|
+
readonly Log100: 9;
|
|
80
|
+
readonly Log100Sqrt10: 10;
|
|
81
|
+
readonly Iec61966: 11;
|
|
82
|
+
readonly Bt1361: 12;
|
|
83
|
+
readonly Srgb: 13;
|
|
84
|
+
readonly Bt2020Ten: 14;
|
|
85
|
+
readonly Bt2020Twelve: 15;
|
|
86
|
+
readonly Smpte2084: 16;
|
|
87
|
+
readonly Smpte428: 17;
|
|
88
|
+
readonly Hlg: 18;
|
|
89
|
+
};
|
|
90
|
+
declare const MatrixCoefficients: {
|
|
91
|
+
readonly Identity: 0;
|
|
92
|
+
readonly Bt709: 1;
|
|
93
|
+
readonly Unspecified: 2;
|
|
94
|
+
readonly Fcc: 4;
|
|
95
|
+
readonly Bt470BG: 5;
|
|
96
|
+
readonly Bt601: 6;
|
|
97
|
+
readonly Smpte240: 7;
|
|
98
|
+
readonly YCgCo: 8;
|
|
99
|
+
readonly Bt2020Ncl: 9;
|
|
100
|
+
readonly Bt2020Cl: 10;
|
|
101
|
+
readonly Smpte2085: 11;
|
|
102
|
+
readonly ChromatNcl: 12;
|
|
103
|
+
readonly ChromatCl: 13;
|
|
104
|
+
readonly ICtCp: 14;
|
|
105
|
+
};
|
|
106
|
+
export declare class Av1 extends BitReader {
|
|
107
|
+
#private;
|
|
108
|
+
static ObuType: {
|
|
109
|
+
readonly SequenceHeader: 1;
|
|
110
|
+
readonly TemporalDelimiter: 2;
|
|
111
|
+
readonly FrameHeader: 3;
|
|
112
|
+
readonly TileGroup: 4;
|
|
113
|
+
readonly Metadata: 5;
|
|
114
|
+
readonly Frame: 6;
|
|
115
|
+
readonly RedundantFrameHeader: 7;
|
|
116
|
+
readonly TileList: 8;
|
|
117
|
+
readonly Padding: 15;
|
|
118
|
+
};
|
|
119
|
+
static ColorPrimaries: {
|
|
120
|
+
readonly Bt709: 1;
|
|
121
|
+
readonly Unspecified: 2;
|
|
122
|
+
readonly Bt470M: 4;
|
|
123
|
+
readonly Bt470BG: 5;
|
|
124
|
+
readonly Bt601: 6;
|
|
125
|
+
readonly Smpte240: 7;
|
|
126
|
+
readonly GenericFilm: 8;
|
|
127
|
+
readonly Bt2020: 9;
|
|
128
|
+
readonly Xyz: 10;
|
|
129
|
+
readonly Smpte431: 11;
|
|
130
|
+
readonly Smpte432: 12;
|
|
131
|
+
readonly Ebu3213: 22;
|
|
132
|
+
};
|
|
133
|
+
static TransferCharacteristics: {
|
|
134
|
+
readonly Bt709: 1;
|
|
135
|
+
readonly Unspecified: 2;
|
|
136
|
+
readonly Bt470M: 4;
|
|
137
|
+
readonly Bt470BG: 5;
|
|
138
|
+
readonly Bt601: 6;
|
|
139
|
+
readonly Smpte240: 7;
|
|
140
|
+
readonly Linear: 8;
|
|
141
|
+
readonly Log100: 9;
|
|
142
|
+
readonly Log100Sqrt10: 10;
|
|
143
|
+
readonly Iec61966: 11;
|
|
144
|
+
readonly Bt1361: 12;
|
|
145
|
+
readonly Srgb: 13;
|
|
146
|
+
readonly Bt2020Ten: 14;
|
|
147
|
+
readonly Bt2020Twelve: 15;
|
|
148
|
+
readonly Smpte2084: 16;
|
|
149
|
+
readonly Smpte428: 17;
|
|
150
|
+
readonly Hlg: 18;
|
|
151
|
+
};
|
|
152
|
+
static MatrixCoefficients: {
|
|
153
|
+
readonly Identity: 0;
|
|
154
|
+
readonly Bt709: 1;
|
|
155
|
+
readonly Unspecified: 2;
|
|
156
|
+
readonly Fcc: 4;
|
|
157
|
+
readonly Bt470BG: 5;
|
|
158
|
+
readonly Bt601: 6;
|
|
159
|
+
readonly Smpte240: 7;
|
|
160
|
+
readonly YCgCo: 8;
|
|
161
|
+
readonly Bt2020Ncl: 9;
|
|
162
|
+
readonly Bt2020Cl: 10;
|
|
163
|
+
readonly Smpte2085: 11;
|
|
164
|
+
readonly ChromatNcl: 12;
|
|
165
|
+
readonly ChromatCl: 13;
|
|
166
|
+
readonly ICtCp: 14;
|
|
167
|
+
};
|
|
168
|
+
/**
|
|
169
|
+
* Generate a codec string from an AV1 sequence header
|
|
170
|
+
* per Section 5 of AV1 Codec ISO Media File Format Binding
|
|
171
|
+
* https://aomediacodec.github.io/av1-isobmff/#codecsparam
|
|
172
|
+
* @param sequenceHeader The parsed AV1 sequence header
|
|
173
|
+
* @returns A codec string
|
|
174
|
+
*/
|
|
175
|
+
static toCodecString(sequenceHeader: Av1.SequenceHeaderObu): string;
|
|
176
|
+
uvlc(): number;
|
|
177
|
+
leb128(): bigint;
|
|
178
|
+
annexBBitstream(): Generator<Av1.OpenBitstreamUnit, void, void>;
|
|
179
|
+
temporalUnit(sz: bigint): Generator<Av1.OpenBitstreamUnit, void, void>;
|
|
180
|
+
frameUnit(sz: bigint): Generator<Av1.OpenBitstreamUnit, void, void>;
|
|
181
|
+
openBitstreamUnit(sz?: bigint): {
|
|
182
|
+
obu_header: {
|
|
183
|
+
obu_type: number;
|
|
184
|
+
obu_extension_flag: boolean;
|
|
185
|
+
obu_has_size_field: boolean;
|
|
186
|
+
obu_extension_header: {
|
|
187
|
+
temporal_id: number;
|
|
188
|
+
spatial_id: number;
|
|
189
|
+
} | undefined;
|
|
190
|
+
};
|
|
191
|
+
obu_size: bigint;
|
|
192
|
+
sequence_header_obu: {
|
|
193
|
+
seq_profile: number;
|
|
194
|
+
still_picture: boolean;
|
|
195
|
+
reduced_still_picture_header: boolean;
|
|
196
|
+
timing_info_present_flag: boolean;
|
|
197
|
+
timing_info: {
|
|
198
|
+
num_units_in_display_tick: number;
|
|
199
|
+
time_scale: number;
|
|
200
|
+
equal_picture_interval: boolean;
|
|
201
|
+
num_ticks_per_picture_minus_1: number | undefined;
|
|
202
|
+
} | undefined;
|
|
203
|
+
decoder_model_info_present_flag: boolean;
|
|
204
|
+
decoder_model_info: {
|
|
205
|
+
buffer_delay_length_minus_1: number;
|
|
206
|
+
num_units_in_decoding_tick: number;
|
|
207
|
+
buffer_removal_time_length_minus_1: number;
|
|
208
|
+
frame_presentation_time_length_minus_1: number;
|
|
209
|
+
} | undefined;
|
|
210
|
+
initial_display_delay_present_flag: boolean;
|
|
211
|
+
initial_display_delay_minus_1: number[] | undefined;
|
|
212
|
+
operating_points_cnt_minus_1: number;
|
|
213
|
+
operating_point_idc: number[];
|
|
214
|
+
seq_level_idx: number[];
|
|
215
|
+
seq_tier: number[];
|
|
216
|
+
decoder_model_present_for_this_op: boolean[];
|
|
217
|
+
operating_parameters_info: {
|
|
218
|
+
decoder_buffer_delay: number;
|
|
219
|
+
encoder_buffer_delay: number;
|
|
220
|
+
low_delay_mode_flag: boolean;
|
|
221
|
+
}[] | undefined;
|
|
222
|
+
initial_display_delay_present_for_this_op: boolean[];
|
|
223
|
+
frame_width_bits_minus_1: number;
|
|
224
|
+
frame_height_bits_minus_1: number;
|
|
225
|
+
max_frame_width_minus_1: number;
|
|
226
|
+
max_frame_height_minus_1: number;
|
|
227
|
+
frame_id_numbers_present_flag: boolean;
|
|
228
|
+
delta_frame_id_length_minus_2: number | undefined;
|
|
229
|
+
additional_frame_id_length_minus_1: number | undefined;
|
|
230
|
+
use_128x128_superblock: boolean;
|
|
231
|
+
enable_filter_intra: boolean;
|
|
232
|
+
enable_intra_edge_filter: boolean;
|
|
233
|
+
enable_interintra_compound: boolean;
|
|
234
|
+
enable_masked_compound: boolean;
|
|
235
|
+
enable_warped_motion: boolean;
|
|
236
|
+
enable_dual_filter: boolean;
|
|
237
|
+
enable_order_hint: boolean;
|
|
238
|
+
enable_jnt_comp: boolean;
|
|
239
|
+
enable_ref_frame_mvs: boolean;
|
|
240
|
+
seq_choose_screen_content_tools: boolean;
|
|
241
|
+
seq_force_screen_content_tools: number;
|
|
242
|
+
seq_choose_integer_mv: boolean;
|
|
243
|
+
seq_force_integer_mv: number;
|
|
244
|
+
order_hint_bits_minus_1: number | undefined;
|
|
245
|
+
enable_superres: boolean;
|
|
246
|
+
enable_cdef: boolean;
|
|
247
|
+
enable_restoration: boolean;
|
|
248
|
+
color_config: {
|
|
249
|
+
high_bitdepth: boolean;
|
|
250
|
+
twelve_bit: boolean;
|
|
251
|
+
BitDepth: number;
|
|
252
|
+
mono_chrome: boolean;
|
|
253
|
+
color_description_present_flag: boolean;
|
|
254
|
+
color_primaries: Av1.ColorPrimaries;
|
|
255
|
+
transfer_characteristics: Av1.TransferCharacteristics;
|
|
256
|
+
matrix_coefficients: Av1.MatrixCoefficients;
|
|
257
|
+
color_range: boolean;
|
|
258
|
+
subsampling_x: boolean;
|
|
259
|
+
subsampling_y: boolean;
|
|
260
|
+
chroma_sample_position: number;
|
|
261
|
+
separate_uv_delta_q: boolean;
|
|
262
|
+
};
|
|
263
|
+
film_grain_params_present: boolean;
|
|
264
|
+
} | undefined;
|
|
265
|
+
} | undefined;
|
|
266
|
+
obuHeader(): {
|
|
267
|
+
obu_type: number;
|
|
268
|
+
obu_extension_flag: boolean;
|
|
269
|
+
obu_has_size_field: boolean;
|
|
270
|
+
obu_extension_header: {
|
|
271
|
+
temporal_id: number;
|
|
272
|
+
spatial_id: number;
|
|
273
|
+
} | undefined;
|
|
274
|
+
};
|
|
275
|
+
obuExtensionHeader(): {
|
|
276
|
+
temporal_id: number;
|
|
277
|
+
spatial_id: number;
|
|
278
|
+
};
|
|
279
|
+
static readonly SelectScreenContentTools = 2;
|
|
280
|
+
static readonly SelectIntegerMv = 2;
|
|
281
|
+
sequenceHeaderObu(): {
|
|
282
|
+
seq_profile: number;
|
|
283
|
+
still_picture: boolean;
|
|
284
|
+
reduced_still_picture_header: boolean;
|
|
285
|
+
timing_info_present_flag: boolean;
|
|
286
|
+
timing_info: {
|
|
287
|
+
num_units_in_display_tick: number;
|
|
288
|
+
time_scale: number;
|
|
289
|
+
equal_picture_interval: boolean;
|
|
290
|
+
num_ticks_per_picture_minus_1: number | undefined;
|
|
291
|
+
} | undefined;
|
|
292
|
+
decoder_model_info_present_flag: boolean;
|
|
293
|
+
decoder_model_info: {
|
|
294
|
+
buffer_delay_length_minus_1: number;
|
|
295
|
+
num_units_in_decoding_tick: number;
|
|
296
|
+
buffer_removal_time_length_minus_1: number;
|
|
297
|
+
frame_presentation_time_length_minus_1: number;
|
|
298
|
+
} | undefined;
|
|
299
|
+
initial_display_delay_present_flag: boolean;
|
|
300
|
+
initial_display_delay_minus_1: number[] | undefined;
|
|
301
|
+
operating_points_cnt_minus_1: number;
|
|
302
|
+
operating_point_idc: number[];
|
|
303
|
+
seq_level_idx: number[];
|
|
304
|
+
seq_tier: number[];
|
|
305
|
+
decoder_model_present_for_this_op: boolean[];
|
|
306
|
+
operating_parameters_info: {
|
|
307
|
+
decoder_buffer_delay: number;
|
|
308
|
+
encoder_buffer_delay: number;
|
|
309
|
+
low_delay_mode_flag: boolean;
|
|
310
|
+
}[] | undefined;
|
|
311
|
+
initial_display_delay_present_for_this_op: boolean[];
|
|
312
|
+
frame_width_bits_minus_1: number;
|
|
313
|
+
frame_height_bits_minus_1: number;
|
|
314
|
+
max_frame_width_minus_1: number;
|
|
315
|
+
max_frame_height_minus_1: number;
|
|
316
|
+
frame_id_numbers_present_flag: boolean;
|
|
317
|
+
delta_frame_id_length_minus_2: number | undefined;
|
|
318
|
+
additional_frame_id_length_minus_1: number | undefined;
|
|
319
|
+
use_128x128_superblock: boolean;
|
|
320
|
+
enable_filter_intra: boolean;
|
|
321
|
+
enable_intra_edge_filter: boolean;
|
|
322
|
+
enable_interintra_compound: boolean;
|
|
323
|
+
enable_masked_compound: boolean;
|
|
324
|
+
enable_warped_motion: boolean;
|
|
325
|
+
enable_dual_filter: boolean;
|
|
326
|
+
enable_order_hint: boolean;
|
|
327
|
+
enable_jnt_comp: boolean;
|
|
328
|
+
enable_ref_frame_mvs: boolean;
|
|
329
|
+
seq_choose_screen_content_tools: boolean;
|
|
330
|
+
seq_force_screen_content_tools: number;
|
|
331
|
+
seq_choose_integer_mv: boolean;
|
|
332
|
+
seq_force_integer_mv: number;
|
|
333
|
+
order_hint_bits_minus_1: number | undefined;
|
|
334
|
+
enable_superres: boolean;
|
|
335
|
+
enable_cdef: boolean;
|
|
336
|
+
enable_restoration: boolean;
|
|
337
|
+
color_config: {
|
|
338
|
+
high_bitdepth: boolean;
|
|
339
|
+
twelve_bit: boolean;
|
|
340
|
+
BitDepth: number;
|
|
341
|
+
mono_chrome: boolean;
|
|
342
|
+
color_description_present_flag: boolean;
|
|
343
|
+
color_primaries: Av1.ColorPrimaries;
|
|
344
|
+
transfer_characteristics: Av1.TransferCharacteristics;
|
|
345
|
+
matrix_coefficients: Av1.MatrixCoefficients;
|
|
346
|
+
color_range: boolean;
|
|
347
|
+
subsampling_x: boolean;
|
|
348
|
+
subsampling_y: boolean;
|
|
349
|
+
chroma_sample_position: number;
|
|
350
|
+
separate_uv_delta_q: boolean;
|
|
351
|
+
};
|
|
352
|
+
film_grain_params_present: boolean;
|
|
353
|
+
};
|
|
354
|
+
searchSequenceHeaderObu(): {
|
|
355
|
+
seq_profile: number;
|
|
356
|
+
still_picture: boolean;
|
|
357
|
+
reduced_still_picture_header: boolean;
|
|
358
|
+
timing_info_present_flag: boolean;
|
|
359
|
+
timing_info: {
|
|
360
|
+
num_units_in_display_tick: number;
|
|
361
|
+
time_scale: number;
|
|
362
|
+
equal_picture_interval: boolean;
|
|
363
|
+
num_ticks_per_picture_minus_1: number | undefined;
|
|
364
|
+
} | undefined;
|
|
365
|
+
decoder_model_info_present_flag: boolean;
|
|
366
|
+
decoder_model_info: {
|
|
367
|
+
buffer_delay_length_minus_1: number;
|
|
368
|
+
num_units_in_decoding_tick: number;
|
|
369
|
+
buffer_removal_time_length_minus_1: number;
|
|
370
|
+
frame_presentation_time_length_minus_1: number;
|
|
371
|
+
} | undefined;
|
|
372
|
+
initial_display_delay_present_flag: boolean;
|
|
373
|
+
initial_display_delay_minus_1: number[] | undefined;
|
|
374
|
+
operating_points_cnt_minus_1: number;
|
|
375
|
+
operating_point_idc: number[];
|
|
376
|
+
seq_level_idx: number[];
|
|
377
|
+
seq_tier: number[];
|
|
378
|
+
decoder_model_present_for_this_op: boolean[];
|
|
379
|
+
operating_parameters_info: {
|
|
380
|
+
decoder_buffer_delay: number;
|
|
381
|
+
encoder_buffer_delay: number;
|
|
382
|
+
low_delay_mode_flag: boolean;
|
|
383
|
+
}[] | undefined;
|
|
384
|
+
initial_display_delay_present_for_this_op: boolean[];
|
|
385
|
+
frame_width_bits_minus_1: number;
|
|
386
|
+
frame_height_bits_minus_1: number;
|
|
387
|
+
max_frame_width_minus_1: number;
|
|
388
|
+
max_frame_height_minus_1: number;
|
|
389
|
+
frame_id_numbers_present_flag: boolean;
|
|
390
|
+
delta_frame_id_length_minus_2: number | undefined;
|
|
391
|
+
additional_frame_id_length_minus_1: number | undefined;
|
|
392
|
+
use_128x128_superblock: boolean;
|
|
393
|
+
enable_filter_intra: boolean;
|
|
394
|
+
enable_intra_edge_filter: boolean;
|
|
395
|
+
enable_interintra_compound: boolean;
|
|
396
|
+
enable_masked_compound: boolean;
|
|
397
|
+
enable_warped_motion: boolean;
|
|
398
|
+
enable_dual_filter: boolean;
|
|
399
|
+
enable_order_hint: boolean;
|
|
400
|
+
enable_jnt_comp: boolean;
|
|
401
|
+
enable_ref_frame_mvs: boolean;
|
|
402
|
+
seq_choose_screen_content_tools: boolean;
|
|
403
|
+
seq_force_screen_content_tools: number;
|
|
404
|
+
seq_choose_integer_mv: boolean;
|
|
405
|
+
seq_force_integer_mv: number;
|
|
406
|
+
order_hint_bits_minus_1: number | undefined;
|
|
407
|
+
enable_superres: boolean;
|
|
408
|
+
enable_cdef: boolean;
|
|
409
|
+
enable_restoration: boolean;
|
|
410
|
+
color_config: {
|
|
411
|
+
high_bitdepth: boolean;
|
|
412
|
+
twelve_bit: boolean;
|
|
413
|
+
BitDepth: number;
|
|
414
|
+
mono_chrome: boolean;
|
|
415
|
+
color_description_present_flag: boolean;
|
|
416
|
+
color_primaries: Av1.ColorPrimaries;
|
|
417
|
+
transfer_characteristics: Av1.TransferCharacteristics;
|
|
418
|
+
matrix_coefficients: Av1.MatrixCoefficients;
|
|
419
|
+
color_range: boolean;
|
|
420
|
+
subsampling_x: boolean;
|
|
421
|
+
subsampling_y: boolean;
|
|
422
|
+
chroma_sample_position: number;
|
|
423
|
+
separate_uv_delta_q: boolean;
|
|
424
|
+
};
|
|
425
|
+
film_grain_params_present: boolean;
|
|
426
|
+
} | undefined;
|
|
427
|
+
timingInfo(): {
|
|
428
|
+
num_units_in_display_tick: number;
|
|
429
|
+
time_scale: number;
|
|
430
|
+
equal_picture_interval: boolean;
|
|
431
|
+
num_ticks_per_picture_minus_1: number | undefined;
|
|
432
|
+
};
|
|
433
|
+
decoderModelInfo(): {
|
|
434
|
+
buffer_delay_length_minus_1: number;
|
|
435
|
+
num_units_in_decoding_tick: number;
|
|
436
|
+
buffer_removal_time_length_minus_1: number;
|
|
437
|
+
frame_presentation_time_length_minus_1: number;
|
|
438
|
+
};
|
|
439
|
+
operatingParametersInfo(decoderModelInfo: ReturnType<Av1["decoderModelInfo"]>): {
|
|
440
|
+
decoder_buffer_delay: number;
|
|
441
|
+
encoder_buffer_delay: number;
|
|
442
|
+
low_delay_mode_flag: boolean;
|
|
443
|
+
};
|
|
444
|
+
chooseOperatingPoint(): number;
|
|
445
|
+
colorConfig(seq_profile: number): {
|
|
446
|
+
high_bitdepth: boolean;
|
|
447
|
+
twelve_bit: boolean;
|
|
448
|
+
BitDepth: number;
|
|
449
|
+
mono_chrome: boolean;
|
|
450
|
+
color_description_present_flag: boolean;
|
|
451
|
+
color_primaries: Av1.ColorPrimaries;
|
|
452
|
+
transfer_characteristics: Av1.TransferCharacteristics;
|
|
453
|
+
matrix_coefficients: Av1.MatrixCoefficients;
|
|
454
|
+
color_range: boolean;
|
|
455
|
+
subsampling_x: boolean;
|
|
456
|
+
subsampling_y: boolean;
|
|
457
|
+
chroma_sample_position: number;
|
|
458
|
+
separate_uv_delta_q: boolean;
|
|
459
|
+
};
|
|
460
|
+
}
|
|
461
|
+
export declare namespace Av1 {
|
|
462
|
+
type OpenBitstreamUnit = Exclude<ReturnType<Av1["openBitstreamUnit"]>, undefined>;
|
|
463
|
+
type SequenceHeaderObu = ReturnType<Av1["sequenceHeaderObu"]>;
|
|
464
|
+
type ObuType = (typeof ObuType)[keyof typeof ObuType];
|
|
465
|
+
type ColorPrimaries = (typeof ColorPrimaries)[keyof typeof ColorPrimaries];
|
|
466
|
+
type TransferCharacteristics = (typeof TransferCharacteristics)[keyof typeof TransferCharacteristics];
|
|
467
|
+
type MatrixCoefficients = (typeof MatrixCoefficients)[keyof typeof MatrixCoefficients];
|
|
468
|
+
}
|
|
469
|
+
export {};
|
|
470
|
+
//# sourceMappingURL=av1.d.ts.map
|
package/esm/av1.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"av1.d.ts","sourceRoot":"","sources":["../src/av1.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,iBAAiB;;;;;CAK7B,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;CAyB3B,CAAC;AAEF,cAAM,SAAS;;IAOX,IAAI,WAAW,YAEd;IAED,IAAI,KAAK,YAER;gBAEW,IAAI,EAAE,UAAU;IAK5B,EAAE;IAWF,CAAC,CAAC,CAAC,EAAE,MAAM;IASX,IAAI,CAAC,CAAC,EAAE,MAAM;IAqBd,SAAS,CAAC,CAAC,EAAE,MAAM;IAcnB,WAAW;IAIX,WAAW,CAAC,CAAC,YAAY,EAAE,WAAW,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;CAKrE;AAED,QAAA,MAAM,OAAO;;;;;;;;;;CAUH,CAAC;AAEX,KAAK,OAAO,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,OAAO,OAAO,CAAC,CAAC;AAEtD,QAAA,MAAM,cAAc;;;;;;;;;;;;;CAaV,CAAC;AAEX,QAAA,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;CAkBnB,CAAC;AAEX,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;CAed,CAAC;AAEX,qBAAa,GAAI,SAAQ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