Re: VP8 partition question

358 views
Skip to first unread message

Mamadou

unread,
Aug 3, 2012, 12:15:39 PM8/3/12
to discuss-webrtc
You're not looking at the right place. For RTP packetization:
http://tools.ietf.org/html/draft-ietf-payload-vp8-03
The right field is 'PartID' which takes 4bits. For more information:
'4.2. VP8 Payload Descriptor'
For example:
- Packetization:
http://code.google.com/p/doubango/source/browse/branches/2.0/doubango/tinyDAV/src/codecs/vpx/tdav_codec_vp8.c#636
- Depacketization:
http://code.google.com/p/doubango/source/browse/branches/2.0/doubango/tinyDAV/src/codecs/vpx/tdav_codec_vp8.c#345

On Aug 3, 4:17 pm, chrisgNH <cgo...@iocom.com> wrote:
> RFC 6386 Talks about multiple data partitions, and states in part: "A
> two-bit L(2) is used to indicate the number of
>    coefficient data partitions within a compressed frame.  The two bits
>    are defined in the following table..."
>
> My question is: Where are these two bits located in the data stream?  Will
> these 2 bits always be there - or only when there are more than the two
> default partitions?  I have VP8 encoding working, and I'm currently
> implementing RTP packetization.  I've looked at the ietf draft for VP8
> packetization as well.  While this does mention multiple data partitions,
> and that they will be contiguous in the bitstream, I'm unclear as to how to
> determine if there are more than 2 partitions.
>
> Any help would be appreciated.
> Thanks.

John Koleszar

unread,
Aug 3, 2012, 12:33:53 PM8/3/12
to discuss...@googlegroups.com
Assuming you're using libvpx, you tell the encoder how many partitions
to use with the VP8E_SET_TOKEN_PARTITIONS control. Also of interest is
the VPX_CODEC_USE_OUTPUT_PARTITION init-time flag, which is intended
to make RTP packetization easier by returning one partition at a time.
You probably don't want to try to parse the two bits directly, as
they're in the bool-coded part of the bitstream.
> --
>
>
>

Mamadou

unread,
Aug 3, 2012, 1:20:32 PM8/3/12
to discuss...@googlegroups.com
Looks like there is some changes in the latest WebRTC release impacting the VP8 encoder. Our code is no longer working: Chrome can decode our VP8 stream but we cannot decode chrome encoded packets. Error message: 'Corrupt frame detected'
Perhaps I'm missing something but the RTP packets from Chrome are not correct. For example:
First byte: 0x12
X=0 | R=0 |N=0 |S=1 |PartID=2
According to 'draft-ietf-payload-vp8-04' you cannot have 'S=1' and 'PartID#0'

On Friday, August 3, 2012 6:33:53 PM UTC+2, John Koleszar wrote:
Assuming you're using libvpx, you tell the encoder how many partitions
to use with the VP8E_SET_TOKEN_PARTITIONS control. Also of interest is
the VPX_CODEC_USE_OUTPUT_PARTITION init-time flag, which is intended
to make RTP packetization easier by returning one partition at a time.
You probably don't want to try to parse the two bits directly, as
they're in the bool-coded part of the bitstream.

Stefan Holmer

unread,
Aug 6, 2012, 3:44:30 AM8/6/12
to discuss...@googlegroups.com
I think what you are noticing is the use of the transmission time offset header extension. http://tools.ietf.org/html/rfc5450

The RTP header has been extended with 4 bytes, and therefore what you are parsing may not be the VP8 RTP header.

/Stefan

--
 
 
 

Reply all
Reply to author
Forward
0 new messages