1
1
mirror of https://github.com/wader/fq.git synced 2024-12-29 00:22:38 +03:00
fq/format/matroska/testdata/decode_samples.fqtest
Mattias Wadman 051a70bd4b interp: Change bit ranges to use exclusive end
All other ranges and slicing uses exclusive end so i think it make sense
to make it consistent.

Update docs and add additional example for non-byte-aligned field.

Also fixes issue showing zero bit ranges as start-NA.
2023-10-20 15:37:26 +02:00

57 lines
5.9 KiB
Plaintext

$ fq -o decode_samples=true 'first(grep_by(.id=="simple_block")) | dv' aac.mkv
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.elements[1].elements[5].elements[2]{}: element 0x227-0x2fb (212)
0x220| a3 | . | id: "simple_block" (0xa3) (Similar to Block) 0x227-0x228 (1)
| | | type: "binary"
0x220| 40 d1 | @. | size: 209 0x228-0x22a (2)
0x220| 81 | . | track_number: 1 0x22a-0x22b (1)
0x220| 00 00 | .. | timestamp: 0 0x22b-0x22d (2)
| | | flags{}: 0x22d-0x22e (1)
0x220| 80 | . | key_frame: true 0x22d-0x22d.1 (0.1)
0x220| 80 | . | reserved: 0 0x22d.1-0x22d.4 (0.3)
0x220| 80 | . | invisible: false 0x22d.4-0x22d.5 (0.1)
0x220| 80 | . | lacing: "none" (0) 0x22d.5-0x22d.7 (0.2)
0x220| 80 | . | discardable: false 0x22d.7-0x22e (0.1)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| packet[0:4]: (aac_frame) 0x22e-0x2fb (205)
| | | [0]{}: element 0x22e-0x23e.7 (16.7)
0x220| de | . | syntax_element: "FIL" (6) 0x22e-0x22e.3 (0.3)
| | | cnt{}: 0x22e.3-0x22f.7 (1.4)
0x220| de | . | count: 15 0x22e.3-0x22e.7 (0.4)
0x220| de 02| ..| esc_count: 1 0x22e.7-0x22f.7 (1)
| | | payload_length: 15
| | | extension_payload{}: 0x22f.7-0x23e.7 (15)
0x220| 02| .| extension_type: "EXT_FILL" (0) 0x22f.7-0x230.3 (0.4)
0x230|00 |. |
0x230|00 |. | fill_nibble: 0 0x230.3-0x230.7 (0.4)
0x230|00 4c 61 76 63 35 38 2e 39 31 2e 31 30 30 00 |.Lavc58.91.100. | fill_byte: raw bits 0x230.7-0x23e.7 (14)
| | | [1]{}: element 0x23e.7-0x242.1 (3.2)
0x230| 00 02| ..| syntax_element: "SCE" (0) 0x23e.7-0x23f.2 (0.3)
0x230| 02| .| element_instance_tag: 0 0x23f.2-0x23f.6 (0.4)
0x230| 02| .| global_gain: 151 0x23f.6-0x240.6 (1)
0x240|5c |\ |
| | | ics_info{}: 0x240.6-0x242.1 (1.3)
0x240|5c |\ | ics_reserved_bit: 0 0x240.6-0x240.7 (0.1)
0x240|5c ab |\. | window_sequence: "LONG_START_SEQUENCE" (1) 0x240.7-0x241.1 (0.2)
0x240| ab | . | window_shape: 0 0x241.1-0x241.2 (0.1)
0x240| ab | . | max_sfb: 43 0x241.2-0x242 (0.6)
0x240| 59 | Y | predictor_data_present: false 0x242-0x242.1 (0.1)
0x240| 59 | Y | [2]: raw bits byte_align 0x242.1-0x243 (0.7)
0x240| a9 8c 72 50 8b 4c aa de 1d 71 72 5c 88| ..rP.L...qr\.| [3]: raw bits data 0x243-0x2fb (184)
0x250|42 08 10 0e 80 0c d5 9f 71 6c 47 12 cb b6 16 71|B.......qlG....q|
* |until 0x2fa.7 (184) | |
$ fq -o decode_samples=false 'first(grep_by(.id=="simple_block")) | dv' aac.mkv
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.elements[1].elements[5].elements[2]{}: element 0x227-0x2fb (212)
0x220| a3 | . | id: "simple_block" (0xa3) (Similar to Block) 0x227-0x228 (1)
| | | type: "binary"
0x220| 40 d1 | @. | size: 209 0x228-0x22a (2)
0x220| 81 | . | track_number: 1 0x22a-0x22b (1)
0x220| 00 00 | .. | timestamp: 0 0x22b-0x22d (2)
| | | flags{}: 0x22d-0x22e (1)
0x220| 80 | . | key_frame: true 0x22d-0x22d.1 (0.1)
0x220| 80 | . | reserved: 0 0x22d.1-0x22d.4 (0.3)
0x220| 80 | . | invisible: false 0x22d.4-0x22d.5 (0.1)
0x220| 80 | . | lacing: "none" (0) 0x22d.5-0x22d.7 (0.2)
0x220| 80 | . | discardable: false 0x22d.7-0x22e (0.1)
0x220| de 02| ..| packet: raw bits 0x22e-0x2fb (205)
0x230|00 4c 61 76 63 35 38 2e 39 31 2e 31 30 30 00 02|.Lavc58.91.100..|
* |until 0x2fa.7 (205) | |