Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
26th July 2008, 16:22 | #1 | Link |
Guest
Join Date: Jan 2002
Posts: 21,901
|
Re-use of PPS id's legal?
I've come across a stream that uses FMO. It keeps using PPS id 0 even though the slice group data in the PPS changes. Is this legal? If so, it severely complicates random access, because I have to be much more careful about which PPS to inject.
Please tell me it is not legal. |
26th July 2008, 17:50 | #2 | Link | ||
Registered User
Join Date: Dec 2004
Location: Tomsk, Russia
Posts: 366
|
Quote:
Quote:
|
||
27th July 2008, 10:51 | #4 | Link | |
Registered User
Join Date: Dec 2004
Location: Tomsk, Russia
Posts: 366
|
Quote:
strange anyway, I was though it's illegal inside one sequence. |
|
27th July 2008, 11:44 | #5 | Link |
x264 developer
Join Date: Sep 2004
Posts: 2,392
|
What's the problem with random access, and why are you "injecting" a PPS?
If a stream has global headers, then forget semantic rules; there is no syntactic way to describe multiple meanings for the same PPS id. If a stream doesn't have global headers, then it should re-send PPS at each keyframe in addition to whenever they change, so you just update your interpretation of the id whenever you reach each PPS. |
27th July 2008, 13:12 | #6 | Link |
Guest
Join Date: Jan 2002
Posts: 21,901
|
The streams I find in the wild do not always behave as they "should".
Try to implement frame accurate random access, and you'll soon see what the problems are. It's easy enough to jump randomly into a stream and start decoding and get the first decodable picture, but it might not be the one you want because you've jumped in just after the PPS you need, and you have to wait for the next one. For frame accuracy you need to start decoding exactly at an indexed frame, so you need to ensure that the required SPS's and PPS's have been injected. Consider, for example, that a stream can send these only once at the beginning of the stream. That's just one of the scenarios you need to deal with. (By "injecting" I mean feeding a NALU to the decoder.) Another problem is the same as for MPEG2: you have to allow for open GOPs. If you want to navigate to the first frame of an open GOP, you've got a problem. Last edited by Guest; 27th July 2008 at 13:41. |
27th July 2008, 13:41 | #7 | Link |
x264 developer
Join Date: Sep 2004
Posts: 2,392
|
Frame-accurate seeking requires starting to decode at the keyframe whose dts precedes the indexed frame's pts, and throwing away intermediate decoded frames. So you found a stream that has neither PPS at each keyframe nor global headers? Far be it from me to discourage you, but if I saw such a thing I'd just say "no, you can't seek".
Last edited by akupenguin; 27th July 2008 at 13:45. |
27th July 2008, 13:46 | #8 | Link | ||
Guest
Join Date: Jan 2002
Posts: 21,901
|
Quote:
Quote:
Last edited by Guest; 27th July 2008 at 13:53. |
||
Thread Tools | Search this Thread |
Display Modes | |
|
|