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. |
![]() |
#21 | Link |
Registered User
Join Date: Feb 2022
Posts: 190
|
The composition controller can only draw the area defined in a window. If a composition does not intersect with its window, it will not be rendered. However, it is undefined behaviour for an object to partially intersect its referenced window. The composition controller would have to initiate a copy from the object buffer with an offset that is not conveyed in the composition (cropping) parameters. It would also have to terminate the copy of the said object to an unexplicited width and height that may differ from the object dimensions.
I would fiercely forbid it. |
![]() |
![]() |
![]() |
#22 | Link | |
hlg-tools Maintainer
Join Date: Feb 2008
Posts: 460
|
Quote:
Where I'm trying to go with this is that the library should parse malformed streams as best it can while always creating valid ones. |
|
![]() |
![]() |
![]() |
#24 | Link |
hlg-tools Maintainer
Join Date: Feb 2008
Posts: 460
|
Upon further consideration, my original idea of making the decoder as fault-tolerant as possible could serve to encourage mediocrity within the PGS ecosystem.
"That one C# library that one dude made can be used to clean up my output." So it seems beneficial to the ecosystem if the PGS4NET decoder is also retentively up-tight about correctness. I assume all of the following are nonsensical: 1. Segments with inconsistent PTS and DTS stamps within a single display set. 2. A subsequent display set having a time stamp before the preceding one. 3. A crop area being outside the bounds of an associated object. 4. An object being outside the bounds of a window. 5. Two objects overlapping within a window. 6. A window being outside the bounds of the screen (DisplaySet.Width and DisplaySet.Height). 7. Overlapping windows. EDIT: Nevermind. Your is_compliant function is answering much of this. Last edited by wswartzendruber; 25th May 2025 at 03:37. |
![]() |
![]() |
![]() |
#26 | Link |
Registered User
Join Date: Feb 2022
Posts: 190
|
The 1 MiB buffer is the usual elementary stream buffer found at the input of any decoder. Its purpose is to collect and store temporarily incoming packets. Packets are removed by the decoder on their DTS. The buffer fullness depends on the muxer packet scheduling decision.
That's correct. A given object cannot exceed 1 MiB in the elementary stream. That also means a muxer should not buffer excessively segments ahead of their decoding time, as that may also overflow the buffer. In any case, this is an encoder and muxer concerns, not one for a decoder. The is_compliant function in SUPer checks encoding constraint to ensure consistent presentation across all vendors implementation. A decoder should only implement basic sanity checks like maximum object dimensions of 4096 pixels, object resides in window that are on screen, object exists in buffer, etc. Anyway don't overly restrict your decoder. FFmpeg one blends two overlapping object, it does not implement the concept of a Window either. HandBrake patches it and make it closer to a proper decoder without adding excessive constraints. |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|