1
1
mirror of https://github.com/wader/fq.git synced 2024-11-23 00:57:15 +03:00

Merge pull request #904 from wader/vorbis-opus-syms

opus,vorbis: More sym snake_case
This commit is contained in:
Mattias Wadman 2024-03-27 22:45:14 +01:00 committed by GitHub
commit a00cfe0342
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 81 additions and 81 deletions

View File

@ -379,8 +379,8 @@ $ fq -d matroska dv opus.mkv
| | | toc{}: 0x24a-0x2c3 (121)
| | | config{}: 0x24a-0x24a.5 (0.5)
0x240| f8 | . | config: 31 0x24a-0x24a.5 (0.5)
| | | mode: "CELT-only"
| | | bandwidth: "FB"
| | | mode: "celt_only"
| | | bandwidth: "fb"
| | | frame_size: 20
0x240| f8 | . | stereo: false 0x24a.5-0x24a.6 (0.1)
| | | frames_per_packet{}: 0x24a.6-0x24b (0.2)
@ -407,8 +407,8 @@ $ fq -d matroska dv opus.mkv
| | | toc{}: 0x2c9-0x342 (121)
| | | config{}: 0x2c9-0x2c9.5 (0.5)
0x2c0| f8 | . | config: 31 0x2c9-0x2c9.5 (0.5)
| | | mode: "CELT-only"
| | | bandwidth: "FB"
| | | mode: "celt_only"
| | | bandwidth: "fb"
| | | frame_size: 20
0x2c0| f8 | . | stereo: false 0x2c9.5-0x2c9.6 (0.1)
| | | frames_per_packet{}: 0x2c9.6-0x2ca (0.2)
@ -439,8 +439,8 @@ $ fq -d matroska dv opus.mkv
| | | toc{}: 0x351-0x3ca (121)
| | | config{}: 0x351-0x351.5 (0.5)
0x350| f8 | . | config: 31 0x351-0x351.5 (0.5)
| | | mode: "CELT-only"
| | | bandwidth: "FB"
| | | mode: "celt_only"
| | | bandwidth: "fb"
| | | frame_size: 20
0x350| f8 | . | stereo: false 0x351.5-0x351.6 (0.1)
| | | frames_per_packet{}: 0x351.6-0x352 (0.2)

View File

@ -243,7 +243,7 @@ $ fq -d matroska dv vorbis.mkv
0x0170| 10 | . | [1]: 16 lace_size 0x178-0x179 (1)
| | | laces[0:3]: 0x179-0xe56 (3293)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| [0]{}: packet (vorbis_packet) 0x179-0x197 (30)
0x0170| 01 | . | packet_type: "Identification" (1) 0x179-0x17a (1)
0x0170| 01 | . | packet_type: "identification" (1) 0x179-0x17a (1)
0x0170| 76 6f 72 62 69 73| vorbis| magic: "vorbis" (valid) 0x17a-0x180 (6)
0x0180|00 00 00 00 |.... | vorbis_version: 0 (valid) 0x180-0x184 (4)
0x0180| 02 | . | audio_channels: 2 0x184-0x185 (1)
@ -257,7 +257,7 @@ $ fq -d matroska dv vorbis.mkv
0x0190| 01 | . | padding0: raw bits (all zero) 0x196-0x196.7 (0.7)
0x0190| 01 | . | framing_flag: 1 (valid) 0x196.7-0x197 (0.1)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| [1]{}: packet (vorbis_packet) 0x197-0x1a7 (16)
0x0190| 03 | . | packet_type: "Comment" (3) 0x197-0x198 (1)
0x0190| 03 | . | packet_type: "comment" (3) 0x197-0x198 (1)
0x0190| 76 6f 72 62 69 73 | vorbis | magic: "vorbis" (valid) 0x198-0x19e (6)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| comment{}: (vorbis_comment) 0x19e-0x1a6 (8)
0x0190| 00 00| ..| vendor_length: 0 0x19e-0x1a2 (4)
@ -268,7 +268,7 @@ $ fq -d matroska dv vorbis.mkv
0x01a0| 01 | . | padding0: raw bits (all zero) 0x1a6-0x1a6.7 (0.7)
0x01a0| 01 | . | frame_bit: 1 (valid) 0x1a6.7-0x1a7 (0.1)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| [2]{}: packet (vorbis_packet) 0x1a7-0xe56 (3247)
0x01a0| 05 | . | packet_type: "Setup" (5) 0x1a7-0x1a8 (1)
0x01a0| 05 | . | packet_type: "setup" (5) 0x1a7-0x1a8 (1)
0x01a0| 76 6f 72 62 69 73 | vorbis | magic: "vorbis" (valid) 0x1a8-0x1ae (6)
0x01a0| 1c | . | vorbis_codebook_count: 29 0x1ae-0x1af (1)
0x01a0| 42| B| codecooke_sync: 0x564342 (valid) 0x1af-0x1b2 (3)
@ -396,7 +396,7 @@ $ fq -d matroska dv vorbis.mkv
0x0f10|80 |. | lacing: "none" (0) 0xf10.5-0xf10.7 (0.2)
0x0f10|80 |. | discardable: false 0xf10.7-0xf11 (0.1)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| packet{}: (vorbis_packet) 0xf11-0xfc7 (182)
0x0f10| be | . | packet_type: "Audio" (0) 0xf11-0xf12 (1)
0x0f10| be | . | packet_type: "audio" (0) 0xf11-0xf12 (1)
0x0f10| b7 f2 81 46 74 15 42 0b 52 08 17 32 8e 43| ...Ft.B.R..2.C| data: raw bits 0xf12-0xfc7 (181)
0x0f20|08 65 84 84 f6 56 3e d0 88 ae 42 68 41 0a e1 42|.e...V>...BhA..B|
* |until 0xfc6.7 (181) | |
@ -413,7 +413,7 @@ $ fq -d matroska dv vorbis.mkv
0x0fc0| 80 | . | lacing: "none" (0) 0xfcc.5-0xfcc.7 (0.2)
0x0fc0| 80 | . | discardable: false 0xfcc.7-0xfcd (0.1)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| packet{}: (vorbis_packet) 0xfcd-0x1019 (76)
0x0fc0| be | . | packet_type: "Audio" (0) 0xfcd-0xfce (1)
0x0fc0| be | . | packet_type: "audio" (0) 0xfcd-0xfce (1)
0x0fc0| 13 a2| ..| data: raw bits 0xfce-0x1019 (75)
0x0fd0|9b 06 0a b6 ff 13 10 ff 25 62 ec 8f d9 f7 a2 11|........%b......|
* |until 0x1018.7 (75) | |
@ -435,7 +435,7 @@ $ fq -d matroska dv vorbis.mkv
0x1020| 00 | . | lacing: "none" (0) 0x1028.5-0x1028.7 (0.2)
0x1020| 00 | . | not_used: false 0x1028.7-0x1029 (0.1)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| packet{}: (vorbis_packet) 0x1029-0x10d8 (175)
0x1020| be | . | packet_type: "Audio" (0) 0x1029-0x102a (1)
0x1020| be | . | packet_type: "audio" (0) 0x1029-0x102a (1)
0x1020| a7 f2 81 46 bb c2| ...F..| data: raw bits 0x102a-0x10d8 (174)
0x1030|48 52 08 27 b8 83 10 ca 08 b1 a7 f2 81 46 bb c2|HR.'.........F..|
* |until 0x10d7.7 (174) | |

View File

@ -212,8 +212,8 @@ $ fq -d mp4 dv opus.mp4
| | | toc{}: 0x368-0x373 (11)
| | | config{}: 0x368-0x368.5 (0.5)
0x360| 00 | . | config: 0 0x368-0x368.5 (0.5)
| | | mode: "SILK-only"
| | | bandwidth: "NB"
| | | mode: "silk_only"
| | | bandwidth: "nb"
| | | frame_size: 10
0x360| 00 | . | stereo: false 0x368.5-0x368.6 (0.1)
| | | frames_per_packet{}: 0x368.6-0x369 (0.2)
@ -314,8 +314,8 @@ $ fq -d mp4 dv opus.mp4
| | | toc{}: 0x2c-0xa5 (121)
| | | config{}: 0x2c-0x2c.5 (0.5)
0x020| f8 | . | config: 31 0x2c-0x2c.5 (0.5)
| | | mode: "CELT-only"
| | | bandwidth: "FB"
| | | mode: "celt_only"
| | | bandwidth: "fb"
| | | frame_size: 20
0x020| f8 | . | stereo: false 0x2c.5-0x2c.6 (0.1)
| | | frames_per_packet{}: 0x2c.6-0x2d (0.2)
@ -330,8 +330,8 @@ $ fq -d mp4 dv opus.mp4
| | | toc{}: 0xa5-0x11e (121)
| | | config{}: 0xa5-0xa5.5 (0.5)
0x0a0| f8 | . | config: 31 0xa5-0xa5.5 (0.5)
| | | mode: "CELT-only"
| | | bandwidth: "FB"
| | | mode: "celt_only"
| | | bandwidth: "fb"
| | | frame_size: 20
0x0a0| f8 | . | stereo: false 0xa5.5-0xa5.6 (0.1)
| | | frames_per_packet{}: 0xa5.6-0xa6 (0.2)
@ -346,8 +346,8 @@ $ fq -d mp4 dv opus.mp4
| | | toc{}: 0x11e-0x197 (121)
| | | config{}: 0x11e-0x11e.5 (0.5)
0x110| f8 | . | config: 31 0x11e-0x11e.5 (0.5)
| | | mode: "CELT-only"
| | | bandwidth: "FB"
| | | mode: "celt_only"
| | | bandwidth: "fb"
| | | frame_size: 20
0x110| f8 | . | stereo: false 0x11e.5-0x11e.6 (0.1)
| | | frames_per_packet{}: 0x11e.6-0x11f (0.2)

View File

@ -244,7 +244,7 @@ $ fq -d mp4 dv vorbis.mp4
0x03d0| 10 | . | [1]: 16 lace 0x3d3-0x3d4 (1)
| | | packets[0:3]: 0x3d4-0x10b1 (3293)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| [0]{}: packet (vorbis_packet) 0x3d4-0x3f2 (30)
0x03d0| 01 | . | packet_type: "Identification" (1) 0x3d4-0x3d5 (1)
0x03d0| 01 | . | packet_type: "identification" (1) 0x3d4-0x3d5 (1)
0x03d0| 76 6f 72 62 69 73 | vorbis | magic: "vorbis" (valid) 0x3d5-0x3db (6)
0x03d0| 00 00 00 00 | .... | vorbis_version: 0 (valid) 0x3db-0x3df (4)
0x03d0| 02| .| audio_channels: 2 0x3df-0x3e0 (1)
@ -257,7 +257,7 @@ $ fq -d mp4 dv vorbis.mp4
0x03f0| 01 | . | padding0: raw bits (all zero) 0x3f1-0x3f1.7 (0.7)
0x03f0| 01 | . | framing_flag: 1 (valid) 0x3f1.7-0x3f2 (0.1)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| [1]{}: packet (vorbis_packet) 0x3f2-0x402 (16)
0x03f0| 03 | . | packet_type: "Comment" (3) 0x3f2-0x3f3 (1)
0x03f0| 03 | . | packet_type: "comment" (3) 0x3f2-0x3f3 (1)
0x03f0| 76 6f 72 62 69 73 | vorbis | magic: "vorbis" (valid) 0x3f3-0x3f9 (6)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| comment{}: (vorbis_comment) 0x3f9-0x401 (8)
0x03f0| 00 00 00 00 | .... | vendor_length: 0 0x3f9-0x3fd (4)
@ -268,7 +268,7 @@ $ fq -d mp4 dv vorbis.mp4
0x0400| 01 | . | padding0: raw bits (all zero) 0x401-0x401.7 (0.7)
0x0400| 01 | . | frame_bit: 1 (valid) 0x401.7-0x402 (0.1)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| [2]{}: packet (vorbis_packet) 0x402-0x10b1 (3247)
0x0400| 05 | . | packet_type: "Setup" (5) 0x402-0x403 (1)
0x0400| 05 | . | packet_type: "setup" (5) 0x402-0x403 (1)
0x0400| 76 6f 72 62 69 73 | vorbis | magic: "vorbis" (valid) 0x403-0x409 (6)
0x0400| 1c | . | vorbis_codebook_count: 29 0x409-0x40a (1)
0x0400| 42 43 56 | BCV | codecooke_sync: 0x564342 (valid) 0x40a-0x40d (3)
@ -373,17 +373,17 @@ $ fq -d mp4 dv vorbis.mp4
| | | [0]{}: track 0x2c-0x1dd (433)
| | | samples[0:3]: 0x2c-0x1dd (433)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| [0]{}: sample (vorbis_packet) 0x2c-0xe2 (182)
0x0020| be | . | packet_type: "Audio" (0) 0x2c-0x2d (1)
0x0020| be | . | packet_type: "audio" (0) 0x2c-0x2d (1)
0x0020| b7 f2 81| ...| data: raw bits 0x2d-0xe2 (181)
0x0030|46 74 15 42 0b 52 08 17 32 8e 43 08 65 84 84 f6|Ft.B.R..2.C.e...|
* |until 0xe1.7 (181) | |
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| [1]{}: sample (vorbis_packet) 0xe2-0x12e (76)
0x00e0| be | . | packet_type: "Audio" (0) 0xe2-0xe3 (1)
0x00e0| be | . | packet_type: "audio" (0) 0xe2-0xe3 (1)
0x00e0| 13 a2 9b 06 0a b6 ff 13 10 ff 25 62 ec| ..........%b.| data: raw bits 0xe3-0x12e (75)
0x00f0|8f d9 f7 a2 11 72 ca 44 3b 21 ba 69 a0 60 fb 3f|.....r.D;!.i.`.?|
* |until 0x12d.7 (75) | |
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| [2]{}: sample (vorbis_packet) 0x12e-0x1dd (175)
0x0120| be | . | packet_type: "Audio" (0) 0x12e-0x12f (1)
0x0120| be | . | packet_type: "audio" (0) 0x12e-0x12f (1)
0x0120| a7| .| data: raw bits 0x12f-0x1dd (174)
0x0130|f2 81 46 bb c2 48 52 08 27 b8 83 10 ca 08 b1 a7|..F..HR.'.......|
* |until 0x1dc.7 (174) | |

View File

@ -106,8 +106,8 @@ $ fq -d ogg dv opus.ogg
| | | toc{}: 0x0-0x12c (300)
| | | config{}: 0x0-0x0.5 (0.5)
0x000|f8 |. | config: 31 0x0-0x0.5 (0.5)
| | | mode: "CELT-only"
| | | bandwidth: "FB"
| | | mode: "celt_only"
| | | bandwidth: "fb"
| | | frame_size: 20
0x000|f8 |. | stereo: false 0x0.5-0x0.6 (0.1)
| | | frames_per_packet{}: 0x0.6-0x1 (0.2)
@ -122,8 +122,8 @@ $ fq -d ogg dv opus.ogg
| | | toc{}: 0x0-0xa0 (160)
| | | config{}: 0x0-0x0.5 (0.5)
0x000|f8 |. | config: 31 0x0-0x0.5 (0.5)
| | | mode: "CELT-only"
| | | bandwidth: "FB"
| | | mode: "celt_only"
| | | bandwidth: "fb"
| | | frame_size: 20
0x000|f8 |. | stereo: false 0x0.5-0x0.6 (0.1)
| | | frames_per_packet{}: 0x0.6-0x1 (0.2)
@ -138,8 +138,8 @@ $ fq -d ogg dv opus.ogg
| | | toc{}: 0x0-0x13b (315)
| | | config{}: 0x0-0x0.5 (0.5)
0x000|f8 |. | config: 31 0x0-0x0.5 (0.5)
| | | mode: "CELT-only"
| | | bandwidth: "FB"
| | | mode: "celt_only"
| | | bandwidth: "fb"
| | | frame_size: 20
0x000|f8 |. | stereo: false 0x0.5-0x0.6 (0.1)
| | | frames_per_packet{}: 0x0.6-0x1 (0.2)

View File

@ -127,7 +127,7 @@ $ fq -d ogg dv vorbis.ogg
| | | serial_number: 3971626214
| | | packets[0:7]: 0x3a-0x3a (0)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| [0]{}: packet (vorbis_packet) 0x0-0x1e (30)
0x000|01 |. | packet_type: "Identification" (1) 0x0-0x1 (1)
0x000|01 |. | packet_type: "identification" (1) 0x0-0x1 (1)
0x000| 76 6f 72 62 69 73 | vorbis | magic: "vorbis" (valid) 0x1-0x7 (6)
0x000| 00 00 00 00 | .... | vorbis_version: 0 (valid) 0x7-0xb (4)
0x000| 01 | . | audio_channels: 1 0xb-0xc (1)
@ -140,7 +140,7 @@ $ fq -d ogg dv vorbis.ogg
0x001| 01| | .| | padding0: raw bits (all zero) 0x1d-0x1d.7 (0.7)
0x001| 01| | .| | framing_flag: 1 (valid) 0x1d.7-0x1e (0.1)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| [1]{}: packet (vorbis_packet) 0x0-0x41 (65)
0x000|03 |. | packet_type: "Comment" (3) 0x0-0x1 (1)
0x000|03 |. | packet_type: "comment" (3) 0x0-0x1 (1)
0x000| 76 6f 72 62 69 73 | vorbis | magic: "vorbis" (valid) 0x1-0x7 (6)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| comment{}: (vorbis_comment) 0x7-0x40 (57)
0x000| 0d 00 00 00 | .... | vendor_length: 13 0x7-0xb (4)
@ -155,7 +155,7 @@ $ fq -d ogg dv vorbis.ogg
0x004|01| |.| | padding0: raw bits (all zero) 0x40-0x40.7 (0.7)
0x004|01| |.| | frame_bit: 1 (valid) 0x40.7-0x41 (0.1)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| [2]{}: packet (vorbis_packet) 0x0-0xc75 (3189)
0x000|05 |. | packet_type: "Setup" (5) 0x0-0x1 (1)
0x000|05 |. | packet_type: "setup" (5) 0x0-0x1 (1)
0x000| 76 6f 72 62 69 73 | vorbis | magic: "vorbis" (valid) 0x1-0x7 (6)
0x000| 22 | " | vorbis_codebook_count: 35 0x7-0x8 (1)
0x000| 42 43 56 | BCV | codecooke_sync: 0x564342 (valid) 0x8-0xb (3)
@ -164,21 +164,21 @@ $ fq -d ogg dv vorbis.ogg
0x001|24 73 18 2a 46 a5 73 16 84 10 1a 42 50 19 e3 1c|$s.*F.s....BP...| data: raw bits 0x10-0xc75 (3173)
* |until 0xc74.7 (end) (3173) | |
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| [3]{}: packet (vorbis_packet) 0x0-0x1f (31)
0x000|5c |\ | packet_type: "Audio" (0) 0x0-0x1 (1)
0x000|5c |\ | packet_type: "audio" (0) 0x0-0x1 (1)
0x000| dd ab 3a ab ba b0 ff 5a 02 04 10 00 c0 8c da| ..:....Z.......| data: raw bits 0x1-0x1f (30)
0x001|2d b6 37 df 7c f3 cd 30 0c c3 30 0c c3 7a 00| |-.7.|..0..0..z.||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| [4]{}: packet (vorbis_packet) 0x0-0x3c (60)
0x000|9a |. | packet_type: "Audio" (0) 0x0-0x1 (1)
0x000|9a |. | packet_type: "audio" (0) 0x0-0x1 (1)
0x000| d8 3d 07 6f d2 9e 5b 5c 05 66 22 40 2a 00 00| .=.o..[\.f"@*..| data: raw bits 0x1-0x3c (59)
0x001|00 00 00 00 00 00 00 00 00 fa fd 60 9f ce 01 d1|...........`....|
* |until 0x3b.7 (end) (59) | |
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| [5]{}: packet (vorbis_packet) 0x0-0x34 (52)
0x000|be |. | packet_type: "Audio" (0) 0x0-0x1 (1)
0x000|be |. | packet_type: "audio" (0) 0x0-0x1 (1)
0x000| d8 dd e6 ae 92 f7 23 3e 6f cc 0d 80 7a 00 00| ......#>o...z..| data: raw bits 0x1-0x34 (51)
0x001|00 00 01 06 00 00 00 00 00 00 e0 b9 05 42 5c 27|.............B\'|
* |until 0x33.7 (end) (51) | |
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| [6]{}: packet (vorbis_packet) 0x0-0x80 (128)
0x000|3e |> | packet_type: "Audio" (0) 0x0-0x1 (1)
0x000|3e |> | packet_type: "audio" (0) 0x0-0x1 (1)
0x000| 37 dd 37 fe ee 85 47 7c 3c 61 02 9b 31 06 f6| 7.7...G|<a..1..| data: raw bits 0x1-0x80 (127)
0x001|bb ef 9f 04 62 46 41 04 c0 c0 00 00 f0 3d f4 1d|....bFA......=..|
* |until 0x7f.7 (end) (127) | |

View File

@ -62,38 +62,38 @@ func opusDecode(d *decode.D) any {
bandwidth string
frameSize float64
}{
0: {"SILK-only", "NB", 10},
1: {"SILK-only", "NB", 20},
2: {"SILK-only", "NB", 40},
3: {"SILK-only", "NB", 60},
4: {"SILK-only", "MB", 10},
5: {"SILK-only", "MB", 20},
6: {"SILK-only", "MB", 40},
7: {"SILK-only", "MB", 60},
8: {"SILK-only", "WB", 10},
9: {"SILK-only", "WB", 20},
10: {"SILK-only", "WB", 40},
11: {"SILK-only", "WB", 60},
12: {"Hybrid", "SWB", 10},
13: {"Hybrid", "SWB", 20},
14: {"Hybrid", "FB", 10},
15: {"Hybrid", "FB", 20},
16: {"CELT-only", "NB", 2.5},
17: {"CELT-only", "NB", 5},
18: {"CELT-only", "NB", 10},
19: {"CELT-only", "NB", 20},
20: {"CELT-only", "WB", 2.5},
21: {"CELT-only", "WB", 5},
22: {"CELT-only", "WB", 10},
23: {"CELT-only", "WB", 20},
24: {"CELT-only", "SWB", 2.5},
25: {"CELT-only", "SWB", 5},
26: {"CELT-only", "SWB", 10},
27: {"CELT-only", "SWB", 20},
28: {"CELT-only", "FB", 2.5},
29: {"CELT-only", "FB", 5},
30: {"CELT-only", "FB", 10},
31: {"CELT-only", "FB", 20},
0: {"silk_only", "nb", 10},
1: {"silk_only", "nb", 20},
2: {"silk_only", "nb", 40},
3: {"silk_only", "nb", 60},
4: {"silk_only", "mb", 10},
5: {"silk_only", "mb", 20},
6: {"silk_only", "mb", 40},
7: {"silk_only", "mb", 60},
8: {"silk_only", "wb", 10},
9: {"silk_only", "wb", 20},
10: {"silk_only", "wb", 40},
11: {"silk_only", "wb", 60},
12: {"hybrid", "swb", 10},
13: {"hybrid", "swb", 20},
14: {"hybrid", "fb", 10},
15: {"hybrid", "fb", 20},
16: {"celt_only", "nb", 2.5},
17: {"celt_only", "nb", 5},
18: {"celt_only", "nb", 10},
19: {"celt_only", "nb", 20},
20: {"celt_only", "wb", 2.5},
21: {"celt_only", "wb", 5},
22: {"celt_only", "wb", 10},
23: {"celt_only", "wb", 20},
24: {"celt_only", "swb", 2.5},
25: {"celt_only", "swb", 5},
26: {"celt_only", "swb", 10},
27: {"celt_only", "swb", 20},
28: {"celt_only", "fb", 2.5},
29: {"celt_only", "fb", 5},
30: {"celt_only", "fb", 10},
31: {"celt_only", "fb", 20},
}
n := d.FieldU5("config")
config := configurations[n]

View File

@ -6,8 +6,8 @@ $ fq -d opus_packet dv opus-audio
| | | toc{}: 0x0-0x1b6 (438)
| | | config{}: 0x0-0x0.5 (0.5)
0x000|fc |. | config: 31 0x0-0x0.5 (0.5)
| | | mode: "CELT-only"
| | | bandwidth: "FB"
| | | mode: "celt_only"
| | | bandwidth: "fb"
| | | frame_size: 20
0x000|fc |. | stereo: true 0x0.5-0x0.6 (0.1)
| | | frames_per_packet{}: 0x0.6-0x1 (0.2)

View File

@ -1,7 +1,7 @@
# ffmpeg -f lavfi -i sine -t 10ms -f ogg pipe:1 | fq - '.steam[0].packet[0] | tobits' > vorbis-identifcation
$ fq -d vorbis_packet dv vorbis-identifcation
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: vorbis-identifcation (vorbis_packet) 0x0-0x1e (30)
0x00|01 |. | packet_type: "Identification" (1) 0x0-0x1 (1)
0x00|01 |. | packet_type: "identification" (1) 0x0-0x1 (1)
0x00| 76 6f 72 62 69 73 | vorbis | magic: "vorbis" (valid) 0x1-0x7 (6)
0x00| 00 00 00 00 | .... | vorbis_version: 0 (valid) 0x7-0xb (4)
0x00| 01 | . | audio_channels: 1 0xb-0xc (1)
@ -16,7 +16,7 @@ $ fq -d vorbis_packet dv vorbis-identifcation
# ffmpeg -f lavfi -i sine -t 10ms -f ogg pipe:1 | fq - '.packet[1] | tobits' > vorbis-comment
$ fq -d vorbis_packet dv vorbis-comment
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: vorbis-comment (vorbis_packet) 0x0-0x40 (64)
0x00|03 |. | packet_type: "Comment" (3) 0x0-0x1 (1)
0x00|03 |. | packet_type: "comment" (3) 0x0-0x1 (1)
0x00| 76 6f 72 62 69 73 | vorbis | magic: "vorbis" (valid) 0x1-0x7 (6)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| comment{}: (vorbis_comment) 0x7-0x3f (56)
0x00| 0d 00 00 00 | .... | vendor_length: 13 0x7-0xb (4)
@ -33,7 +33,7 @@ $ fq -d vorbis_packet dv vorbis-comment
# ffmpeg -f lavfi -i sine -t 10ms -f ogg pipe:1 | fq - '.packet[2] | tobits' > vorbis-setup
$ fq -d vorbis_packet dv vorbis-setup
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: vorbis-setup (vorbis_packet) 0x0-0xc75 (3189)
0x000|05 |. | packet_type: "Setup" (5) 0x0-0x1 (1)
0x000|05 |. | packet_type: "setup" (5) 0x0-0x1 (1)
0x000| 76 6f 72 62 69 73 | vorbis | magic: "vorbis" (valid) 0x1-0x7 (6)
0x000| 22 | " | vorbis_codebook_count: 35 0x7-0x8 (1)
0x000| 42 43 56 | BCV | codecooke_sync: 0x564342 (valid) 0x8-0xb (3)
@ -44,7 +44,7 @@ $ fq -d vorbis_packet dv vorbis-setup
# ffmpeg -f lavfi -i sine -t 10ms -f ogg pipe:1 | fq - '.packet[3] | tobits' > vorbis-audio
$ fq -d vorbis_packet dv vorbis-audio
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: vorbis-audio (vorbis_packet) 0x0-0x21 (33)
0x00|54 |T | packet_type: "Audio" (0) 0x0-0x1 (1)
0x00|54 |T | packet_type: "audio" (0) 0x0-0x1 (1)
0x00| dd cb ce aa 5e d8 7f 2d 01 42 00 a0 dd 71 77| ....^..-.B...qw| data: raw bits 0x1-0x21 (32)
0x10|8b ed cd 37 df 7c 33 3a 0c c3 30 0c c3 30 d4 50|...7.|3:..0..0.P|
0x20|02| |.| |

View File

@ -33,10 +33,10 @@ const (
)
var packetTypeNames = map[uint]string{
packetTypeAudio: "Audio",
packetTypeIdentification: "Identification",
packetTypeComment: "Comment",
packetTypeSetup: "Setup",
packetTypeAudio: "audio",
packetTypeIdentification: "identification",
packetTypeComment: "comment",
packetTypeSetup: "setup",
}
func vorbisDecode(d *decode.D) any {