Skip to content

Instantly share code, notes, and snippets.

@wader
Created June 21, 2023 17:34
Show Gist options
  • Save wader/7d119c4f7096fc3d14831c15ed50747e to your computer and use it in GitHub Desktop.
Save wader/7d119c4f7096fc3d14831c15ed50747e to your computer and use it in GitHub Desktop.
mpeg layer 3 header plus som test
meta:
id: mpeg_l3
seq:
- id: sync
type: b11
- id: mpeg_version
type: b2
enum: mpeg_version
- id: layer
type: b2
enum: mpeg_layer
- id: protection_absent
type: b1
- id: bitrate
type: b4
- id: sample_rate
type: b2
- id: padding
type: b1
- id: private
type: b1
- id: channels
type: b2
enum: channels
- id: channel_mode
type: b2
enum: channel_mode
- id: copyright
type: b1
- id: original
type: b1
- id: emphasis
type: b2
enum: emphasis
instances:
sample_count:
value: 123+1
a:
value: "[1,2,3]"
b:
value: a[1]
enums:
mpeg_version:
0b11: version_1
0b10: version_2
0b00: version_25
mpeg_layer:
0b11: layer_1
0b10: layer_2
0b01: layer_3
channels:
0b00: stereo
0b01: joint_stereo
0b10: dual
0b11: mono
channel_mode:
0b00: none
0b01: intensity stereo
0b10: ms_stereo
0b11: intensity_stereo_ms_stereo
emphasis:
0b00: none
0b01: "50_15"
0b10: reserved
0b11: "ccit_j.17"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment