SynDB is a database schematic for light data rich hypermedia syndication.
Schemas
Canonical schemas
These schemas contain raw media data in a singular canonical format. These formats serve as master copies from which processed "composite" media formats can be created for various purposes and the constraints thereof.
Raster images
Field
|
Type
|
Description
|
id
|
u64
|
ID of the raster image.
|
w
|
u64
|
Width of image minus one, in pels.[1]
|
h
|
u64
|
Height of image minus one, in pels.[1]
|
colspace
|
enum : u4
|
Colour space in use.[2]
|
data
|
blob
|
Data payload, using the given colour space as its ABI.
|
Vector images
Field
|
Type
|
Description
|
id
|
u64
|
ID of the vector image.
|
w
|
u64
|
Nominal width of image minus one, in pels.[1]
|
h
|
u64
|
Nominal height of image minus one, in pels.[1]
|
data
|
blob
|
Data payload, using the PackVector format as its ABI.
|
Motion pictures
Field
|
Type
|
Description
|
id
|
u64
|
ID of the motion picture.
|
w
|
u32
|
Width of motion picture minus one, in pels.[3]
|
h
|
u32
|
Height of motion picture minus one, in pels.[3]
|
data
|
blob
|
Motion picture payload, stored as HEVC Main 10 Profile lossless in AVCC container format (MPEG-4 Part 15).
|
Waveform audio
Field
|
Type
|
Description
|
id
|
u64
|
ID of the waveform.
|
rate
|
u32
|
Sample rate of the waveform, in hertz.
|
depth
|
enum : u2
|
Bit depth of an audio sample.[4]
|
chcount
|
u3
|
Channel count minus one, thereby allowing anywhere from 1 to 8 channels.
|
ttl
|
u64
|
Total sample count.[5]
|
data
|
blob
|
Raw PCM waveform payload.
|
Text
Field
|
Type
|
Description
|
id
|
u64
|
ID of the text.
|
encoding
|
enum : u2
|
Content encoding of the text.[6]
|
data
|
blob
|
Data payload of the text, without any BOM.
|
Composite schemas
These schemas contain information particular to composite media formulations sourced from canonical "master copies" in tables following the schemas above. They are tailored to specific uses very close to the product level.
Animated images
Field
|
Type
|
Description
|
id
|
u64
|
ID of the animated image.
|
loop
|
bool
|
Whether the animation loops infinitely or not at all.
|
count
|
u32
|
Total number of frames in the animated image.
|
frames
|
u64[]
|
Ordered list of IDs to canonical raster images, constituting the animation frame list.
|
delays
|
u16[]
|
Ordered list of delays for each frame, denominated in centiseconds (10ms increments).
|
Web videos
Field
|
Type
|
Description
|
id
|
u64
|
ID of the video.
|
video
|
u64
|
ID of the canonical motion picture data source.
|
audio
|
u64
|
ID of the canonical waveform data source.
|
subs
|
u64
|
ID of the canonical text data, interpreted as SRT format subtitles.
|
Composition API
Animated images
Field
|
Type
|
Description
|
id
|
u64
|
ID of the animated image in the database table.
|
cent8crop
|
bool
|
Whether to do a centred crop to the nearest whole 8×8 width and height. This helps make more efficiently coded MP4s.
|
outfmt
|
enum : u2
|
Desired output format.[7]
|
outopts
|
union : outfmt
|
Options structs unionised to provide for each of the 4 possible output formats. structs within TBD.
|
s32 syn_compose_ani_mp4(
u64 id,
bl cent8crop,
u32 w,
u32 h,
enum { NEAREST, BILINEAR, BICUBIC, LANCZOS } resize_alg,
enum { FPS24, FPS30, FPS60 } fps,
u32 bitrate );
s32 syn_compose_ani_apng(
u64 id,
bl cent8crop,
u16 w,
u16 h,
enum { NEAREST, BILINEAR, BICUBIC, LANCZOS } resize_alg,
bl paletted,
bl crushed );
s32 syn_compose_ani_gif(
u64 id,
bl cent8crop,
u16 w,
u16 h,
enum { NEAREST, BILINEAR, BICUBIC, LANCZOS } resize_alg,
bl deep_pal,
bl crushed );
References
- ↑ 1.0 1.1 1.2 1.3 Allows for a range of 1 to 18,446,744,073,709,551,616 pels.
- ↑ Can be one of
GRAY1
=0, GRAY2
=1, GRAY4
=2, GRAY8
=3, GRAY16
=4, GRAY32
=5, RGB332
=6, RGBA4444
=7, RGB565
=8, RGBA5551
=9, RGBA8888
=10, RGBX1010102
=11, RGBA16161616
=12, YUV420
=13, YUV422
=14, or YUV444
=15.
- ↑ 3.0 3.1 Allows for a range of 1 to 4,294,967,296 pels.
- ↑ Can be one of
U8
=0, U16LE
=1, U24LE
=2 or U32LE
=3.
- ↑ This counts inter-channel samples, ergo 1 second of 44.1kHz audio is 44,100 samples regardless of the channel count.
- ↑ Can be one of
ASCII
=0, UTF8
=1, UTF16LE
=2, or UTF32LE
=3.
- ↑ Can be one of
MP4
=0, APNG
=1, MNG
=2 or GIF
=3.