mirror of
https://github.com/wader/fq.git
synced 2024-09-11 20:07:11 +03:00
mp4: Decode jP box
This commit is contained in:
parent
240ae7f57d
commit
4f90a2eaae
2
format/jpeg/testdata/jp2c_3c.jp2.fqtest
vendored
2
format/jpeg/testdata/jp2c_3c.jp2.fqtest
vendored
@ -6,7 +6,7 @@ $ fq dv jp2c_3c.jp2
|
||||
| | | [0]{}: box 0x0-0xc (12)
|
||||
0x000|00 00 00 0c |.... | size: 12 0x0-0x4 (4)
|
||||
0x000| 6a 50 20 20 | jP | type: "jP" (JPEG 2000 Signature) 0x4-0x8 (4)
|
||||
0x000| 0d 0a 87 0a | .... | data: raw bits 0x8-0xc (4)
|
||||
0x000| 0d 0a 87 0a | .... | signature: raw bits (valid) 0x8-0xc (4)
|
||||
| | | [1]{}: box 0xc-0x20 (20)
|
||||
0x000| 00 00 00 14| ....| size: 20 0xc-0x10 (4)
|
||||
0x010|66 74 79 70 |ftyp | type: "ftyp" (File type and compatibility) 0x10-0x14 (4)
|
||||
|
2
format/jpeg/testdata/test.jp2.fqtest
vendored
2
format/jpeg/testdata/test.jp2.fqtest
vendored
@ -5,7 +5,7 @@ $ fq dv test.jp2
|
||||
| | | [0]{}: box 0x0-0xc (12)
|
||||
0x00|00 00 00 0c |.... | size: 12 0x0-0x4 (4)
|
||||
0x00| 6a 50 20 20 | jP | type: "jP" (JPEG 2000 Signature) 0x4-0x8 (4)
|
||||
0x00| 0d 0a 87 0a | .... | data: raw bits 0x8-0xc (4)
|
||||
0x00| 0d 0a 87 0a | .... | signature: raw bits (valid) 0x8-0xc (4)
|
||||
| | | [1]{}: box 0xc-0x20 (20)
|
||||
0x00| 00 00 00 14| ....| size: 20 0xc-0x10 (4)
|
||||
0x10|66 74 79 70 |ftyp | type: "ftyp" (File type and compatibility) 0x10-0x14 (4)
|
||||
|
@ -1819,6 +1819,8 @@ func decodeBox(ctx *decodeContext, d *decode.D, typ string) {
|
||||
})
|
||||
d.FieldU8("unk_c")
|
||||
d.FieldU8("ipr")
|
||||
case "jP":
|
||||
d.FieldRawLen("signature", 4*8, d.AssertBitBuf([]byte{0x0d, 0x0a, 0x87, 0x0a}))
|
||||
case "jp2c":
|
||||
d.FieldFormat("segments", &jp2cGroup, nil)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user