Skip to content

Commit

Permalink
Specify JPEG XL codestream encapsulation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Traneptora committed Dec 8, 2023
1 parent 67c132b commit 32b6bbf
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions draft-avtransport-spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3640,6 +3640,66 @@ This structure is flexible enough to permit zero-copy or one-copy streaming
of video from most sources.


### JPEG XL codestream encapsulation ### {#jxl-encapsulation}

For JXL codestream streams, the [=codec_id=] in the
[[#stream-registration-packets]] must be ''0x4a584c20'' (''JXL '').

JXL streams require no [[#stream-configuration-packets]]. A JXL stream may
optionally contain a [[#stream-configuration-packets]]. The payload of such
a packet MUST start with a <code>u(32)</code> configuration identifier.

The only supported configuration identifier is ''0x6a786c6c'' (''jxll'').
The remainder of the configuration payload contains a <code>u(8)</code>
integer which equals the level of the signalled codestreams.

If a receiver receives an unsupported configuration identifier, it SHOULD
ignore it.

If no ''jxll'' stream configuration packet is present, codestreams are
assumed to be level 5.

The [=packet_data=] must contain a fragment of a JXL codestream. The
codestream Signature, SizeHeader, ImageMetadata, and encoded ICC profile
(if present) as well as any trailing zeroes needed to pad to a byte boundary,
these MUST be sent first as a whole packet, and the frame type MUST be
FRAME_TYPE_KEY.

If a preview frame is present in the codestream, it must occur next per [[ISO18181]].
The entire preview frame is sent as a packet with FRAME_TYPE_S.

The remainder of the JXL codestream is a sequence of one or more Frames, as they are
defined in [[ISO18181]]. Each Frame is sent in its own packet. A Frame of type kRegularFrame
or kSkipProgressive is sent as a packet with FRAME_TYPE_C1. A Frame of type kLFFrame
is sent as a packet with FRAME_TYPE_C2. A Frame of type kReferenceOnly is sent as a packet
with FRAME_TYPE_C3.

JXL codestreams may optionally be accompanied by JPEG Bitstream Reconstruction Data (JBRD).
JBRD is not part of a JXL codestream, but it may be sent with a JXL codestream. If JBRD is
present for a specific codetream, it may be sent as a packet with FRAME_TYPE_C4, but only
after all other frames for that JXL image have been sent.

All packets for a single JXL image MUST have the same PTS, and they MUST occur in the order
specified (after being possibly reordered by the receiver).

JXL codestreams encapsulated by this section MUST NOT be animated JXL codestreams. Codestreams
as used in this section are raw codestreams as defined in ISO181818-1. The container format
defined in ISO18181-2 is not supported.

If the AVTransport container signals that a JXL image is rotated, it is applied after the
orientation flag signalled by the JXL codestream.

If a JXL codestream is internally flagged as XYB-encoded, the color information signalled
by AVTransport SHOULD agree with the color information signalled by the codestream itself.
If they do not, the color information siganlled by the codestream itself takes precedence.

If a JXL image is internally flagged as not XYB-encoded, the color information signalled
by AVTransport MUST agree with the color information signalled by the codestream itself.

Animated JXL codestreams are not supported, but may be supported in a future version of this
standard. If such support does arrive, it will have a separate [=codec_id=].


### Custom codec encapsulation ### {#custom-codec-encapsulation}

A special section is dedicated for custom codec storage. While potentially useful
Expand Down

0 comments on commit 32b6bbf

Please sign in to comment.