Commit Graph
98 Commits
Author SHA1 Message Date
Malhar 2af98018a9 VIDEO: QTVR: Memory Optimization for Upscaled Panorama
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
2025-04-26 19:36:15 +08:00
Malhar 8615695c7c VIDEO: QTVR: Minor Fixes and Formatting
Fix a minor logical error in swing transition function
Remove Unnecessary whitespace and formatting
2025-04-26 19:36:15 +08:00
Malhar 770feb4a23 VIDEO: QTVR: Implement the Swing Transition functionality
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
2025-04-26 19:36:15 +08:00
Malhar a6f3c04218 VIDEO: QTVR: Fix distortion bug while zooming out
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
2025-04-26 19:36:15 +08:00
Malhar 28257c7ae5 VIDEO: QTVR: Implement the higher quality modes
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
2025-04-26 19:36:15 +08:00
Malhar b6df3118b9 VIDEO: QTVR: Implement the warping functionality
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
2025-04-26 19:36:15 +08:00
Eugene Sandulenko 3416a5aea1 VIDEO: QTVR: Process Quit event
We want to stop timers here, so the potential cursor update is not
referring to a freed object. Prevents crashing when quitting
Director movies with QTVR panoramas
2025-04-18 23:21:27 +02:00
Eugene Sandulenko 685f9619bd VIDEO: QTVR: Always try to switch cursor
Since we do not know if it was altered by Director, always switch
cursor on mouse hover
2025-04-18 22:49:30 +02:00
elasota 597316ff75 VIDEO: Fix uninitialized memory access 2025-04-18 11:19:05 -04:00
sluicebox 7ce6318cbc VIDEO: QTVR: Add missing else. PVS-Studio V646 2025-04-15 01:26:15 -07:00
sluicebox cef6068d96 VIDEO: QTVR: Fix memory leak on error
CID 1591257
2025-04-14 13:15:09 -07:00
Eugene Sandulenko 25ab3de81b VIDEO: QTVR: Reduce rendering artefacts 2025-03-03 08:38:13 +01:00
Eugene Sandulenko 5850a98841 VIDEO: QTVR: Reset rollover hotspot fully 2025-02-24 11:47:48 +01:00
Eugene Sandulenko 10b7804675 VIDEO: QTVR: Expose hotspotid as is 2025-02-24 01:11:41 +01:00
Eugene Sandulenko 668bee336c VIDEO: QTVR: Added hotspot-related debug output 2025-02-24 00:27:37 +01:00
Eugene Sandulenko a960464cd9 VIDEO: QTVR: Properly process Zoom 0
That is default, or "no change"
2025-02-24 00:27:37 +01:00
Eugene Sandulenko f56e232b75 VIDEO: QTVR: Reset clicked hotspot before click processing
This ensures we do not have "sticky" hotspots
2025-02-24 00:27:37 +01:00
Eugene Sandulenko 09f821b03f VIDEO: QTVR: Implement hotspot rendering toggle with 'h' 2025-02-23 21:53:16 +01:00
Eugene Sandulenko ec1d352988 VIDEO: QTVR: Put all debug output in 'gvideo' channel 2025-02-23 21:53:16 +01:00
Eugene Sandulenko 45f18df63b VIDEO: QTVR: Do not error out on non-QTVR movies 2025-02-22 15:51:23 +01:00
Eugene Sandulenko b1301e4fc5 VIDEO: QTVR: Catch only navg hostpots as unprocessed 2025-02-21 13:58:15 +01:00
Eugene Sandulenko 73e930587b VIDEO: QTVR: Fix cursor stoppers for tilt 2025-02-20 01:34:32 +01:00
Eugene Sandulenko c7a9f7afe5 VIDEO: QTVR: Remove redundant casts 2025-02-20 01:34:32 +01:00
Eugene Sandulenko 81eeb05d75 VIDEO: QTVR: Use HotSpotType as uint32 2025-02-20 01:34:25 +01:00
Eugene Sandulenko 2ac76393d6 VIDEO: QTVR: Fix getPanAngles() calculations 2025-02-19 23:25:08 +01:00
Eugene Sandulenko 8a49765844 VIDEO: QTVR: Flip tiltAngle vertically to follow the original
Now the angles are matching, thus, the object locations are correct
2025-02-19 18:47:54 +01:00
Eugene Sandulenko 99c992f03a VIDEO: QTVR: Flip panAngle horizontally to follow the original 2025-02-19 18:43:02 +01:00
Eugene Sandulenko e6ea636e93 JANITORIAL: Rearrange methods in the source code 2025-02-19 18:37:39 +01:00
Eugene Sandulenko 90cceae302 VIDEO: QTVR: Added API for configuring QTVR player 2025-02-19 14:25:56 +01:00
Eugene Sandulenko 15f59b787e VIDEO: QTVR: Do not reset initial panorama position 2025-02-19 11:10:05 +01:00
Eugene Sandulenko b947d5c92a VIDEO: QTVR: Expose navigation details via API 2025-02-19 01:51:15 +01:00
Eugene Sandulenko 67e1b00869 VIDEO: QTVR: Expose panorama transformations via API 2025-02-19 01:51:15 +01:00
Eugene Sandulenko 3e0202855c VIDEO: QTVR: Expose hotspots via API 2025-02-17 23:59:48 +01:00
Eugene Sandulenko aca60a8427 VIDEO: QTVR: Exposed hotspot name via API 2025-02-17 23:59:48 +01:00
Eugene Sandulenko 6d3c840734 VIDEO: QTVR: Hid noisy warning 2025-02-17 00:04:20 +01:00
Eugene Sandulenko fefa5f0de1 VIDEO: QTVR: Fixing setting pan/tilt programmatically 2025-02-17 00:03:25 +01:00
Eugene Sandulenko e061557428 VIDEO: QTVR: Implement Object nudging with keyboard 2025-02-16 23:00:21 +01:00
Eugene Sandulenko 10ee20b3e6 VIDEO: QTVR: Distinguish between clicked and roll over hotspot 2025-02-16 18:09:17 +01:00
Eugene Sandulenko c81553fb60 VIDEO: QTVR: Print out unhandled node types 2025-02-16 18:09:17 +01:00
D G Turner 0797a921f3 VIDEO: QTVR: Fix Signed vs. Unsigned Comparison GCC Compiler Warning 2025-02-16 04:34:20 +00:00
Eugene Sandulenko 8ef6f981fb VIDEO: QTVR: Implement possibility switching to hotspot rendering 2025-02-14 23:51:07 +01:00
Eugene Sandulenko dbd062312e VIDEO: QTVR: Dump panoramas only with --dump-scripts command line parameter 2025-02-14 23:09:02 +01:00
Eugene Sandulenko cac3898e2f VIDEO: QTVR: Do not navigate in mouse drag mode 2025-02-14 23:09:02 +01:00
Eugene Sandulenko 2ad25492fd VIDEO: Put mouse coordinates in Common::Point 2025-02-14 23:09:02 +01:00
Eugene Sandulenko e0521b2b0b VIDEO: QTVR: Navigate through links only on mouseup event 2025-02-14 23:09:02 +01:00
Eugene Sandulenko b2fdfaefa0 VIDEO: QTVR: Implement link navigation 2025-02-14 23:09:02 +01:00
Eugene Sandulenko 7438aedd99 VIDEO: QTVR: Implement hotspot cursors override 2025-02-14 23:09:02 +01:00
Eugene Sandulenko 2cb37eaea4 VIDEO: QTVR: Simplified hotspot lookup code 2025-02-14 23:09:02 +01:00
Eugene Sandulenko 9943fe8d94 VIDEO: QTVR: Added constants for the rest of the cursors
Still their purpose was not figured out.
2025-02-14 01:17:36 +01:00
Eugene Sandulenko 82b77cd1e2 VIDEO: QTVR: Properly set link hotspot cursor 2025-02-14 01:17:32 +01:00