Dash-Industry-Forum / DASH-IF-IOP

DASH-IF Interoperability Points issue tracker and document source code
32 stars 7 forks source link

How to determine correct value for `subsegmentStartsWithSAP`? #235

Open sandersaares opened 5 years ago

sandersaares commented 5 years ago

IOP v4.3 says that @subsegmentStartsWithSAP must be either 1 or 2. There is some text in chapter 3.2.11 that explains the difference but IOP does not really say how to determine the right value to use when packaging content. We should provide such guidance.

I do not know what the right thing to do here is - presumably the value can be derived by inspecting some BMFF box? Is there also a safe default? "If unsure, put 2"? I request proposed text from some more informed person here.

waqarz commented 5 years ago

This is currently implemented in conformance software based on Section 8.16.3.1 of ISO BMFF (14496-12):

• a SAP of type 1 or type 2 is indicated as a sync sample, or by sample_is_non_sync_sample equal to 0 in the movie fragment; • a SAP of type 3 is marked as a member of a sample group of type 'rap '; • a SAP of type 4 is marked as a member of a sample group of type 'roll' where the value of the roll_distance field is greater than 0.

sandersaares commented 5 years ago

How does one determine the difference between SAP type 1 and 2 when looking at an existing BMFF file? The pasted statement does not appear to make a difference.

RufaelDev commented 5 years ago

DASH spec is quite clear, and you can find similar definition in ISOBMFF SAP Type 1 corresponds to what is known in some coding schemes as a ”Closed GoP random access point” (in which all access units, in decoding order, starting from ISAP can be correctly decoded, resulting in a continuous time sequence of correctly decoded access units with no gaps) and in addition the access unit in decoding order is also the first access unit in presentation order.

A packager can get this value by inspecting the decoding time and presentation time of samples in the fmp4 file.

ZmGorynych commented 5 years ago

If the IDR frame is the first frame in presentation order, it is SAP type 1 If there are pictures prior to the IDR in presentation order which are after the IDR in decoding order (e.g. RADL in HEVC, B frames depending only on the next IDR in H.264), it is SAP type 2

sandersaares commented 4 years ago

If the IDR frame is the first frame in presentation order If there are pictures prior to the IDR in presentation order which are after the IDR in decoding orde

How should it be determined whether these statements are true/false?

I ask because when we speak of putting this value in the MPD, we are dealing with quite high level packaging logic - developers doing this might have no idea what "IDR frames" even are. We should publish some very explicit algorithm.