Subject: [AVT] H264 interleaving method

From: sona chalam <[email-masked]>
Date: Thu, 26 Apr 2007 06:39:05 -0700 (PDT)

Hello

I am trying to implement interleaved packetization
mode for a packet switched streaming(PSS) client.

I have gone through the RFC but not very clear about
when to start deinterleaving(arranging the received
NALs in decoding order).

Method 1 Sprop-interleaving-depth

As per my understanding  I can  start deinterleaving
once i receive N number of VCL NAL units.

So i will be accumualting NALs in my bufer and have a
count on the number of VCL NALs. Once I have N VCL NAL
units i will perform the logic of deinterleaving.

Please guide me whether my understanding of
Sprop-interleaving-depth is correct or not.

If it is correct how  ot handle packet loss cases. 

Example 
If Sprop-interleaving-depth is 30 and 
 I have received 20 VCL NALs and I miss few packets. 
Then i receive few more VCL NALs can i add it to the
same buffer  and wait till reaches 30 ?

Hoe to handle this?.

Basically I need to know on what basis i can start
deinterleaving?

Waiting for your reply.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

_______________________________________________
Audio/Video Transport Working Group
[email-masked]
https://www1.ietf.org/mailman/listinfo/avt

---

From: Magnus Westerlund <[email-masked]>
Date: Thu, 26 Apr 2007 18:36:15 +0200

> Basically I need to know on what basis i can start

First, we expect that you have deinterleave the packets on the fly when 
they arrive and put the NALU into the buffer. The issue is when to 
remove them from the buffer. Sprop-interleaving-depth provides an upper 
limit in regards to how many NALUs you need to buffer. However the 
sprop-max-don-diff can help a great deal. When the DON values for NALUS 
in the buffer has larger diff from the lowest to the highest is larger 
than the max-don-diff value then they are moved to the decoder. That way 
the packet loss will be handled as the next packet arrives and also if 
the sender likes to reduce its depth during the session he can do that 
by making the DON values sparse.

Cheers

Magnus Westerlund

IETF Transport Area Director & TSVWG Chair
----------------------------------------------------------------------
Multimedia Technologies, Ericsson Research EAB/TVM/M
----------------------------------------------------------------------
Ericsson AB                | Phone +46 8 4048287
Torshamsgatan 23           | Fax   +46 8 7575550
S-164 80 Stockholm, Sweden | mailto: [email-masked]
----------------------------------------------------------------------

---

From: sona chalam <[email-masked]>
Date: Fri, 27 Apr 2007 00:06:20 -0700 (PDT)

Hi Magnus 

Thanks for your reply.Can you clarify a bit more also

Still I have few queries.

sprop-max-don-diff method

I have issues here. since the sprop-max-don-diff is a
optional parameters it is not gauranteed that I will
get this sprop-don-diff value always.

Secondly If i arrange the NAL units in Absodn order
will it same as decoding order? Till DON value reaches
65536 both DON and AbsDon will be same ?

But how to handle when the  DON value reaching 65535. 

So in that case my Absdon  can become negative.

As per the formula given in the RFC 

If DON(m)<DON(n)  and n-m >32768

AbdDon(n)=Absdon(m) -(Don(m)+65536-Don(n)). 

How to handle this?.

I thought of rearranging the NAL  by ascending order
of DON  and i can send it to the decoder once it
reaches sprop-deinterleaving-depth is reached.

And also  i can over come the DON (roll over after
65526 if  i use 32 bit value for that.So that i can
simply arrange the DON in ascending order into my
buffer

And also in H264 interleaving is done between Staps or
Mtaps and with in an STAP or MTAP the NALs will be in
same order. 

Your inoput and suggestion is required.

--- Magnus Westerlund <[email-masked]>
wrote:

> remove them from the buffer.
> Sprop-interleaving-depth provides an upper

---

From: sona chalam <[email-masked]>
Date: Fri, 27 Apr 2007 01:59:12 -0700 (PDT)

Hi Mganus

In my previous mail i was refering some doubts in
AbsDon. 

I think i did a mistake while calculating AbsDon.
It never becomes negative. It won't wrap around like
DON.

So in that case I can always send the NALs in AbsDon
order
once my AbsDon-diff(m,n) is greates than
sprop-max-don-diff or Number of VCL NAL units greater
sprop-interleaving-depth.

So while calcualting sprop-deinterleaving-depth do i
ignore NON VCL NAL units?.

So please clarify my doubts?

1.For streaming session will the spop-max-don-diff
should always be present?

2.If I arrange the NALs in AbsDon order is it same as
decoding order?

3. Do I need to exclude the Non VCL NAL units while
counting the sprop-deinterleaving-depth?

Thanks Regards
K.Sonachalam.

 .
--- sona chalam <[email-masked]> wrote:

> > > count on the number of VCL NALs. Once I have N
> VCL
> > NAL
> > in the buffer has larger diff from the lowest to
> the
> > highest is larger

---

From: Magnus Westerlund <[email-masked]>
Date: Fri, 27 Apr 2007 14:27:54 +0200

> should always be present?

No, guarantees. As you say this is optional.

> 2.If I arrange the NALs in AbsDon order is it same as

decoding order is decoding order. The DON values are simply a wrapped 
representation of this.

> counting the sprop-deinterleaving-depth?

Good question, I can't remember. Does the RFC says something on this?

cheers

Magnus Westerlund