Skip to content

Commit 665b35b

Browse files
author
Peter Bubestinger-Steindl
committed
Improved wording, typos.
1 parent 0d6e363 commit 665b35b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ffv1.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ a = b, a += b, a -= b, a *= b
175175

176176
### NumBytes
177177

178-
`NumBytes` is a non-negative integer that expresses the size in 8-bit octets of particular FFV1 `Configuration Record` or `Frame`. FFV1 relies on its `Container` to store the `NumBytes` values, see [the section on the `Mapping FFV1 into Containers`](#mapping-ffv1-into-containers).
178+
`NumBytes` is a non-negative integer that expresses the size in 8-bit octets of a particular FFV1 `Configuration Record` or `Frame`. FFV1 relies on its `Container` to store the `NumBytes` values, see [the section on the `Mapping FFV1 into Containers`](#mapping-ffv1-into-containers).
179179

180180
### Bitstream Functions
181181

@@ -501,7 +501,7 @@ The range coder can be used in 3 modes.
501501

502502
* In `Closed mode` the length in bytes of the bytestream is provided to the range decoder. Bytes beyond the length are read as 0 by the range decoder. This is generally 1 byte shorter than the open mode.
503503

504-
* In `Sentinel mode` the exact length in bytes is not known and thus the range decoder MAY read into the data the follows the range coded bytestream by one byte. In `Sentinel mode`, the end of the range coded bytestream is a binary symbol with state 129, which value SHALL be discarded. After reading this symbol, the range decoder will have read one byte beyond the end of the range coded bytestream. This way the byte position of the end can be determined. Bytestreams written in `Sentinel mode` can be read in `Closed mode` if the length can be determined, in this case the last (sentinel) symbol will be read non-corrupted and be of value 0.
504+
* In `Sentinel mode` the exact length in bytes is not known and thus the range decoder MAY read into the data that follows the range coded bytestream by one byte. In `Sentinel mode`, the end of the range coded bytestream is a binary symbol with state 129, which value SHALL be discarded. After reading this symbol, the range decoder will have read one byte beyond the end of the range coded bytestream. This way the byte position of the end can be determined. Bytestreams written in `Sentinel mode` can be read in `Closed mode` if the length can be determined, in this case the last (sentinel) symbol will be read non-corrupted and be of value 0.
505505

506506
Above describes the range decoding, encoding is defined as any process which produces a decodable bytestream.
507507

@@ -512,7 +512,7 @@ Third is the end of range coded Slices which need to terminate before the CRC at
512512

513513
#### Range Non Binary Values
514514

515-
To encode scalar integers, it would be possible to encode each bit separately and use the past bits as context. However that would mean 255 contexts per 8-bit symbol that is not only a waste of memory but also requires more past data to reach a reasonably good estimate of the probabilities. Alternatively assuming a Laplacian distribution and only dealing with its variance and mean (as in Huffman coding) would also be possible, however, for maximum flexibility and simplicity, the chosen method uses a single symbol to encode if a number is 0 and if not encodes the number using its exponent, mantissa and sign. The exact contexts used are best described by the following code, followed by some comments.
515+
To encode scalar integers, it would be possible to encode each bit separately and use the past bits as context. However that would mean 255 contexts per 8-bit symbol that is not only a waste of memory but also requires more past data to reach a reasonably good estimate of the probabilities. Alternatively assuming a Laplacian distribution and only dealing with its variance and mean (as in Huffman coding) would also be possible, however, for maximum flexibility and simplicity, the chosen method uses a single symbol to encode if a number is 0, and if not, encodes the number using its exponent, mantissa and sign. The exact contexts used are best described by the following code, followed by some comments.
516516

517517
```c
518518
pseudo-code | type
@@ -861,7 +861,7 @@ Parameters( ) { |
861861
### version
862862
863863
`version` specifies the version of the FFV1 bitstream.
864-
Each version is incompatible with others versions: decoders SHOULD reject a file due to unknown version.
864+
Each version is incompatible with other versions: decoders SHOULD reject a file due to an unknown version.
865865
Decoders SHOULD reject a file with version <= 1 && ConfigurationRecordIsPresent == 1.
866866
Decoders SHOULD reject a file with version >= 3 && ConfigurationRecordIsPresent == 0.
867867

0 commit comments

Comments
 (0)