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.

 

Go Back   Doom9's Forum > General > Subtitles

Reply
 
Thread Tools Search this Thread Display Modes
Old 10th May 2025, 22:41   #21  |  Link
cubicibo
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.
cubicibo is offline   Reply With Quote
Old 11th May 2025, 23:15   #22  |  Link
wswartzendruber
hlg-tools Maintainer
 
wswartzendruber's Avatar
 
Join Date: Feb 2008
Posts: 460
Quote:
Originally Posted by cubicibo View Post
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.
Do you think it would be prudent to still render any object data still in the window area (decode) while forcibly prohibiting such streams from ever being generated (encode)?

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.
wswartzendruber is offline   Reply With Quote
Old 12th May 2025, 08:10   #23  |  Link
cubicibo
Registered User
 
Join Date: Feb 2022
Posts: 190
I would not render the composition if any coordinate after cropping lies outside of the referenced window. IMO a decoder should never go out of its way to support non-compliant files.
cubicibo is offline   Reply With Quote
Old 24th May 2025, 19:32   #24  |  Link
wswartzendruber
hlg-tools Maintainer
 
wswartzendruber's Avatar
 
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.
wswartzendruber is offline   Reply With Quote
Old 25th May 2025, 04:07   #25  |  Link
wswartzendruber
hlg-tools Maintainer
 
wswartzendruber's Avatar
 
Join Date: Feb 2008
Posts: 460
Actually, I do have a question:

# The Coded Object Buffer can hold up to 1 MiB of raw PES data

Does this mean all ODS segment chains for all objects must not exceed one mebibyte on legacy (2006-era) Blu-ray Discs?
wswartzendruber is offline   Reply With Quote
Old 25th May 2025, 16:08   #26  |  Link
cubicibo
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.
cubicibo is offline   Reply With Quote
Old 26th May 2025, 19:31   #27  |  Link
wswartzendruber
hlg-tools Maintainer
 
wswartzendruber's Avatar
 
Join Date: Feb 2008
Posts: 460
Does palette entry 255 implicitly mean "no pixel"?
wswartzendruber is offline   Reply With Quote
Old 26th May 2025, 21:17   #28  |  Link
cubicibo
Registered User
 
Join Date: Feb 2022
Posts: 190
A transparent pixel isn't void.
cubicibo is offline   Reply With Quote
Old 26th May 2025, 23:40   #29  |  Link
wswartzendruber
hlg-tools Maintainer
 
wswartzendruber's Avatar
 
Join Date: Feb 2008
Posts: 460
What does it mean when PTS stamps vary within a display set?
wswartzendruber is offline   Reply With Quote
Old 27th May 2025, 15:09   #30  |  Link
cubicibo
Registered User
 
Join Date: Feb 2022
Posts: 190
Read the patent. Each segment affects the decoder differently and take effect at its own PTS. In a Display Set, data segments must be fully decoded to be used: at the given PTS they are guaranteed to be available.
cubicibo is offline   Reply With Quote
Old 31st May 2025, 19:53   #31  |  Link
wswartzendruber
hlg-tools Maintainer
 
wswartzendruber's Avatar
 
Join Date: Feb 2008
Posts: 460
Is there a concise way to convey which parts of the patent are reliable and which parts aren't?
wswartzendruber is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:10.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.