Skip to content

Commit

Permalink
Width, Height, Metadata in version 3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
JeromeMartinez committed Feb 7, 2018
1 parent 4428ead commit 6099a67
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions ffv1.md
Original file line number Diff line number Diff line change
Expand Up @@ -1038,6 +1038,11 @@ Parameters( ) { |
ec | ur
intra | ur
} |
if (version >= 3 && micro_version >= 5) { |
width - 1 | ur
height - 1 | ur
Metadata( ) |
} |
} |
```
Expand Down Expand Up @@ -1070,6 +1075,7 @@ Meaning of micro_version for version 3:
|-------|:------------------------|
|0...3 | reserved\* |
|4 | first stable variant |
|5 | frame size and metadata |
|Other | reserved for future use |
\* development versions which may be incompatible with the stable variants.
Expand Down Expand Up @@ -1271,6 +1277,52 @@ QuantizationTable(i, j, scale) { |
`context_count[ i ]` indicates the count of contexts for Quantization Table Set `i`.
## Metadata
```c
pseudo-code | type
--------------------------------------------------------------|-----
Metadata( ) { |
metadata_count | ur
for( i = 0; i < metadata_count; i++ ) { |
metadata_id | ur
metadata_type | ur
metadata_size - 1 | ur
for( j = 0; j < metadata_count; j++ ) { |
if (metadata_type == 0) |
metadata_content [ i ] [ j ] | br
if (metadata_type == 1) |
metadata_content [ i ] [ j ] | ur
if (metadata_type == 2) |
metadata_content [ i ] [ j ] | sr
} |
} |
} |
```

### metadata_count

### metadata_id

|value | metadata meaning |
|-------|:-----------------------------------------------------------------|
|0 | Range (1 = Broadcast, 2 = Full...) |
|1 | Primaries |
|2 | TransferCharacteristics |
|3 | MatrixCoefficients |
|4 | MaxCLL |
|5 | MaxFALL |
|6 | PrimaryRChromaticityX |
|... | (TODO) |
| | WhitePointChromaticityY |
| | ChromaSitingHorz |
| | Encoding library name and version (e.g. "Lavc57.107.100 ffv1") |
|Other | reserved for future use |

### metadata_type

### metadata_content

# Restrictions

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.
Expand Down

0 comments on commit 6099a67

Please sign in to comment.