mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-03-07 19:51:51 +09:00
more TAV doc
This commit is contained in:
@@ -988,8 +988,8 @@ transmission capability, and region-of-interest coding.
|
||||
The encoder supports following presets:
|
||||
- Sports: use finer temporal quantisation, resulting in better-preserved motion. Less effective as resolution goes up
|
||||
- Anime: instructs the decoder to disable grain synthensis
|
||||
- D1/D1PAL: encode to D1-compatible video. This mode overrides quantiser setting, audio format is fixed to PCMu8, resolution is fixed to D1/D1PAL, interlacing is forced, and produces header-less file. All extra packets (subtitles, metadata, etc.) are dropped.
|
||||
- D1P/D1PALP: same as D1/D1PAL but progressive mode is used.
|
||||
- D1/D1PAL: encode to TAV-DT (NTSC/PAL) format. Any non-compliant setup will be ignored and substituted to compliant values
|
||||
- D1P/D1PALP: encode to TAV-DT Progressive (NTSC/PAL) format. Any non-compliant setup will be ignored and substituted to compliant values
|
||||
|
||||
|
||||
## Packet Structure (some special packets have no payload. See Packet Types for details)
|
||||
@@ -1120,7 +1120,7 @@ The encoder supports following presets:
|
||||
precedence.
|
||||
|
||||
## Timecode Packet Structure
|
||||
uint8 Packet Type (0xFE)
|
||||
uint8 Packet Type (0xFD)
|
||||
uint64 Time since stream start in nanoseconds (this may NOT start from zero if the video is coming from a livestream)
|
||||
|
||||
## Screen Masking Packet Structure
|
||||
@@ -1603,6 +1603,44 @@ Number|Index
|
||||
4032|254
|
||||
4096|255
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
TSVM Advanced Video - Digital Tape (TAV-DT) Format
|
||||
Created by CuriousTorvald on 2025-12-01
|
||||
|
||||
TAV-DT is an extension to TAV format that is intended as filesystem-independent packetised video stream
|
||||
with easy syncing (playback can start from the arbitrary position and decoder can easily sync up to the
|
||||
start of the packet)
|
||||
|
||||
# Video Format
|
||||
- Dimension: 720x480 for NTSC, 720x576 for PAL
|
||||
- FPS: arbitrary (defined in packet header)
|
||||
- Wavelet: 9/7 Spatial, 5/3 Temporal
|
||||
- Decomposition levels: 4 spatial, 2 temporal
|
||||
- Quantiser and encoder quality level: arbitrary (defined in packet header as quality index)
|
||||
- Extra features:
|
||||
- Audio is mandatory (TAD codec only)
|
||||
- Everything else is unsupported
|
||||
- Video flags: Interlaced/NTSC framerate (defined in packet header)
|
||||
- Channel layout: Y-Co-Cg
|
||||
- Entropy coder: EZBC
|
||||
- Encoder preset: default preset only
|
||||
- Tiles: monoblock
|
||||
|
||||
# Packet Structure
|
||||
uint32 Sync pattern (0xE3537A1F for NTSC Dimension, 0xD193A745 for PAL Dimension)
|
||||
uint8 Framerate
|
||||
uint8 Flags
|
||||
- bit 0 = interlaced
|
||||
- bit 1 = is NTSC framerate
|
||||
- bit 4-7 = quality index
|
||||
int16 Reserved (zero-fill)
|
||||
uint32 Total packet size past header
|
||||
uint32 CRC-32 of 12-byte header
|
||||
uint64 Timecode (0xFD packet) without header byte
|
||||
* TAD packet (full 0x24 packet)
|
||||
* TAV packet (full 0x10 or 0x12 packet)
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -2385,6 +2385,7 @@ static int get_original_resolution(const char *input_file, int *width, int *heig
|
||||
// Parse resolution string like "1024x768" with keyword recognition
|
||||
static int parse_resolution(const char *res_str, int *width, int *height, const char *input_file) {
|
||||
if (!res_str) return 0;
|
||||
// Video standards
|
||||
if (strcmp(res_str, "cif") == 0 || strcmp(res_str, "CIF") == 0) {
|
||||
*width = 352;
|
||||
*height = 288;
|
||||
@@ -2505,6 +2506,7 @@ static int parse_resolution(const char *res_str, int *width, int *height, const
|
||||
*height = 540;
|
||||
return 1;
|
||||
}
|
||||
// TSVM Native
|
||||
if (strcmp(res_str, "half") == 0 || strcmp(res_str, "HALF") == 0) {
|
||||
*width = 280;
|
||||
*height = 224;
|
||||
@@ -2520,6 +2522,7 @@ static int parse_resolution(const char *res_str, int *width, int *height, const
|
||||
*height = DEFAULT_HEIGHT;
|
||||
return 1;
|
||||
}
|
||||
// No size change
|
||||
if (strcmp(res_str, "original") == 0 || strcmp(res_str, "ORIGINAL") == 0) {
|
||||
return get_original_resolution(input_file, width, height);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user