Skip to content

Commit

Permalink
Merge pull request #847 from wader/png-correct-flags
Browse files Browse the repository at this point in the history
png: Type flags were off-by-one bit
  • Loading branch information
wader authored Jan 5, 2024
2 parents ae06aec + 38b4412 commit 13fc847
Show file tree
Hide file tree
Showing 16 changed files with 384 additions and 384 deletions.
72 changes: 36 additions & 36 deletions format/caff/testdata/test.cmo3.fqtest
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ $ fq dv test.cmo3
| | | [0]{}: chunk 0x8-0x21 (25)
0x0000| 00 00 00 0d | .... | length: 13 0x8-0xc (4)
0x0000| 49 48 44 52| IHDR| type: "IHDR" 0xc-0x10 (4)
0x0000| 49 | I | ancillary: false 0xc.3-0xc.4 (0.1)
0x0000| 48 | H | private: false 0xd.3-0xd.4 (0.1)
0x0000| 44 | D | reserved: false 0xe.3-0xe.4 (0.1)
0x0000| 52| R| safe_to_copy: true 0xf.3-0xf.4 (0.1)
0x0000| 49 | I | ancillary: false 0xc.2-0xc.3 (0.1)
0x0000| 48 | H | private: false 0xd.2-0xd.3 (0.1)
0x0000| 44 | D | reserved: false 0xe.2-0xe.3 (0.1)
0x0000| 52| R| safe_to_copy: false 0xf.2-0xf.3 (0.1)
0x0001|00 00 00 40 |...@ | width: 64 0x10-0x14 (4)
0x0001| 00 00 00 40 | ...@ | height: 64 0x14-0x18 (4)
0x0001| 08 | . | bit_depth: 8 0x18-0x19 (1)
Expand All @@ -95,21 +95,21 @@ $ fq dv test.cmo3
| | | [1]{}: chunk 0x21-0x54 (51)
0x0002| 00 00 00 27 | ...' | length: 39 0x21-0x25 (4)
0x0002| 49 44 41 54 | IDAT | type: "IDAT" 0x25-0x29 (4)
0x0002| 49 | I | ancillary: false 0x25.3-0x25.4 (0.1)
0x0002| 44 | D | private: false 0x26.3-0x26.4 (0.1)
0x0002| 41 | A | reserved: false 0x27.3-0x27.4 (0.1)
0x0002| 54 | T | safe_to_copy: true 0x28.3-0x28.4 (0.1)
0x0002| 49 | I | ancillary: false 0x25.2-0x25.3 (0.1)
0x0002| 44 | D | private: false 0x26.2-0x26.3 (0.1)
0x0002| 41 | A | reserved: false 0x27.2-0x27.3 (0.1)
0x0002| 54 | T | safe_to_copy: false 0x28.2-0x28.3 (0.1)
0x0002| 78 5e ed c1 01 0d 00| x^.....| data: raw bits 0x29-0x50 (39)
0x0003|00 00 c2 a0 f7 4f 6d 0e 37 a0 00 00 00 00 00 00|.....Om.7.......|
0x0004|00 00 00 00 00 00 00 00 00 80 77 03 40 40 00 01|..........w.@@..|
0x0005|59 0a 7b 0c |Y.{. | crc: 0x590a7b0c (valid) 0x50-0x54 (4)
| | | [2]{}: chunk 0x54-0x60 (12)
0x0005| 00 00 00 00 | .... | length: 0 0x54-0x58 (4)
0x0005| 49 45 4e 44 | IEND | type: "IEND" 0x58-0x5c (4)
0x0005| 49 | I | ancillary: false 0x58.3-0x58.4 (0.1)
0x0005| 45 | E | private: false 0x59.3-0x59.4 (0.1)
0x0005| 4e | N | reserved: false 0x5a.3-0x5a.4 (0.1)
0x0005| 44 | D | safe_to_copy: false 0x5b.3-0x5b.4 (0.1)
0x0005| 49 | I | ancillary: false 0x58.2-0x58.3 (0.1)
0x0005| 45 | E | private: false 0x59.2-0x59.3 (0.1)
0x0005| 4e | N | reserved: false 0x5a.2-0x5a.3 (0.1)
0x0005| 44 | D | safe_to_copy: false 0x5b.2-0x5b.3 (0.1)
0x0005| ae 42 60 82| .B`.| crc: 0xae426082 (valid) 0x5c-0x60 (4)
| | | [1]{}: file 0x129-0x17c (83)
| | | file_path: "image_0.png"
Expand All @@ -125,10 +125,10 @@ $ fq dv test.cmo3
| | | [0]{}: chunk 0x8-0x21 (25)
0x0000| 00 00 00 0d | .... | length: 13 0x8-0xc (4)
0x0000| 49 48 44 52| IHDR| type: "IHDR" 0xc-0x10 (4)
0x0000| 49 | I | ancillary: false 0xc.3-0xc.4 (0.1)
0x0000| 48 | H | private: false 0xd.3-0xd.4 (0.1)
0x0000| 44 | D | reserved: false 0xe.3-0xe.4 (0.1)
0x0000| 52| R| safe_to_copy: true 0xf.3-0xf.4 (0.1)
0x0000| 49 | I | ancillary: false 0xc.2-0xc.3 (0.1)
0x0000| 48 | H | private: false 0xd.2-0xd.3 (0.1)
0x0000| 44 | D | reserved: false 0xe.2-0xe.3 (0.1)
0x0000| 52| R| safe_to_copy: false 0xf.2-0xf.3 (0.1)
0x0001|00 00 00 20 |... | width: 32 0x10-0x14 (4)
0x0001| 00 00 00 20 | ... | height: 32 0x14-0x18 (4)
0x0001| 08 | . | bit_depth: 8 0x18-0x19 (1)
Expand All @@ -141,21 +141,21 @@ $ fq dv test.cmo3
| | | [1]{}: chunk 0x21-0x47 (38)
0x0002| 00 00 00 1a | .... | length: 26 0x21-0x25 (4)
0x0002| 49 44 41 54 | IDAT | type: "IDAT" 0x25-0x29 (4)
0x0002| 49 | I | ancillary: false 0x25.3-0x25.4 (0.1)
0x0002| 44 | D | private: false 0x26.3-0x26.4 (0.1)
0x0002| 41 | A | reserved: false 0x27.3-0x27.4 (0.1)
0x0002| 54 | T | safe_to_copy: true 0x28.3-0x28.4 (0.1)
0x0002| 49 | I | ancillary: false 0x25.2-0x25.3 (0.1)
0x0002| 44 | D | private: false 0x26.2-0x26.3 (0.1)
0x0002| 41 | A | reserved: false 0x27.2-0x27.3 (0.1)
0x0002| 54 | T | safe_to_copy: false 0x28.2-0x28.3 (0.1)
0x0002| 78 5e ed c1 01 01 00| x^.....| data: raw bits 0x29-0x43 (26)
0x0003|00 00 82 20 ff af 6e 48 40 01 00 00 00 ef 06 10|... ..nH@.......|
0x0004|20 00 01 | .. |
0x0004| 9f 22 b8 f9 | .".. | crc: 0x9f22b8f9 (valid) 0x43-0x47 (4)
| | | [2]{}: chunk 0x47-0x53 (12)
0x0004| 00 00 00 00 | .... | length: 0 0x47-0x4b (4)
0x0004| 49 45 4e 44 | IEND | type: "IEND" 0x4b-0x4f (4)
0x0004| 49 | I | ancillary: false 0x4b.3-0x4b.4 (0.1)
0x0004| 45 | E | private: false 0x4c.3-0x4c.4 (0.1)
0x0004| 4e | N | reserved: false 0x4d.3-0x4d.4 (0.1)
0x0004| 44 | D | safe_to_copy: false 0x4e.3-0x4e.4 (0.1)
0x0004| 49 | I | ancillary: false 0x4b.2-0x4b.3 (0.1)
0x0004| 45 | E | private: false 0x4c.2-0x4c.3 (0.1)
0x0004| 4e | N | reserved: false 0x4d.2-0x4d.3 (0.1)
0x0004| 44 | D | safe_to_copy: false 0x4e.2-0x4e.3 (0.1)
0x0004| ae| .| crc: 0xae426082 (valid) 0x4f-0x53 (4)
0x0005|42 60 82| |B`.| |
| | | [2]{}: file 0x17c-0x1c7 (75)
Expand All @@ -172,10 +172,10 @@ $ fq dv test.cmo3
| | | [0]{}: chunk 0x8-0x21 (25)
0x0000| 00 00 00 0d | .... | length: 13 0x8-0xc (4)
0x0000| 49 48 44 52| IHDR| type: "IHDR" 0xc-0x10 (4)
0x0000| 49 | I | ancillary: false 0xc.3-0xc.4 (0.1)
0x0000| 48 | H | private: false 0xd.3-0xd.4 (0.1)
0x0000| 44 | D | reserved: false 0xe.3-0xe.4 (0.1)
0x0000| 52| R| safe_to_copy: true 0xf.3-0xf.4 (0.1)
0x0000| 49 | I | ancillary: false 0xc.2-0xc.3 (0.1)
0x0000| 48 | H | private: false 0xd.2-0xd.3 (0.1)
0x0000| 44 | D | reserved: false 0xe.2-0xe.3 (0.1)
0x0000| 52| R| safe_to_copy: false 0xf.2-0xf.3 (0.1)
0x0001|00 00 00 10 |.... | width: 16 0x10-0x14 (4)
0x0001| 00 00 00 10 | .... | height: 16 0x14-0x18 (4)
0x0001| 08 | . | bit_depth: 8 0x18-0x19 (1)
Expand All @@ -188,21 +188,21 @@ $ fq dv test.cmo3
| | | [1]{}: chunk 0x21-0x3f (30)
0x0002| 00 00 00 12 | .... | length: 18 0x21-0x25 (4)
0x0002| 49 44 41 54 | IDAT | type: "IDAT" 0x25-0x29 (4)
0x0002| 49 | I | ancillary: false 0x25.3-0x25.4 (0.1)
0x0002| 44 | D | private: false 0x26.3-0x26.4 (0.1)
0x0002| 41 | A | reserved: false 0x27.3-0x27.4 (0.1)
0x0002| 54 | T | safe_to_copy: true 0x28.3-0x28.4 (0.1)
0x0002| 49 | I | ancillary: false 0x25.2-0x25.3 (0.1)
0x0002| 44 | D | private: false 0x26.2-0x26.3 (0.1)
0x0002| 41 | A | reserved: false 0x27.2-0x27.3 (0.1)
0x0002| 54 | T | safe_to_copy: false 0x28.2-0x28.3 (0.1)
0x0002| 78 5e 63 60 18 05 a3| x^c`...| data: raw bits 0x29-0x3b (18)
0x0003|60 14 8c 02 08 00 00 04 10 00 01 |`.......... |
0x0003| 66 c1 64 0b | f.d. | crc: 0x66c1640b (valid) 0x3b-0x3f (4)
| | | [2]{}: chunk 0x3f-0x4b (12)
0x0003| 00| .| length: 0 0x3f-0x43 (4)
0x0004|00 00 00 |... |
0x0004| 49 45 4e 44 | IEND | type: "IEND" 0x43-0x47 (4)
0x0004| 49 | I | ancillary: false 0x43.3-0x43.4 (0.1)
0x0004| 45 | E | private: false 0x44.3-0x44.4 (0.1)
0x0004| 4e | N | reserved: false 0x45.3-0x45.4 (0.1)
0x0004| 44 | D | safe_to_copy: false 0x46.3-0x46.4 (0.1)
0x0004| 49 | I | ancillary: false 0x43.2-0x43.3 (0.1)
0x0004| 45 | E | private: false 0x44.2-0x44.3 (0.1)
0x0004| 4e | N | reserved: false 0x45.2-0x45.3 (0.1)
0x0004| 44 | D | safe_to_copy: false 0x46.2-0x46.3 (0.1)
0x0004| ae 42 60 82| | .B`.| | crc: 0xae426082 (valid) 0x47-0x4b (4)
| | | [3]{}: file 0x1c7-0x2267 (8352)
| | | file_path: "main.xml"
Expand Down
24 changes: 12 additions & 12 deletions format/flac/testdata/picture_seek_gain.fqtest
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ $ fq -d flac dv picture_seek_gain.flac
| | | [0]{}: chunk 0x164-0x17d (25)
0x0160| 00 00 00 0d | .... | length: 13 0x164-0x168 (4)
0x0160| 49 48 44 52 | IHDR | type: "IHDR" 0x168-0x16c (4)
0x0160| 49 | I | ancillary: false 0x168.3-0x168.4 (0.1)
0x0160| 48 | H | private: false 0x169.3-0x169.4 (0.1)
0x0160| 44 | D | reserved: false 0x16a.3-0x16a.4 (0.1)
0x0160| 52 | R | safe_to_copy: true 0x16b.3-0x16b.4 (0.1)
0x0160| 49 | I | ancillary: false 0x168.2-0x168.3 (0.1)
0x0160| 48 | H | private: false 0x169.2-0x169.3 (0.1)
0x0160| 44 | D | reserved: false 0x16a.2-0x16a.3 (0.1)
0x0160| 52 | R | safe_to_copy: false 0x16b.2-0x16b.3 (0.1)
0x0160| 00 00 00 04| ....| width: 4 0x16c-0x170 (4)
0x0170|00 00 00 04 |.... | height: 4 0x170-0x174 (4)
0x0170| 01 | . | bit_depth: 1 0x174-0x175 (1)
Expand All @@ -106,19 +106,19 @@ $ fq -d flac dv picture_seek_gain.flac
0x0170| 00 00 00| ...| length: 11 0x17d-0x181 (4)
0x0180|0b |. |
0x0180| 49 44 41 54 | IDAT | type: "IDAT" 0x181-0x185 (4)
0x0180| 49 | I | ancillary: false 0x181.3-0x181.4 (0.1)
0x0180| 44 | D | private: false 0x182.3-0x182.4 (0.1)
0x0180| 41 | A | reserved: false 0x183.3-0x183.4 (0.1)
0x0180| 54 | T | safe_to_copy: true 0x184.3-0x184.4 (0.1)
0x0180| 49 | I | ancillary: false 0x181.2-0x181.3 (0.1)
0x0180| 44 | D | private: false 0x182.2-0x182.3 (0.1)
0x0180| 41 | A | reserved: false 0x183.2-0x183.3 (0.1)
0x0180| 54 | T | safe_to_copy: false 0x184.2-0x184.3 (0.1)
0x0180| 08 d7 63 60 80 00 00 00 08 00 01| ..c`.......| data: raw bits 0x185-0x190 (11)
0x0190|2f 20 dd 31 |/ .1 | crc: 0x2f20dd31 (valid) 0x190-0x194 (4)
| | | [2]{}: chunk 0x194-0x1a0 (12)
0x0190| 00 00 00 00 | .... | length: 0 0x194-0x198 (4)
0x0190| 49 45 4e 44 | IEND | type: "IEND" 0x198-0x19c (4)
0x0190| 49 | I | ancillary: false 0x198.3-0x198.4 (0.1)
0x0190| 45 | E | private: false 0x199.3-0x199.4 (0.1)
0x0190| 4e | N | reserved: false 0x19a.3-0x19a.4 (0.1)
0x0190| 44 | D | safe_to_copy: false 0x19b.3-0x19b.4 (0.1)
0x0190| 49 | I | ancillary: false 0x198.2-0x198.3 (0.1)
0x0190| 45 | E | private: false 0x199.2-0x199.3 (0.1)
0x0190| 4e | N | reserved: false 0x19a.2-0x19a.3 (0.1)
0x0190| 44 | D | safe_to_copy: false 0x19b.2-0x19b.3 (0.1)
0x0190| ae 42 60 82| .B`.| crc: 0xae426082 (valid) 0x19c-0x1a0 (4)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| [4]{}: metadatablock (flac_metadatablock) 0x1a0-0x2060 (7872)
0x01a0|81 |. | last_block: true 0x1a0-0x1a0.1 (0.1)
Expand Down
Loading

0 comments on commit 13fc847

Please sign in to comment.