[ExtractStream] Possible end of ZSS development...

Jim Hauxwell james at d...
Thu, 18 Apr 2002 18:49:58 +0100


I am saying that you cannot ever decode the first 2 B frames of the
sequence, because you have not got the surrounding I or P frame. Your frame
order example is correct, and in fact you have just proved my point.

In your example

GOP IBBPBBPBBPBB GOP IBBPBBPBB
^^ These are not decodeable

And get :

GOP I P B B P B B P B B GOP I B B P B B P B B
1 4 2 3 7 5 6 10 8 9 13 11 12 16 14 15 19 17 18 <- these
values represent the temporal decode order

So in your example the Closed flag should be 0, as you do require the next I
frame in the subsiquent GOP to decode the two last B frames.

I have just finished processing the PES headers in my conversion software,
and I will probably move on to look at the GOP sequence, but I don't expect
any surprises in the temporal reference values.

Jim



-----Original Message-----
From: Edmond E. Shwayri [mailto:eshwayri@n...]
Sent: 18 April 2002 15:01
To: ExtractStream@yahoogroups.com
Subject: RE: [ExtractStream] Possible end of ZSS development...


So you are saying toss out the first 2 B-Frames and that in fact the 3rd
and 4th B frames actually are the ones that reference the I and P
frame. So start with :

GOP IBBPBBPBBPBB GOP IBBPBBPBB

And get :

GOP IPBBPBBPBB GOP IBBPBBPBB

A problem with your theory is that if you were correct then the GOPs above
would be in a closed state because the final 2 B frames in the sequence
would only refer to frames within the GOP. The "Closed" flag on the GOP in
the TiVo stream is set to 0 indicating that the last B-Frames do require
the next I-Frame to decode properly.

Here they are :

GOP1 : 00 00 01 B8 00 00 00 00
GOP2 : 00 00 01 B8 00 00 07 80

Looking at the TiVo stream and knowing that according to the GOP1 B5 and B6
need I2 to decode :

I1 B1 B2 P1 B3 B4 P2 B5 B6 GOP I2

B5, B6 need I2 and P2
B3, B4 need P2 and P1
B1, B2 need P1 and I1

Hence the order is NOT in the standard IPBB order, but in IBBP order. The
MPEG decoder is probably figuring it out exactly the way I did. This may
also explain why some players/decoders don't like the TiVo stream and
others deal with it.

At 02:06 AM 4/18/02, you wrote:
>Hi,
>
>Just reading your mail, and I noticed a point in which you mention
>re-ordering the IPB frames. Why on earth do you want to do this? They are
>in the correct order already (from what I have gathered).
>If you are making this assumption based on the fact that the first GOP of a
>standard mpeg produced stream runs
>
>IPBBPBBPBBPBBPBBPBBIBBPBBPBBPBBPBBP
>
> ^
> notice here - do you see that the sequence gets into a
>familiar pattern?
>
>and you assume that Tivo is
>
>IBBPBBPBBPBBPBBP....
>
>so must need re-ordering then this is not correct.
>
>The MPEG2 specification says that B frames are reconstructed against the
>previous and next I or P frame. In the case of the Tivo stream, if you
>number the frames the actual order would be
>
>1xx423756....
>
>Without looking into it at some great length I couldn't say 100% that this
>is correct in the case of the Tivo, but as a standard Tivo stream decodes
on
>a reference MPEG2 decoder (without errors) then I can say with some
>certainty that the stream is a valid ES.
>
>Jim
>
>-----Original Message-----
>From: Roger Merchberger [mailto:zmerch7@y...]
>Sent: 18 April 2002 01:12
>To: ExtractStream@yahoogroups.com
>Subject: [ExtractStream] Possible end of ZSS development...
>
>
>Holymygoodness! Don't let that scare you... I'm not leaving the
>scene or moving to Antarctica or anything, but I think I've finally
>gone beyond the "know just enough to be dangerous" stage & am ready
>to totally redefine the structure of the splitstream/zss code.
>
>I've been making changes to zss 0.56 (no, it's a hack so it's not on
>the webpage) to get it to figure out the GOP frame timestamps and I
>think I've [eek] succeeded [first time I've diddled with bitshifting
>in C!] -- except -- with Edmond's help, I've figured out that the
>MPEG video frame breaks & the Tivo video frame breaks are nowhere
>near a 1:1 ratio - including [but not limited to] the GOP headers.
>:-(
>
>Splitstream (and of course zss) is set up to: 1) slurp in a chunk 2)
>spit out A & V 3) throw away the rest, 4) rinse & repeat. Getting the
>Video to split on GOP headers, the possible reorganizing of I, P & B
>frames to a different order (if necessary) and other things would be
>just too hard to try to hack into the existing code as it sits... not
>to mention a *lot* of the error messages that Joe had in splitstream
>seem to be never used, or only come out when the stream's fubar'd so
>bad that there's no point to continuing...
>
>So I'm thinking of stripping zss right down to it's skivvies &
>[mostly] starting from scratch. This will slow down development a
>little bit, as it will take some time to get a new code base in
>place, but it will enable us all to learn more about the streams, and
>hopefully get closer sooner to a fully self-synchronizing MPEG
>splitter.
>
>I may have to 're-add' a little bit of the chunk-handling code, but
>it seems like some of it is throwing out the baby with the bathwater;
>so we'll see.
>
>I have made a few more changes 'splainin' this on my webpage, and I
>started a Glossary: section - The usual questions, suggestions,
>whatever just email me & I'll do my best to get it in. For those
>folks just tuning in:
>
><http://www.30below.com/~zmerch/tivo/index.cfm>http://www.30below.com/~zmer
ch/tivo/index.cfm
>
>Hard to believe that I've gotten over 2150 hits to the page in under
>3 months!
>
>Laterz,
>Roger "Merch" Merchberger
>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Tax Center - online filing with TurboTax
><http://taxes.yahoo.com/>http://taxes.yahoo.com/
>
>
>To unsubscribe from this group, send an email to:
>ExtractStream-unsubscribe@yahoogroups.com
>
>
>
>Your use of Yahoo! Groups is subject to
><http://docs.yahoo.com/info/terms/>http://docs.yahoo.com/info/terms/
>
>
>
>Yahoo! Groups Sponsor
>ADVERTISEMENT
>
>To unsubscribe from this group, send an email to:
>ExtractStream-unsubscribe@yahoogroups.com
>
>
>
>Your use of Yahoo! Groups is subject to the
><http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service.




To unsubscribe from this group, send an email to:
ExtractStream-unsubscribe@yahoogroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/