Skip to content

Commit af285de

Browse files
Width, Height, Metadata in version 3.5
1 parent 4428ead commit af285de

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

ffv1.md

+64
Original file line numberDiff line numberDiff line change
@@ -1038,6 +1038,13 @@ Parameters( ) { |
10381038
ec | ur
10391039
intra | ur
10401040
} |
1041+
if (version == 3 && micro_version >= 5) { |{V3}
1042+
if ((version == 3 && micro_version >= 5) |{V4}
1043+
|| version >= 4) { |{V4}
1044+
width | ur
1045+
height | ur
1046+
Metadata( ) |
1047+
} |
10411048
} |
10421049
```
10431050
@@ -1070,6 +1077,7 @@ Meaning of micro_version for version 3:
10701077
|-------|:------------------------|
10711078
|0...3 | reserved\* |
10721079
|4 | first stable variant |
1080+
|5 | frame size and metadata |
10731081
|Other | reserved for future use |
10741082
10751083
\* development versions which may be incompatible with the stable variants.
@@ -1215,6 +1223,14 @@ Inferred to be 0 if not present.
12151223
|1 | Frames are independent (keyframes only) |
12161224
|Other | reserved for future use |
12171225
1226+
### width
1227+
1228+
0 if unspecified in the bitstream (provided by container)
1229+
1230+
### height
1231+
1232+
0 if unspecified in the bitstream (provided by container)
1233+
12181234
## Quantization Table Set
12191235
12201236
The Quantization Table Sets are stored by storing the number of equal entries -1 of the first half of the table (represented as `len - 1` in the pseudo-code below) using the method described in [Range Non Binary Values](#range-non-binary-values). The second half doesn’t need to be stored as it is identical to the first with flipped sign. `scale` and `len_count[ i ][ j ]` are temporary values used for the computing of `context_count[ i ]` and are not used outside Quantization Table Set pseudo-code.
@@ -1271,6 +1287,54 @@ QuantizationTable(i, j, scale) { |
12711287
12721288
`context_count[ i ]` indicates the count of contexts for Quantization Table Set `i`.
12731289
1290+
## Metadata
1291+
1292+
(Intro TODO). A tool using a bitstream conforming to this specification SHOULD prioritize metadata in the bitstream over metadata in the container.
1293+
1294+
```c
1295+
pseudo-code | type
1296+
--------------------------------------------------------------|-----
1297+
Metadata( ) { |
1298+
metadata_count | ur
1299+
for( i = 0; i < metadata_count; i++ ) { |
1300+
metadata_id | ur
1301+
metadata_type | ur
1302+
metadata_size [ i ] - 1 | ur
1303+
for( j = 0; j < metadata_size [ i ]; j++ ) { |
1304+
if (metadata_type == 0) |
1305+
metadata_content [ i ] [ j ] | br
1306+
if (metadata_type == 1) |
1307+
metadata_content [ i ] [ j ] | ur
1308+
if (metadata_type == 2) |
1309+
metadata_content [ i ] [ j ] | sr
1310+
} |
1311+
} |
1312+
} |
1313+
```
1314+
1315+
### metadata_count
1316+
1317+
### metadata_id
1318+
1319+
|value | metadata meaning |
1320+
|-------|:-----------------------------------------------------------------|
1321+
|0 | Range (1 = Broadcast, 2 = Full...) |
1322+
|1 | Primaries |
1323+
|2 | TransferCharacteristics |
1324+
|3 | MatrixCoefficients |
1325+
|4 | MaxCLL |
1326+
|5 | MaxFALL |
1327+
|6 | PrimaryRChromaticityX |
1328+
|... | (TODO) |
1329+
| | WhitePointChromaticityY |
1330+
| | ChromaSitingHorz |
1331+
| | Encoding library name and version (e.g. "Lavc57.107.100 ffv1") |
1332+
|Other | reserved for future use |
1333+
1334+
### metadata_type
1335+
1336+
### metadata_content
1337+
12741338
# Restrictions
12751339

12761340
To ensure that fast multithreaded decoding is possible, starting version 3 and if frame\_pixel\_width * frame\_pixel\_height is more than 101376, slice\_width * slice\_height MUST be less or equal to num\_h\_slices * num\_v\_slices / 4.

0 commit comments

Comments
 (0)