-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.txt
1848 lines (1151 loc) · 63.2 KB
/
index.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Audio/Video Transport Core Maintenance P.-A. Lemieux, Ed.
Internet-Draft Sandflow Consulting LLC
Intended status: Standards Track D. S. Taubman
Expires: 18 January 2025 University of New South Wales
17 July 2024
RTP Payload Format for sub-codestream latency JPEG 2000 streaming
draft-ietf-avtcore-rtp-j2k-scl-02
Abstract
This RTP payload format defines the streaming of a video signal
encoded as a sequence of JPEG 2000 codestreams. The format allows
sub-codestream latency, such that the first RTP packet for a given
codestream can be emitted before the entire codestream is available.
Status of This Memo
This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
This Internet-Draft will expire on 18 January 2025.
Copyright Notice
Copyright (c) 2024 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents (https://trustee.ietf.org/
license-info) in effect on the date of publication of this document.
Please review these documents carefully, as they describe your rights
and restrictions with respect to this document. Code Components
extracted from this document must include Revised BSD License text as
described in Section 4.e of the Trust Legal Provisions and are
provided without warranty as described in the Revised BSD License.
Lemieux & Taubman Expires 18 January 2025 [Page 1]
Internet-Draft Sub-codestream latency J2K over RTP July 2024
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Requirements Language . . . . . . . . . . . . . . . . . . . . 4
3. Media format description . . . . . . . . . . . . . . . . . . 4
4. Video signal description . . . . . . . . . . . . . . . . . . 5
5. Payload Format . . . . . . . . . . . . . . . . . . . . . . . 5
5.1. General . . . . . . . . . . . . . . . . . . . . . . . . . 5
5.2. RTP Fixed Header Usage . . . . . . . . . . . . . . . . . 7
5.3. Main Packet Payload Header . . . . . . . . . . . . . . . 8
5.4. Body Packet Payload Header . . . . . . . . . . . . . . . 14
6. JPEG 2000 codestream requirements . . . . . . . . . . . . . . 16
6.1. General . . . . . . . . . . . . . . . . . . . . . . . . . 16
7. Sender requirements . . . . . . . . . . . . . . . . . . . . . 16
7.1. Main Packet . . . . . . . . . . . . . . . . . . . . . . . 16
7.2. RTP Packet filtering . . . . . . . . . . . . . . . . . . 17
7.3. Resync point . . . . . . . . . . . . . . . . . . . . . . 17
7.4. PTSTAMP field . . . . . . . . . . . . . . . . . . . . . . 17
7.5. RES field . . . . . . . . . . . . . . . . . . . . . . . . 17
7.6. Extra information . . . . . . . . . . . . . . . . . . . . 18
7.7. Reserved values . . . . . . . . . . . . . . . . . . . . . 18
7.8. Extension values . . . . . . . . . . . . . . . . . . . . 18
7.9. Code-block caching . . . . . . . . . . . . . . . . . . . 18
8. Receiver . . . . . . . . . . . . . . . . . . . . . . . . . . 19
8.1. PTSTAMP . . . . . . . . . . . . . . . . . . . . . . . . . 19
8.2. QUAL . . . . . . . . . . . . . . . . . . . . . . . . . . 19
8.3. RES . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
8.4. Extra information . . . . . . . . . . . . . . . . . . . . 22
8.5. Reserved values . . . . . . . . . . . . . . . . . . . . . 23
8.6. Extension values . . . . . . . . . . . . . . . . . . . . 23
8.7. Code-block caching . . . . . . . . . . . . . . . . . . . 23
9. Media Type . . . . . . . . . . . . . . . . . . . . . . . . . 23
9.1. General . . . . . . . . . . . . . . . . . . . . . . . . . 23
9.2. Definition . . . . . . . . . . . . . . . . . . . . . . . 24
10. Mapping to the Session Description Protocol (SDP) . . . . . . 27
11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 27
12. Security considerations . . . . . . . . . . . . . . . . . . . 27
13. References . . . . . . . . . . . . . . . . . . . . . . . . . 27
13.1. Normative References . . . . . . . . . . . . . . . . . . 27
13.2. Informative References . . . . . . . . . . . . . . . . . 29
Appendix A. Pixel formats . . . . . . . . . . . . . . . . . . . 30
Appendix B. Signal formats . . . . . . . . . . . . . . . . . . . 32
Appendix C. Sample formats . . . . . . . . . . . . . . . . . . . 32
Appendix D. Summary of Changes (Informative) . . . . . . . . . . 33
D.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 33
D.2. Changes from draft-ietf-avtcore-rtp-j2k-scl-00 . . . . . 33
D.3. Changes from draft-ietf-avtcore-rtp-j2k-scl-01 . . . . . 33
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 33
Lemieux & Taubman Expires 18 January 2025 [Page 2]
Internet-Draft Sub-codestream latency J2K over RTP July 2024
1. Introduction
This RTP payload format specifies the streaming of a video signal
encoded as a sequence of JPEG 2000 codestreams.
In addition to supporting a variety of frame scanning techniques
(progressive, interlaced and progressive segmented frame) and image
characteristics, the payload format includes the following features
specifically designed for streaming applications:
* the payload format allows sub-codestream latency such that the
first RTP packet of a given codestream to be emitted before the
entire codestream is available. Specifically, the payload format
does not rely on the JPEG 2000 PLM and PLT marker segments for
recovery after RTP Packet loss since these markers can only be
written after the codestream is complete and are thus incompatible
with sub-codestream latency. Instead, the payload format includes
payload header fields (ORDH, ORDB, POS and PID) that indicates
whether the RTP packet contains a resynchronization (resync) point
and how a recipient can restart codestream processing from that
resync point. This contrasts with [RFC5371], which also specifies
an RTP payload format for JPEG 2000, but relies on codestream
structures that cannot be emitted until the entire codestream is
available.
* as in [RFC4175], the payload header contains an extension (ESEQ)
to the standard 16-bit RTP sequence number, enabling the payload
format to accommodate high data rates without ambiguity. This is
necessary as the standard sequence number will roll over very
quickly for high data rates likely to be encountered in this
application. For example, the standard sequence number will roll
over in 0.5 seconds with a 1-Gbps video stream with RTP Packet
sizes of at least 1000 octets, which can be a problem for
detecting loss and out-of-order packets particularly in instances
where the round-trip time is greater than the roll over period
(0.5 seconds in this example).
* the payload header optionally contains a temporal offset (PTSTAMP)
relative to the first RTP Packet with the same value of RTP
timestamp field (Section 5.2). The higher resolution of PTSTAMP
compared to the timestamp allows receivers to recover the sender's
clock more rapidly.
Finally, the payload format also makes use of the unique scalability
features of JPEG 2000 to allow a network agent or recipient to
discard resolutions and/or quality layers merely by inspecting
payload headers (QUAL and RES fields), without having to parse the
underlying codestream.
Lemieux & Taubman Expires 18 January 2025 [Page 3]
Internet-Draft Sub-codestream latency J2K over RTP July 2024
2. Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP
14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
3. Media format description
The following summarizes the structure of the JPEG 2000 codestream,
which is specified in detail at [jpeg2000-1].
NOTE: as described at Section 6, a JPEG 2000 codestream allows
capabilities defined in any part of the JPEG 2000 family of
standards, including those specified in [jpeg2000-2] and
[jpeg2000-15].
JPEG 2000 represents an image as one or more components, e.g., R, G
and B, each uniformly sampled on a common rectangular reference grid.
An image can be further divided into contiguous rectangular tiles
that are each independently coded and decoded.
JPEG 2000 codes each image as a standalone codestream. Each
codestream consists of (i) marker segments, which contain coding
parameters and metadata, and (ii) coded data.
The codestream starts with an SOC marker segment and ends with an EOC
marker segment. The main header of the codestream consists of marker
segments between the SOC and first SOT marker segment and contains
information that applies to the codestream in its entirety. It is
generally impossible to decode a codestream without its main header.
The rest of the codestream consists of additional marker segments
(tile-part headers) interleaved with coded image data.
The coded image data ultimately consists of code-blocks, each
containing coded samples belonging to a rectangular (spatial) region
within one resolution level of one component. Code-blocks are
further collected into precincts, which, accordingly, represents
code-blocks belonging to a spatial region within one resolution level
of one component.
The image coded data can be arranged into several progression orders,
which dictates which aspect of the image appears first in the
codestream (in terms of byte offset). The progression orders are
parameterized according to:
Lemieux & Taubman Expires 18 January 2025 [Page 4]
Internet-Draft Sub-codestream latency J2K over RTP July 2024
Position (P) The first lines of the image come before the last lines
of the image.
Component (C) The first component of the image come before the last
component of the image.
Resolution Layer (R) The information needed to reconstruct the lower
spatial resolutions of the image come before the information
needed to reconstruct the higher spatial resolutions of the image.
Quality Layer (L) The information needed to reconstruct the most-
significant bits of each sample come before the information needed
to reconstruct the least-significant bit of each sample.
For example, in the PRCL progression order, the information needed to
reconstruct the first lines of the image come before that needed to
reconstruct the last lines of the image and, within a collection of
lines, the information needed to reconstruct the lower spatial
resolutions of the image come before the information needed to
reconstruct the higher spatial resolutions. This progression order
is particular useful for sub-frame latency operations.
4. Video signal description
This RTP payload format supports three distinct video frame scanning
techniques:
* Progressive frame
* Interlaced frame, where each frame consists of two fields. Field
1 occurs temporarily before Field 2. The height in lines of each
field is half the height of the image.
* Progressive segmented frame (PsF), where each frame consists of
two segments. Segment 1 contains the odd lines (1, 3, 5, 7,...)
of a frame and Segment 2 contains the even lines (2, 4, 6, 8,...)
of the same frame, where lines from the top of the frame to the
bottom of the frame are numbered sequentially starting at 1.
All frames are scanned left to right, top to bottom.
5. Payload Format
5.1. General
Lemieux & Taubman Expires 18 January 2025 [Page 5]
Internet-Draft Sub-codestream latency J2K over RTP July 2024
<----------- Codestream (image) --------->
| |
< Extended Header > |
| | |
+-----+-----+-----+------------//--+-----+-----+---------
| SOC | ... | SOD | .............. | EOC | P | SOC ...
+-----+-----+-----+------------//--+-----+-----+---------
| |
| |
| |
+---------------------+------+-//--+-----------+---------
Packets | Main | Body | ... | Body | Main ...
+---------------------+------+-//--+-----------+---------
SOC = Start of codestream marker
SOD = Start of data marker
EOC = End of codestream marker
P = (Optional) padding bytes
Figure 1: Packetization of a sequence of JPEG 2000 codestreams
(not to scale).
Each RTP packet, as specified at [RFC3550], is either a Main Packet
or a Body Packet.
A Main Packet consists of the following ordered sequence of
structures concatenated without gaps:
* the RTP Fixed Header;
* a Main Packet Payload Header, as specified at Section 5.3; and
* the payload, which consists of a JPEG 2000 codestream fragment.
A Body Packet consists of the following ordered sequence of
structures concatenated without gaps:
* the RTP Fixed Header;
* a Body Packet Payload Header, as specified at Section 5.4; and
* the payload, which consists of a JPEG 2000 codestream fragment.
When concatenated, the sequence of JPEG 2000 codestream fragments
emitted by the sender MUST be a sequence of JPEG 2000 codestreams
where two successive JPEG 2000 codestreams MAY be separated by one or
more arbitrary padding bytes (see Figure 1).
Lemieux & Taubman Expires 18 January 2025 [Page 6]
Internet-Draft Sub-codestream latency J2K over RTP July 2024
The JPEG 2000 codestreams MUST conform to Section 6.
The padding bytes MUST be ignored by the recipient.
NOTE: Padding bytes can be used to achieve constant bit rate
transmission.
A JPEG 2000 codestream consists of the bytes between, and including,
the SOC and EOC markers, as defined in [jpeg2000-1].
A JPEG 2000 codestream fragment does not necessarily contain complete
JPEG 2000 packets, as defined in [jpeg2000-1].
A JPEG 2000 codestream Extended Header consists of the bytes between,
and including, the SOC marker and the first SOD marker.
The payload of a Body Packet MUST NOT contain any bytes of the JPEG
2000 codestream Extended Header.
The payload of a Main Packet MUST contain at least one byte of the
JPEG 2000 codestream Extended Header and MAY contain bytes other than
those of the JPEG 2000 codestream Extended Header.
A payload MUST NOT contain bytes from more than one JPEG 2000
codestream.
5.2. RTP Fixed Header Usage
The following RTP header fields have a specific meaning in the
context of this payload format:
marker
1 The payload contains an EOC marker.
0 Otherwise
timestamp
The timestamp is the presentation time of the image to which the
payload belongs.
The timestamp clock rate is 90 kHz.
The timestamp of successive progressive frames MUST advance at
regular increments based on the instantaneous video frame rate.
Lemieux & Taubman Expires 18 January 2025 [Page 7]
Internet-Draft Sub-codestream latency J2K over RTP July 2024
The timestamp of Field 1 of successive interlaced frames MUST
advance at regular increments based on the instantaneous video
frame rate, and the Timestamp of Field 2 MUST be offset from the
timestamp of Field 1 by one half of the instantaneous frame
period.
The timestamp of both segments of a progressive segmented frame
MUST be equal.
timestamp of all RTP packets of a given image MUST be equal.
sequence number
The low-order bits of the RTP sequence number.
The higher order bits of the RTP sequence number are contained in
the ESEQ field, which is specified at Section 5.3.
The RTP sequence number is calculated as follows:
ESEQ * 65536 + sequence number
5.3. Main Packet Payload Header
Figure 2 specifies the structure of the payload header. Fields are
interpreted as unsigned binary integers in network order.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|MH | TP |ORDH |P|XTRAC| PTSTAMP | ESEQ |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|R|S|C| RSVD |*| PRIMS | TRANS | MAT |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| XTRAB |
| ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* RANGE
Figure 2: Structure of the Main Packet Payload Header
MH (Codestream Main Header Presence)
0
The RTP Packet is a Body Packet.
1
The RTP Packet is a Main Packet and the codestream has more
than one Main Packet. The next RTP Packet is a Main Packet.
Lemieux & Taubman Expires 18 January 2025 [Page 8]
Internet-Draft Sub-codestream latency J2K over RTP July 2024
2
The RTP Packet is a Main Packet and the codestream has more
than one Main Packet. The next RTP Packet is a Body Packet.
3
The RTP Packet is a Main Packet and the codestream has exactly
one Main Packet.
TP (Image Type)
Indicates the scanning structure of the image to which the payload
belongs.
0
Progressive frame.
1
Field 1 of an interlaced frame, where the first line of the
field is the first line of the frame.
2
Field 2 of an interlaced frame, where the first line of the
field is the second line of the frame.
3
Field 1 of an interlaced frame, where the first line of the
field is the second line of the frame.
4
Field 2 of an interlaced frame, where the first line of the
field is the first line of the frame.
5
Segment 1 of a progressive segmented frame, where the first
line of the image is the first line of the frame.
6
Segment 2 of a progressive segmented frame, where the first
line of the image is the second line of the frame.
7
Extension value. See Section 8.6 and Section 7.8.
ORDH (Progression Order [Main Packet])
Specifies the progression order used by the codestream and whether
resync points are signaled.
Lemieux & Taubman Expires 18 January 2025 [Page 9]
Internet-Draft Sub-codestream latency J2K over RTP July 2024
0
Resync points are not necessarily signaled. The progression
order can vary over the codestream.
1
The progression order is LRCP for the entire codestream. The
first resync point is specified in every Body Packet that
contains one or more resync points.
2
The progression order is RLCP for the entire codestream. The
first resync point is specified in every Body Packet that
contains one or more resync points.
3
The progression order is RPCL for the entire codestream. The
first resync point is specified in every Body Packet that
contains one or more resync points.
4
The progression order is PCRL for the entire codestream. The
first resync point is specified in every Body Packet that
contains one or more resync points.
5
The progression order is CPRL for the entire codestream. The
first resync point is specified in every Body Packet that
contains one or more resync points.
6
The progression order is PRCL for the entire codestream. The
first resync point is specified in every Body Packet that
contains one or more resync points.
7
The progression order can vary over the codestream. The first
resync point is specified in every Body Packet that contains
one or more resync points.
ORDH MUST be 0 is the codestream consists of more than one tile.
NOTE: Only ORDH = 4 and ORDH = 6 allow sub-codestream latency
streaming.
NOTE: Progression order PRCL is defined in [jpeg2000-2]. The
other progression orders are specified in [jpeg2000-1].
P (Precision Timestamp Presence)
Lemieux & Taubman Expires 18 January 2025 [Page 10]
Internet-Draft Sub-codestream latency J2K over RTP July 2024
0
PTSTAMP is not used.
1
PTSTAMP is used.
XTRAC (Extension Payload Length)
Length, in multiples of 4 bytes, of the XTRAB field.
PTSTAMP (Precision Timestamp)
PTSTAMP = (timestamp + TOFF) mod 4096, if P = 1 in the Main Packet
of this codestream.
TOFF is the transmission time of this RTP Packet, in the timebase
of the timestamp clock and relative to the first packet with the
same timestamp value.
TOFF = 0 in the first RTP Packet with the same timestamp value.
PTSTAMP = 0, if P = 0 in the Main Packet of this codestream.
NOTE: As described at Section 7.4 and Section 8.1, PTSTAMP is
intended to improve clock recovery at the receiver and only
applies when the transmission time of two consecutive RTP packets
with identical timestamp fields differ by no more than 45 ms =
4095/90,000. [RFC5450] provides addresses the general case when a
RTP packet is transmitted at a time other than its nominal
transmission time.
ESEQ (Extended Sequence Number)
The high order bits of the RTP sequence number.
Section 5.2 specifies the The low-order bits of the RTP sequence
number and the formula to compute the RTP sequence number
R (Codestream Main Header Reuse)
Determines whether Main Packet and codestream header information
can be reused across codestreams.
1
All Main Packets in this stream, as identified by its SSRC
value:
* MUST have identical Main Packet Payload Headers, with the
exception of their TP, MH, ESEQ and PTSTAMP fields;
Lemieux & Taubman Expires 18 January 2025 [Page 11]
Internet-Draft Sub-codestream latency J2K over RTP July 2024
* MUST contain the same codestream main header information,
with the exception of the SOT and COM marker segments, and
any pointer marker segments; and
* MUST NOT contain bytes other than Extended Header bytes.
0
Otherwise
S (Parameterized Colorspace Presence)
0
Component colorimetry is not specified, and left to the session
or the application.
PRIMS, TRANS and MAT and RANGE MUST be zero.
1
Component colorimetry is specified by the PRIMS, TRANS and MAT
and RANGE fields.
The codestream components MUST conform to one of the
combinations at Table 1.
Lemieux & Taubman Expires 18 January 2025 [Page 12]
Internet-Draft Sub-codestream latency J2K over RTP July 2024
+===================================+====================+
| Combination name | Component index |
| +====+=====+=====+===+
| | 0 | 1 | 2 | 3 |
+===================================+====+=====+=====+===+
| Y | Y | | | |
+===================================+----+-----+-----+---+
| YA | Y | A | | |
+===================================+----+-----+-----+---+
| RGB | R | G | B | |
+===================================+----+-----+-----+---+
| RGBA | R | G | B | A |
+===================================+----+-----+-----+---+
| YCbCr | Y | C_B | C_R | |
+===================================+----+-----+-----+---+
| YCbCrA | Y | C_B | C_R | A |
+===================================+----+-----+-----+---+
| The channel A is an opacity channel. The minimum |
| sample value (0) indicates a completely transparent |
| sample, and the maximum sample value (as determined by |
| the bit depth of the codestream component) indicates a |
| completely opaque sample. The opacity channel MUST |
| map to a component with unsigned samples. |
+--------------------------------------------------------+
Table 1: Mapping of codestream components to color
channels
C (Code-block Caching Usage)
0
Code-block caching is not in use.
1
Code-block caching is in use.
R MUST be equal to 1.
RSVD (Reserved)
Reserved value. See Section 8.5 and Section 7.7.
RANGE (Video Full Range Usage)
Value of the VideoFullRangeFlag specified in [rec-itu-t-h273]
PRIMS (Color Primaries)
One of the ColourPrimaries values specified in [rec-itu-t-h273]
Lemieux & Taubman Expires 18 January 2025 [Page 13]
Internet-Draft Sub-codestream latency J2K over RTP July 2024
TRANS (Transfer Characteristics)
One of the TransferCharacteristics values specified in
[rec-itu-t-h273]
MAT (Color Matrix Coefficients)
One of the MatrixCoefficients values specified in [rec-itu-t-h273]
XTRAB (Extension Payload)
Allows the contents of the Main Packet Payload Header to be
extended in the future. See Section 8.4 and Section 7.6.
5.4. Body Packet Payload Header
Figure 3 specifies the structure of the Body Packet Payload Header.
Fields are interpreted as unsigned binary integers in network order.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|MH | TP |RES |*|QUAL | PTSTAMP | ESEQ |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| POS | PID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* ORDB
Figure 3: Structure of the Body Packet Payload Header
MH
See Section 5.3.
TP
See Section 5.3.
RES (Resolution Layers)
0
The payload can contribute to all resolution layers.
Otherwise
The payload contains at least one byte of one JPEG 2000 packet
belonging to resolution level (N_L + RES - 7) but does not
contain any byte of any JPEG 2000 packet belonging to lower
resolution levels. N_L is the number of decomposition levels
of the codestream.
ORDB (Progression Order [Body Packet]
0
No resync point is specified for the payload.
Lemieux & Taubman Expires 18 January 2025 [Page 14]
Internet-Draft Sub-codestream latency J2K over RTP July 2024
1
The payload contains a resync point.
ORDB MUST be 0 is the codestream consists of more than one tile.
QUAL (Quality Layers)
0
The payload can contribute to all quality layers.
Otherwise
The payload contributes only to quality layer index QUAL or
above.
PTSTAMP
See Section 5.3.
ESEQ
See Section 5.3.
POS (Resync Point Offset)
Byte offset from the start of the payload to the first byte of the
resync point belonging to the precinct identified by PID.
POS MUST be 0 if ORDB = 0.
PID (Precinct Identifier)
Unique identifier of the precinct of the resync point.
PID = c + s * num_components
where:
* _c_ is the index (starting from 0) of the image component to
which the precinct belongs;
* _s_ is a sequence number which identifies the precinct within
its tile-component; and
* _num_components_ is the number of components of the codestream.
If PID is present, the payload MUST NOT contain codestream bytes
from more than one precinct.
PID MUST be 0 if ORDB = 0.
NOTE: PID is identical to precinct identifier I specified in
[jpeg2000-9].
Lemieux & Taubman Expires 18 January 2025 [Page 15]
Internet-Draft Sub-codestream latency J2K over RTP July 2024
6. JPEG 2000 codestream requirements
6.1. General
The JPEG 2000 codestream MAY include capabilities beyond those
specified at [jpeg2000-1], including those specified in [jpeg2000-2]
and [jpeg2000-15].
NOTE: The Rsiz parameter and CAP marker segments of each JPEG 2000
codestream contain detailed information on the capabilities necessary
to decode the codestream.
NOTE: The caps media type parameter defined in Section 9.2 allows
applications to signal required device capabilities.
NOTE: The block coder specified at [jpeg2000-15] improves throughput
and reduces latency compared to the original arithmetic block coder
defined in [jpeg2000-1].
For interlaced or progressive segmented frames, the height specified
in the JPEG 2000 main header MUST be the height in lines of the field
or the segment, respectively.
If any decomposition level involves only horizontal decomposition
then no decomposition level MUST involve only vertical decomposition;
and conversely, if any decomposition level involves only vertical
decomposition then no decomposition level MUST involve only
horizontal decomposition.
7. Sender requirements
7.1. Main Packet
Only Main Packets MAY contain bytes of the JPEG 2000 codestream
Extended Header.
The sender MUST either emit a single Main Packet with MH = 3, or one
or more Main Packets with MH = 1 followed by a single Main Packet
with MH = 2.
The Main Packet Payload Headers fields MUST be identical in all Main
Packet of a given codestream, with the exception of:
* MH;
* ESEQ; and
* PTSTAMP.
Lemieux & Taubman Expires 18 January 2025 [Page 16]
Internet-Draft Sub-codestream latency J2K over RTP July 2024
7.2. RTP Packet filtering
A network agent MAY strip out RTP Packet from a codestream that are
of no interest to a particular client, e.g., based on a resolution or
a spatial region of interest. Such a network agent SHOULD include a
CSRC identifier to identify the SSRC field of the original source
from which content was stripped.
7.3. Resync point
A resync point is the first byte of JPEG 2000 packet header data for
a precinct and for which PID < 2^24.
NOTE: Resync points cannot be specified if the codestream consists of
more than one tile (ORDB and ORDH are both equal to zero).
NOTE: A resync point can be used by a receiver to process a
codestream even if earlier packets in the codestream have been
corrupted, lost or deliberately discarded by a network agent. As a
corollary, resync points can be used by a network agent to discard
packets that are not relevant to a given rendering resolution or
region of interest. Resync points play a role similar to pointer
marker segments, albeit tailored for high bandwidth low latency
streaming applications.
7.4. PTSTAMP field
A sender SHOULD set P = 1, but only if it can generate PTSTAMP
accurately.
PTSTAMP can be derived from the same clock that is used to produce
the 32-bit timestamp field in the RTP fixed header. Specifically, a
sender maintains, at least conceptually, a 32-bit counter that is
incremented by a 90kHz clock. The counter is sampled at the point
when each RTP Packet is or SHOULD be at least notionally transmitted
and the 12 LSBs of the sample are stored in the PTSTAMP field.
If P = 1, then the transmission time TOFF (as defined at Section 5.3)
for two consecutive RTP packets with identical timestamp fields MUST
NOT differ by more than 4095.
7.5. RES field
A sender SHOULD set RES > 0 whenever possible.
NOTE: While a sender can always safely set RES = 0, this makes it
more difficult to discard packets based on resolution, as described
at Section 8.3.
Lemieux & Taubman Expires 18 January 2025 [Page 17]
Internet-Draft Sub-codestream latency J2K over RTP July 2024
7.6. Extra information
The sender MUST set the value of XTRAC to 0.
Future edition of this specification can permit other values.
7.7. Reserved values
The sender MUST set reserved values to 0.
Future edition of this specification can specify other values such
that these values can be ignored by receivers that conform to this
specification.
7.8. Extension values
A sender MUST NOT use an extension value.
7.9. Code-block caching
This section applies only if C = 1.
A sender can improve bandwidth efficiency by only occasionally
transmitting code-blocks corresponding to static portions of the
video and otherwise transmitting empty code-blocks. When C = 1, and
as described at Section 8.7, a receiver maintains a simple cache of
previously received code-blocks, which it uses to replace empty code-
blocks.
A sender alone determines which and when code-blocks are replaced
with empty code-blocks.
The sender cannot however determine with certainty the state of the
receiver's cache: some code-blocks might have been lost in transit,
the sender doesn't know exactly when the receiver started processing
the stream, etc.
A code-block is _empty_ if:
* it does not contribute code-bytes as specified in the parent JPEG
2000 packet header; or
* if the code-block conforms to [jpeg2000-15], contains an HT
cleanup segment and the first two bytes of the Magsgn byte-stream