X Tutup
Skip to content

VIDEO: QTVR: Add quality, warpMode and swing transition#6548

Merged
sev- merged 6 commits intoscummvm:masterfrom
malharbadve:qtvr_xtra
Apr 26, 2025
Merged

VIDEO: QTVR: Add quality, warpMode and swing transition#6548
sev- merged 6 commits intoscummvm:masterfrom
malharbadve:qtvr_xtra

Conversation

@malharbadve
Copy link
Contributor

Add the following missing features in QTVR panorama as described in the original director QTVR documentation

  • 4 levels of quality mode, also added the dynamic quality where the quality is changing based on whether the user is actively intereacting with the panorama
  • swing transition from the current node to the target node in a smooth animation
  • 3 levels of warping

@malharbadve
Copy link
Contributor Author

Guys, I'm not sure why the check failed, can you guys help me out?

@bluegr
Copy link
Member

bluegr commented Apr 8, 2025

Guys, I'm not sure why the check failed, can you guys help me out?

It's an issue with the runner images, which are using the latest versions in all packages, and the CMake package had a breaking change in version 4. Rebase your branch, so that you can get this commit from master, which fixes the issue: 2821fcd

@sev-
Copy link
Member

sev- commented Apr 10, 2025

Two things right away:

  • VIDED -> VIDEO in the commit log message
  • Split director change into a separate commit

@malharbadve malharbadve changed the title VIDED: Add quality, warpMode and swing transition in QTVR panorama VIDEO: Add quality, warpMode and swing transition in QTVR panorama Apr 10, 2025
@malharbadve malharbadve force-pushed the qtvr_xtra branch 3 times, most recently from b46849d to 91eb7f6 Compare April 10, 2025 15:04
@malharbadve
Copy link
Contributor Author

I made the changes, pushed again, but the check failed once again
I read the error message, I resolved it, I squashed the last three commits and pushed again

@sev- sev- added the GSoC Part of a Google Summer of Code project label Apr 11, 2025
Copy link
Member

@sev- sev- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed partially


kScaleFactorOne = 1,
kScaleFactorTwo = 2,
kScaleFactorThree = 3,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We were discussing that possible difference between "low quality" antialasing and high quality could be with linear/gaussian interpolation. How is this approach of 2x/3x is compared to this and the original?

@malharbadve malharbadve marked this pull request as draft April 20, 2025 11:24
@malharbadve malharbadve force-pushed the qtvr_xtra branch 2 times, most recently from 6e6a516 to 65d9867 Compare April 20, 2025 14:16
malharbadve added a commit to malharbadve/scummvm that referenced this pull request Apr 20, 2025
Please refer to the pull request
scummvm#6548

Set the corner origin point in the QTVR decoder from
QTVR Xtra in order to make sure during the swing transition
the QTVR video decoder sets the image at the correct position
Add the warping functionality using the warpMode variable
as described in the original QTVR Xtra documentation
provided by Apple.

Set three modes of warping in the qtvr decoder
- Mode 2: Already there, applies both planar projection as
  well as perspective correction for perspectively correct
  image

- Mode 1: Only apply planar projection, image becomes more
  distorted as we move up or down from the midpoint

- Mode 0: No projection, blit the image as it is, exact
  copy of the original QTVR movie
@malharbadve malharbadve changed the title VIDEO: Add quality, warpMode and swing transition in QTVR panorama VIDEO: QTVR: Add quality, warpMode and swing transition Apr 21, 2025
@malharbadve malharbadve marked this pull request as ready for review April 21, 2025 20:32
malharbadve added a commit to malharbadve/scummvm that referenced this pull request Apr 21, 2025
Please refer to the pull request
scummvm#6548

Set the corner origin point in the QTVR decoder from
QTVR Xtra in order to make sure during the swing transition
the QTVR video decoder sets the image at the correct position
Add the quality mode stubbed functionality using the
as described in the original QTVR Xtra documentation
provided by Apple.

Add two new functions:
upscalePanorama(): Upscales the original panorama movie
to 2x width or 2x width and 2x height, these upscaled
panorama are named (_1D/_2D)UpscaledConstructedPano and
used for projecting in quality mode 2.0f and 4.0f

boxAverage(): The panorama is rendered with 2x or 3x the
target size and then averaged to target size by averaging
in 2x2 or 3x3 box to apply anti-aliasing

Set three quality modes in the QTVR decoder
- Mode 1.0f: No quality upscaling, already present,
  low quality

- Mode 2.0f: 1 dimensional upscaling and 2 times scaled
  rendering followed by 2x2 box average, medium quality

- Mode 4.0f: 2 dimensinoal upscaling and 3 times scaled
  rendering followed by 3x3 box average, high quality

- Mode 0: Dynamic quality mode, change between low
  quality and high quality based on whether the user is
  actively interacting with the panorama
There is a minor bug in QTVR decoder when zooming out when
Tilt Angle != 0, in warp mode 2, it causes distorion of the
panorama, in warp mode 1 and 0, it causes panorama image to
go out of bounds and the upper/lower (depending on whether
tilt angle is positive or negative) part of the image is
invalid

Check for out of bound values of tilt angle and pan angle
when setFOV() function is called during zooming in or out
which fixes the bug
Add the swing Transition functionality using the transitionMode
variable as described in the original QTVR Xtra documentation
provided by Apple.

In the swing transition mode, make the video decoder internally
handle the animation of "swinging" panorama video from the
current position (described by _fov, _tiltAngle, _panAngle)
to the new position while taking the shortest path
Fix a minor logical error in swing transition function
Remove Unnecessary whitespace and formatting
Copy link
Member

@sev- sev- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a few notes. We are really close to completion, good job!

Previous approach used two Surface Objects to store the 1D and 2D
upscaled panorama used while projecting the panorama in higher
quailty respectively causing higher memory usage

Instead use only one Surface object to store the upscaled panorama
which stores both 1D and 2D upscaled panorama as and if needed.

Minor fixes and formatting
@sev-
Copy link
Member

sev- commented Apr 26, 2025

Thank you!

@sev- sev- merged commit 2af9801 into scummvm:master Apr 26, 2025
8 checks passed
sev- pushed a commit that referenced this pull request Apr 26, 2025
Please refer to the pull request
#6548

Set the corner origin point in the QTVR decoder from
QTVR Xtra in order to make sure during the swing transition
the QTVR video decoder sets the image at the correct position
einstein95 pushed a commit to einstein95/scummvm that referenced this pull request May 5, 2025
Please refer to the pull request
scummvm#6548

Set the corner origin point in the QTVR decoder from
QTVR Xtra in order to make sure during the swing transition
the QTVR video decoder sets the image at the correct position
ellm135 pushed a commit to ellm135/scummvm that referenced this pull request May 30, 2025
Please refer to the pull request
scummvm#6548

Set the corner origin point in the QTVR decoder from
QTVR Xtra in order to make sure during the swing transition
the QTVR video decoder sets the image at the correct position
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GSoC Part of a Google Summer of Code project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

X Tutup