Skip to content
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

Is this the right scale for PGS? And the PGS color in MadVR. #57

Closed
Max33Verstappen opened this issue Oct 23, 2022 · 9 comments
Closed

Comments

@Max33Verstappen
Copy link

Max33Verstappen commented Oct 23, 2022

Please check this video:
https://disk.yandex.com/d/2fmJw--pHq-nyQ

  • 1st:
    The PGS in this video is rendered significantly larger than all other players and what it is on MPC-BE before 6f3b27b (tested on 1.6.2.7083 with "Position subtitles relative to the video frame" checked, so it's rendered on the video on that version, right?). Maybe because you swap the scale factor from scaleX = scaleY = videoAR < subtitleAR ? double(szTarget.cx) / m_virtualTextureSize.cx : double(szTarget.cy) / m_virtualTextureSize.cy; to something more or less equivalent to scaleX = scaleY = videoAR < subtitleAR ? double(szTarget.cy) / m_virtualTextureSize.cy : double(szTarget.cx) / m_virtualTextureSize.cx; to always get the larger one as the scaling factor while the old logic always get the smaller one?
    Was this done on purpose?

  • 2nd:
    Please check the color of the subtitle in MadVR. The color of PGS subs is obvious "pale".
    No color space conversion for PGSs and so when using MadVR? Using MPCVR is fine. But other players are also fine in MadVR.

@Aleksoid1978
Copy link
Owner

Aleksoid1978 commented Oct 23, 2022

1 - Compare with MPC-HC - the same size of PGS subtitles. PGS/DVB subtitles always renderer to the video frame.
2 - Player don't do any conversion for subtitle, it's just "send" this to video-renderer.
MPC VR just do some conversion when use HDR output.

@Max33Verstappen
Copy link
Author

Max33Verstappen commented Oct 23, 2022

  • 1st
    Please see my screenshot:
    MPC-HC:
    mpc-hc64_2022_10_23_05_11_48_378
    MPC-BE 1.6.2.7083 with "Position subtitles relative to the video frame" checked:
    2022-10-23_05 26 17 052_mpc-be64_Chernobyl S01E02 Please Remain Calm 2160p UHD BluR
    MPC-BE (1.6.4.104):
    2022-10-23_05 43 56 221_mpc-be64_Chernobyl S01E02 Please Remain Calm 2160p UHD BluR
    It's also larger in windowed mode.

  • 2nd
    Then what's wrong?
    MPC-BE on MadVR:
    2022-10-23_22 05 49 730_mpc-be64_subtitle_test mkv_-_MPC-BE_x64_1 6 4 101_dev
    MPC-BE on MPCVR:
    2022-10-23_22 07 44 482_mpc-be64_subtitle_test mkv_-_MPC-BE_x64_1 6 4 101_dev
    PotPlayer on MadVR:
    2022-10-23_22 13 20 992_PotPlayerMini64_subtitle_test mkv_-_PotPlayer
    MPC-HC:
    2022-10-24_07 47 25 727_mpc-hc64_subtitle_test mkv

The followings are more obvious: (Both on MadVR)
MPC-HC:
2022-10-23_16 27 30 142_mpc-hc64_00040
MPC-BE:
2022-10-23_16 28 28 659_mpc-be64_00040 mpls_-_MPC-BE_x64_1 6 4 101_dev

@Aleksoid1978
Copy link
Owner

1 - Yes i rewrited logic, PGC/DVB now always render inside video frame and not a window. If you zoom video - PGS subtitles also zoom.
2 - I don't know and can't help. Ask author madVR, he is have sources and can look/debug.

@Max33Verstappen
Copy link
Author

Max33Verstappen commented Oct 24, 2022

For the 1st problem:
I know they're rendered to the video frame now. The screen shot I posted are all equivalent to rendering on the video frame (not relative to the window). I'm talking about the zoom factor of the PGS subs. Because the PGSs in this video have different AR than the video, so the following scaling code may involve, and you see in the new code videoAR < subtitleAR ? double(szTarget.cy) / m_virtualTextureSize.cy while in the old code it's videoAR < subtitleAR ? double(szTarget.cx) / m_virtualTextureSize.cx.
Which means they're now always pick the larger zoom factor, so I guess this is the reason why they're now appearing bigger?

On a video whose AR is equal to the PGS's AR, there's no such problem, because the above codes are not involved.

@Aleksoid1978
Copy link
Owner

Aleksoid1978 commented Oct 24, 2022

I have no particular desire to get into this code again, to test hundreds of files with various subtitles.
If there is a desire - patch are welcome :)

@Aleksoid1978
Copy link
Owner

I compare with HC - the same size.
HC
BE

@Max33Verstappen
Copy link
Author

I see.
It's all about AR and the choose of scaling factor.
The old MPC-BE always chooses the smaller scaling factor of the two:
2022-10-24_11 05 24 842_mpc-be64_subtitle_test mkv_-_MPC-BE_x64_1 6 2 7083_alpha
2022-10-24_11 05 34 885_mpc-be64_subtitle_test mkv_-_MPC-BE_x64_1 6 2 7083_alpha

Then new MPC-BE always chooses the larger scaling factor from two:
2022-10-24_11 06 38 706_mpc-be64_subtitle_test mkv_-_MPC-BE_x64_1 6 4 104_dev
2022-10-24_11 06 47 811_mpc-be64_subtitle_test mkv_-_MPC-BE_x64_1 6 4 104_dev

MPC-HC chooses the larger scaling factor when the Window AR < Video AR, and chooses the smaller scaling factor when the Window AR > Video AR
2022-10-24_11 03 34 033_mpc-hc64_subtitle_test mkv
2022-10-24_11 04 23 174_mpc-hc64_subtitle_test mkv

@Aleksoid1978
Copy link
Owner

Aleksoid1978 commented Oct 24, 2022

I think that how it's in MPC-HC - it's not right. PGS/DVB subtitles must render as designed(position & size), but MPC-HC change size & position when sizing window.
So - you can use MPC-HC if needed.
Everything remains as it is - closed the topic.

@Max33Verstappen
Copy link
Author

This actually seems to be a MPC-HC bug...
Moments ago, there's a new beta version, and it's been fixed.
Now it's the same as MPC-BE (use the larger scaling factor no matter how the AR changes).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants