Skip to content

Commit

Permalink
Merge pull request #365 from bradh/fdis_23001_17
Browse files Browse the repository at this point in the history
uncompressed: update to FDIS box configuration
  • Loading branch information
cconcolato authored Oct 26, 2023
2 parents 325741b + 3284b4f commit 6ebcc41
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 25 deletions.
2 changes: 1 addition & 1 deletion src/parsing/cmpd.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ BoxParser.createBoxCtor("cmpd", function(stream) {
this.component_types = [];
this.component_type_urls = [];
for (i = 0; i < this.component_count; i++) {
var component_type = stream.readUint16();
var component_type = stream.readUint32();
this.component_types.push(component_type);
if (component_type >= 0x8000) {
this.component_type_urls.push(stream.readCString());
Expand Down
52 changes: 28 additions & 24 deletions src/parsing/uncC.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,34 @@
BoxParser.createFullBoxCtor("uncC", function(stream) {
var i;
this.profile = stream.readUint32();
this.component_count = stream.readUint16();
this.component_index = [];
this.component_bit_depth_minus_one = [];
this.component_format = [];
this.component_align_size = [];
for (i = 0; i < this.component_count; i++) {
this.component_index.push(stream.readUint16());
this.component_bit_depth_minus_one.push(stream.readUint8());
this.component_format.push(stream.readUint8());
this.component_align_size.push(stream.readUint8());
if (this.version == 1) {
// Nothing - just the profile
} else if (this.version == 0) {
this.component_count = stream.readUint32();
this.component_index = [];
this.component_bit_depth_minus_one = [];
this.component_format = [];
this.component_align_size = [];
for (i = 0; i < this.component_count; i++) {
this.component_index.push(stream.readUint16());
this.component_bit_depth_minus_one.push(stream.readUint8());
this.component_format.push(stream.readUint8());
this.component_align_size.push(stream.readUint8());
}
this.sampling_type = stream.readUint8();
this.interleave_type = stream.readUint8();
this.block_size = stream.readUint8();
var flags = stream.readUint8();
this.component_little_endian = (flags >> 7) & 0x1;
this.block_pad_lsb = (flags >> 6) & 0x1;
this.block_little_endian = (flags >> 5) & 0x1;
this.block_reversed = (flags >> 4) & 0x1;
this.pad_unknown = (flags >> 3) & 0x1;
this.pixel_size = stream.readUint32();
this.row_align_size = stream.readUint32();
this.tile_align_size = stream.readUint32();
this.num_tile_cols_minus_one = stream.readUint32();
this.num_tile_rows_minus_one = stream.readUint32();
}
this.sampling_type = stream.readUint8();
this.interleave_type = stream.readUint8();
this.block_size = stream.readUint8();
var flags = stream.readUint8();
this.component_little_endian = (flags >> 7) & 0x1;
this.block_pad_lsb = (flags >> 6) & 0x1;
this.block_little_endian = (flags >> 5) & 0x1;
this.block_reversed = (flags >> 4) & 0x1;
this.pad_unknown = (flags >> 3) & 0x1;
this.pixel_size = stream.readUint8();
this.row_align_size = stream.readUint32();
this.tile_align_size = stream.readUint32();
this.num_tile_cols_minus_one = stream.readUint32();
this.num_tile_rows_minus_one = stream.readUint32();
});

0 comments on commit 6ebcc41

Please sign in to comment.