diff --git a/draft-avtransport-spec.bs b/draft-avtransport-spec.bs index d14db28..48231b3 100644 --- a/draft-avtransport-spec.bs +++ b/draft-avtransport-spec.bs @@ -847,18 +847,21 @@ in the following manner: : STREAM_HEARING_IMPAIRED = 0x200 :: Stream is intended for hearing impaired audiences. - Note: If [=related_stream_id=] is not equal to [=stream_id=], both should be mixed in. + + Note: If [=related_stream_id=] is not equal to [=stream_id=], both should be mixed in. : STREAM_VISUALLY_IMPAIRED = 0x400 :: Stream is intended for visually impaired audiences. - Note: If [=related_stream_id=] is not equal to [=stream_id=], both should be mixed in. + + Note: If [=related_stream_id=] is not equal to [=stream_id=], both should be mixed in. : STREAM_NO_DIALOGUE = 0x800 :: Stream contains music and sound effects without voice. : STREAM_NON_DIEGETIC = 0x1000 :: Stream contains non-diegetic audio. - Note: If [=related_stream_id=] is not equal to [=stream_id=], both should be mixed in. + + Note: If [=related_stream_id=] is not equal to [=stream_id=], both should be mixed in. : STREAM_DESCRIPTIONS = 0x2000 :: Stream contains textual or spoken descriptions to the stream signalled in [=related_stream_id=]. @@ -1313,6 +1316,17 @@ the [[#codec-encapsulation]] addenda. :: Packet data is uncompressed : DATA_COMPRESSION_ZSTD = 0x1 :: Packet data is compressed with Zstandard, defined in IETF [[RFC8878]]. + + Note: Zstandard is a general purpose format, suitable for images, + audio, and binary data such as ICC or CUBE packets. Therefore, + it should be the preferred format for such payloads. + + : DATA_COMPRESSION_BROTLI = 0x2 + :: Packet data is compressed with Zstandard, defined in IETF [[RFC7932]]. + + Note: Brotli is more optimized for text rather than generic data, + and should be the preferred format for subtitles. Presently, it is + also more supported on the web. Any undefined values are hereby reserved and must not be present in a compliant @@ -1394,6 +1408,7 @@ FEC grouped streams MUST be registered first via a special packet:
(219 * E + 16) * 2([=bit_depth=]-8)
,
- where E
, the input range, is ''0.0'' to ''1.0'' for luma planes and
- ''-0.5'' to ''0.5'' for chroma planes. This means, for 8-bits, the luma
- range is 16-235 and the chroma range is 16-240.
+ (219 * E + 16) * 2([=bit_depth=]-8)
,
+ where E
, the input range, is ''0.0'' to ''1.0'' for luma planes and
+ ''-0.5'' to ''0.5'' for chroma planes. This means, for 8-bits, the luma
+ range is 16-235 and the chroma range is 16-240.
@@ -2466,7 +2484,7 @@ to interpret the value of [=field_id=] in stream data packet headers.
: ILACE_PROG = 0x0
:: Video contains progressive data, or interlacing does not apply.
- Note: in this mode, the [=field_id=] bit is free to use by users. Implementations must ignore it, and preserve it.
+ Note: in this mode, the [=field_id=] bit is free to use by users. Implementations must ignore it, and preserve it.
: ILACE_TFF = 0x1
:: Video is interlaced. One [[#stream-data-packets]] packet per field. If the data packet's [=field_id=] bit is unset, indicates the field contained is the top field, otherwise it's the bottom field.
@@ -2491,17 +2509,17 @@ the setting used, if the codec supports this.
: CHROMA_POS_LEFT = 0x1
:: Chroma position is between 2 luma samples on different lines.
- Note: This is the default chroma position for MPEG-2, H.263 with {{CHROMA_422}}, and H.264 with {{CHROMA_420}}.
+ Note: This is the default chroma position for MPEG-2, H.263 with {{CHROMA_422}}, and H.264 with {{CHROMA_420}}.
: CHROMA_POS_CENTER = 0x2
:: Chroma position is in the middle between all neighbouring luma samples on 2 lines.
- Note: This is the default chroma position for JPEG with {{CHROMA_420}}, and H.263 with {{CHROMA_420}}.
+ Note: This is the default chroma position for JPEG with {{CHROMA_420}}, and H.263 with {{CHROMA_420}}.
: CHROMA_POS_TOPLEFT = 0x3
:: Chroma position coincides with top left's luma sample position.
- Note: This is the default chroma position for MPEG-2 with {{CHROMA_422}}.
+ Note: This is the default chroma position for MPEG-2 with {{CHROMA_422}}.
: CHROMA_POS_TOP = 0x4
:: Chroma position is between 2 luma samples on the same top line.
diff --git a/libavtransport/output_packet.c b/libavtransport/output_packet.c
index 5b46f4f..61d6835 100644
--- a/libavtransport/output_packet.c
+++ b/libavtransport/output_packet.c
@@ -28,10 +28,16 @@
#include "output_packet.h"
+#include "../config.h"
+
#ifdef CONFIG_HAVE_LIBZSTD
#include