-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert incompatible scaling changes #34
Revert incompatible scaling changes #34
Conversation
This reverts commits 5eee6d9 and 7a83376 from pinterf#24 and its follow-up fix. The dependence on the videos storage resolution described in pinterf#17 is actually part of the ASS format and required to be kept for compatibility with existing files. Keeping compatible with this beaviour is also why the xy-SubFilter interface in include/SubRenderIntf.h takes an "originalVideoSize" parameter; as unlike xy-VSFilter, xy-SubFilter can render at native display resolution. (While for xy-VSFilter, rendering always happens at the videos original storage resolution, so the rendering dimension already carries the informaton and a separate parameter is not needed).
Can you make binary?? Thanks |
|
It is a part of the ASS format. Likely it didn't start out as an intentional design choice, but nonetheless this is how ASS works, ASS files expect renderers to behave and not doing so just breaks existing files. Practically, the old behaviour is the correct one as far as ASS rendering is concerned.
There is no requirement or even indication in ASS itself, that
That just means, even with this ""fix"" some tags still behave differently depending on the resolution of the video the subs are paired with.
The change doesn't consider storage resolution, yes — but for correct rendering one must consider storage resolution. Also storage resolution is not the same as the pixel shape (PAR), but a full resolution like 1920×1080.
They didn't "fix" it, MPC-HC (before -BE split and before clsid2 took over -HC iinm) broke compatibility with existing files in more than just this instance, which is why barely any complex subs I'm aware of target those renderers; installing xy-SubFIlter or xy-VSFilter is the usual recommendation. Thanks to your hints over in libass/libass#641 I was now able to actually build this PR and the current master state. This allowed me to confirm that the behaviour introduced in #24 is indeed what I expected and thus not conforming to ASS expectations: After the revert (matching previous behaviour of pinterf/xy-VSFilter and current behaviour of Cyberbeing/xy-VSFilter, guliverkli(2)-VSFilter and libass): Also see pinterf-incompat-demo.tar.gz for the sample file for the screenshots above and another anamorphic sample (for which storage resolution ≠ native display resolution). |
The incompatible change mentioned here, was added only after the last pinterf/xy-VSFilter release. So the last release binaries should still be safe to use. If you really want to get the other commits since the last release though, see the build artefact here: https:/TheOneric/xy-VSFilter/actions/runs/2899636750 for the binaries resulting from current pinterf master + this patch. (The artefact will eventually expire and no longer be available, I will not do any rebuilds when that happens.) |
@TheOneric A list of tags specified by the script indicating which tags are scalable might solve more problems |
Is “before that pr” above referring, to the current PR, #34, or the one introducing the bugs, #24? If the latter, i.e. there were already incompatibilities before #24, can you please elaborate on what they are?
Here “that pr”, seems very unlikely not to refer to #24 to me.
If #24 also tries to do something else at the same time, please explain what and why, but either way #24 needs to be reverted first.
The previous behaviour of depending on the storage resolution is not wrong, it is the only correct behaviour for conforming softsub ASS renderers. Just like, you wouldn't expect photos and videos (e.g. jpeg and MPEG-2) taken in 2002, to suddenly display different, distorted or no more content after upgrading your media viewers, softsub ASS renderers must not break existing real-world sub releases (i.e. ASS subtitles, all required fonts, video and optionally audio muxed into a multimedia container like MKV). |
(I'm watching the discussion here and at the libass repo but I don't have any live knowledge on subtitles so I cannot judge the correctness of a decision. When you, experts, reach a consensus, I'm gonna do whatever you propose) |
Do you have a similar demo without rotation? Because in that case the two scaling steps are correct, right? So to be clear, in case of If I remember correctly, the fix in discussion above was done to fix a real-life sample. So it is really very unclear for subbers as well what is correct due to the lacking of an official specification. |
The perspective transform matrix involved in 3D-rotations is derived directly from storage resolution parameters, without considering PlayRes, so basically yes. Though, there's no easy way to get a multiplier for the tag’s values for this.
With “simply” in the meaning akin of “naturally”, yes.
Sorry, I'm not sure which two scaling steps you are referring to and if its after or before the current patch is merged. But, e.g. here is the issue which first made libass aware of the storage res stuff in 2009 and it refers to a sample where blur is noticeably different between ancient not-storage-aware libass and VSFilter, so for blur too real-world files rely on VSFilter’s storage res scaling. (The linked full sample is no longer available, but excerpts are posted and it might be possible to find the original release by the cited name) I don't think #24 did directly affect blur and even if it indirectly did, just reverting the change as done here should resolve this again.
From my experience sub authors just work with what they've got and that is a quirky VSFilter in Aegisub (or libass, but libass tries to faithfully emulate VSFilter and we maintain subs should always be checked in VSFIlter too before publishing as discrepancies usually result in libass adjusting to match VSFilter).
If with "fix" you mean the revert at hand, then yes. |
With two scaling steps I mean:
|
As explained in more detail here, As for pinterf/xy-VSFilter, #24 only affected the perspective transform matrix and before #24 xy-VSFilter was fully compatible, so the revert here is sufficent to get correct behaviour again. Unless ofc ther are more merged incompatible changes I'm not aware of... (but even if this were the case, this revert would still be a necessary step) @Masaiki do you still have questions about why the revert is required? |
@TheOneric #24 just want to solve this (frx fry not scaled), but you think #24 is not incompatible, right? |
@Masaiki, thanks for your reply.
Yes, #24 it is without a doubt incompatible with classic ASS and breaking existing real-world subtitle releases.
There is no solution without a revert of #24, as #24 is plain wrong. As an additional discussion, separate from unbreaking xy-*, libass/libass#641 proposes |
I don't think so, #24 was created for multi-resolution distribution and is compatible with the VSFilter in MPC-BE/HC. By the way, if you think you are right and want to be the new standard and try to convince others, then at least you should have a standard, complete documentation Since I am fully aware that we are all stubborn on this topic, I won't make any more comments under this PR, do whatever you want. |
See my prior comments on this. Also, if the goal were compatibility with ISR while disregarding all existing releases, then #24 won't suffice and all it achieves is creating a third rendering target different from both MPC-HC/BE ISR and also classic ASS (as implemented in e.g. xy-* releases, guliverkli(2) and mostly libass).
There's nothing “new” about depending on storage resolution; this has been a property of ASS ever since the original guliverkli-VSFilter, and as mentioned numerous times, real-world subtitle releases do depend on this and It may very well be the fault of lacking communication skills on my end, but unfortunately I do not know how to make the breakages #24 causes and why it needs to be reverted any more clear than I already did. The essential point is, that it breaks existing real-world subtitle releases and breaks with longstanding ASS semantics. (And as an additional point, it breaks with the expectation of xy-* being fully backwards-compatible which is a renowned charateristic of xy-*)
I regret, that I could not better illustrate the reasoning to you to get to a common understanding, but as mentioned I unfortunately don't know how to. @pinterf: has the reason (breaking existing releases) become clear to you or should I ask someone else, with likely better explaining skills, to illustrate why the revert is necessary? |
I agree that having proper documentation is essential. Just copy any existing one, add it to the libass project, and add clear descriptions of how things should be scaled, plus any other quirks that may exist in the original VSFilter (which implicitly dictates the standard). |
The documentation bit seems to better fit into libass#641 imho, best repost it there then I or someoneelse can reply. This PR is just about fixing the recent breakage and for xy-* specifically I guess a rough guideline is: “if a patch changes rendering results, it is most likely wrong” (crashing is not a valid result) since xy-* is both directly derived from the original implementation and historically took care to stay compatible. |
@pinterf: can you merge this? Nobody seems to want to block this anymore and the revert itself is a blocker for a Although I personally still think maintaining compatibility by leaving the storage res reliance for non- Thus moving along with this revert and then |
@pinterf, friendly ping. |
Huge sorry for my delayed reaction. So the last word from Masaiki is that he won't comment this PR any more, though he's not convinced. The debate origins mainly from the fact that this application area was not properly documented? |
@pinterf :
I have a
The debate comes from whether it is worth keeping backwards compatibility with a stupid, but well-known and intentional preserved during XySubFilter creation (and in libass) property of ASS, namely depending on video storage res to render some things.
The patch being reverted aimed at removing the existing (and intentionally preserved) dependency on storage res by substituting it by PlayRes. However, it actually is incomplete and only did this for 3D rotations; blur and some other features remained dependent on storage res (likely by oversight). Once the |
This reverts commits 5eee6d9 and 7a83376 from #24 and its follow-up fix.
The dependence on the videos storage resolution described in #17 is actually part of the ASS format and required to be kept for compatibility with existing files. Changing the scaling logic to not take storage resolution into account, breaks existing, real-world files.
Keeping compatible with this beaviour is also why the xy-SubFilter interface in include/SubRenderIntf.h takes an
"originalVideoSize"
parameter; as unlike xy-VSFilter, xy-SubFilter can render at native display resolution. (While for xy-VSFilter, rendering always happens at the videos original storage resolution, so the rendering dimension already carries the informaton and a separate parameter is not needed).See libass/libass#641 for a potential, non-breaking way to get video-resolution-indepent subtitles.
Unfortunately, I wasn't able to figure out how to make this build in GitHub Actions and I don't have any local VS or Windows dev setup. As it just reverts two commits it should probably be safe though. Iiuc the other commit from #31 is unrelated to sacling and #32 fixes this unrelated commit from #31.