Commit Graph
776 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
Miro Kropacek 24dcacfe69 JANITORIAL: Add missing references to const function parameters
Applied to all 'const Common::' and 'const Graphics::' instances.
2025-04-13 02:20:09 +03:00
Filippos Karapetis a28cb792cf VIDEO: Use pointers when deleting inside range loops 2025-03-27 13:47:57 +08:00
Filippos Karapetis 7cb70d585f VIDEO: Use C++ 11 range-based for loops 2025-03-27 13:47:57 +08:00
Malharbdv 73afe02f14 VIDEO: Correctly handle raw Elementary Stream MPEG Videos
Recognize the type of the stream in .mpg files (ES or PS)
In case of ES (Elementary Streams) bypass the PES header
parsing process and directly feed the MPEG decoder the raw data.
Remove warning that appears when opening the ND
logo when opening the game 3mice1-pl
2025-03-23 17:14:00 +02:00
Matthew Jimenez d7ea3aaed5 VIDEO: Fix MVE get width, height, and pixel format 2025-03-11 21:25:19 +01:00
Matthew Jimenez b3ab2e0774 VIDEO: Use palette class in PACo decoder 2025-03-10 19:03:23 +02:00
Matthew Jimenez 99330f128c VIDEO: Use palette class in Coktel decoder 2025-03-10 19:03:23 +02:00
Matthew Jimenez 5e9f79d537 VIDEO: Use palette class in MVE decoder 2025-03-10 19:03:23 +02:00
Matthew Jimenez cb8d5d4bd6 VIDEO: Use palette class in FLIC decoder 2025-03-10 19:03:23 +02:00
Matthew Jimenez 2e5122deb6 VIDEO: Use palette class in DXA decoder 2025-03-10 19:03:23 +02:00
Matthew Jimenez 748a7f2fcf VIDEO: Use palette class in HNM decoder 2025-03-09 17:29:24 +02:00
Matthew Jimenez 29e2b1017c VIDEO: Use palette class in Smacker decoder 2025-03-09 17:29:24 +02:00
Matthew Jimenez 22c34f1f72 VIDEO: Use palette class in QuickTIme decoder 2025-03-09 17:29:24 +02:00
Matthew Jimenez 95f4741f93 VIDEO: Use palette class in AVI decoder 2025-03-09 17:29:24 +02:00
Eugene Sandulenko 895d6f5b65 VIDEO: AVI: Silently skip zero size files 2025-03-05 00:27:52 +01:00
Eugene Sandulenko 25ab3de81b VIDEO: QTVR: Reduce rendering artefacts 2025-03-03 08:38:13 +01:00
Cameron Cawley d7d38b867c VIDEO: Set the output pixel format for all QuickTime samples 2025-03-03 07:30:22 +02:00
Cameron Cawley 1a3a290ce7 IMAGE: Improve default implementation of setOutputPixelFormat() 2025-03-03 07:30:22 +02:00
Cameron Cawley 953ccc3d6c VIDEO: Add a version of setOutputPixelFormat that accepts a list of formats 2025-03-02 02:34:07 +02:00
Cameron Cawley 4867e171bf IMAGE: Add more validation for Codec::setOutputPixelFormat 2025-03-02 02:34:07 +02:00
Filippos Karapetis 9354d6c3e3 VIDEO: Render the first frame of PSX video files after they are loaded
Tested with the BS1 PSX videos. The PSX decoder now conforms to the
same behavior as the rest of the video decoders. This fixes a bug
uncovered in PR #6297
2025-03-01 22:12:38 +02: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 531e1effbd VIDEO: Switched decoder debug output to 'gvideo' debug channel 2025-02-22 15:51:24 +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