[Scummvm-git-logs] scummvm master -> b38df75e898f1ea531632f9a4fb83e109d055026
sev-
noreply at scummvm.org
Fri Jun 6 11:04:19 UTC 2025
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
eee2f58ba4 VIDEO: QTVR: Fix hfov calculation
b08424d100 VIDEO: QTVR: Disable warp mode 1
b38df75e89 VIDEO: QTVR: Wrap around angle according to pan range
Commit: eee2f58ba4d47247abbc20123190d5829a663668
https://github.com/scummvm/scummvm/commit/eee2f58ba4d47247abbc20123190d5829a663668
Author: Malhar (themalharbdv2046 at gmail.com)
Date: 2025-06-06T13:04:15+02:00
Commit Message:
VIDEO: QTVR: Fix hfov calculation
Changed paths:
video/qtvr_decoder.cpp
diff --git a/video/qtvr_decoder.cpp b/video/qtvr_decoder.cpp
index 00a59ee6b59..cc91bb136ab 100644
--- a/video/qtvr_decoder.cpp
+++ b/video/qtvr_decoder.cpp
@@ -300,7 +300,7 @@ void QuickTimeDecoder::setTargetSize(uint16 w, uint16 h) {
}
// Set up the _hfov properly for the very first frame of the pano
// After our setFOV will handle the _hfov
- _hfov = _fov * (float)_height / (float)_width;
+ _hfov = _fov * (float)_width / (float)_height;
}
void QuickTimeDecoder::setPanAngle(float angle) {
@@ -360,7 +360,7 @@ bool QuickTimeDecoder::setFOV(float fov) {
_fov = fov;
track->_currentHFOV = _hfov;
- _hfov = _fov * (float)_height / (float)_width;
+ _hfov = _fov * (float)_width / (float)_height;
// We need to recalculate the pan angle and tilt angle to see if it has went
// out of bound for the current value of FOV
Commit: b08424d1003997855ad374cee483a3aedc3e1893
https://github.com/scummvm/scummvm/commit/b08424d1003997855ad374cee483a3aedc3e1893
Author: Malhar (themalharbdv2046 at gmail.com)
Date: 2025-06-06T13:04:15+02:00
Commit Message:
VIDEO: QTVR: Disable warp mode 1
The current version of warp mode 1 in QTVR is flawed
Disabling it for now to work on it further
Changed paths:
video/qtvr_decoder.cpp
diff --git a/video/qtvr_decoder.cpp b/video/qtvr_decoder.cpp
index cc91bb136ab..63dd88f8da8 100644
--- a/video/qtvr_decoder.cpp
+++ b/video/qtvr_decoder.cpp
@@ -173,6 +173,10 @@ void QuickTimeDecoder::setQuality(float quality) {
}
void QuickTimeDecoder::setWarpMode(int warpMode) {
+ // Curretnly the warp mode 1 is not implemented correctly
+ // So, forcing the warp mode 1 to warp mode 2
+ if (warpMode == 1) warpMode = 2;
+
_warpMode = CLIP(warpMode, 0, 2);
// 2 Two-dimensional warping. This produces perspectively correct
@@ -1234,7 +1238,7 @@ void QuickTimeDecoder::PanoTrackHandler::projectPanorama(uint8 scaleFactor,
cylinderProjectionRanges.resize(halfWidthRoundedUp * 2);
cylinderAngleOffsets.resize(halfWidthRoundedUp);
- if (warpMode == 0.0f) {
+ if (warpMode == 0) {
for (uint16 x = 0; x < halfWidthRoundedUp; x++) {
float xFloat = (float) x;
Commit: b38df75e898f1ea531632f9a4fb83e109d055026
https://github.com/scummvm/scummvm/commit/b38df75e898f1ea531632f9a4fb83e109d055026
Author: Malhar (themalharbdv2046 at gmail.com)
Date: 2025-06-06T13:04:15+02:00
Commit Message:
VIDEO: QTVR: Wrap around angle according to pan range
In both projectPanorama() and setPanAngle(), the pan angle
should be wrapped around according to the actual pan range of
the current QTVR movie instead of assuming it to be 360.
In setPanAngle(), wrap around angle instead of letting it grow
indefinitely.
Changed paths:
video/qtvr_decoder.cpp
diff --git a/video/qtvr_decoder.cpp b/video/qtvr_decoder.cpp
index 63dd88f8da8..0d02c83b6de 100644
--- a/video/qtvr_decoder.cpp
+++ b/video/qtvr_decoder.cpp
@@ -310,6 +310,9 @@ void QuickTimeDecoder::setTargetSize(uint16 w, uint16 h) {
void QuickTimeDecoder::setPanAngle(float angle) {
PanoSampleDesc *desc = (PanoSampleDesc *)_panoTrack->sampleDescs[0];
+ float panRange = abs(desc->_hPanEnd - desc->_hPanStart);
+ angle = fmod(angle, panRange);
+
if (desc->_hPanStart != desc->_hPanEnd && (desc->_hPanStart != 0.0 || desc->_hPanEnd != 360.0)) {
if (angle < desc->_hPanStart + _hfov) {
angle = desc->_hPanStart + _hfov;
@@ -1172,7 +1175,8 @@ void QuickTimeDecoder::PanoTrackHandler::projectPanorama(uint8 scaleFactor,
float minProjectedY = topRightVector[1] / topRightVector[2];
float maxProjectedY = bottomRightVector[1] / bottomRightVector[2];
- float angleT = fmod((360.0f - panAngle) / 360.0f, 1.0f);
+ float panRange = abs(desc->_hPanEnd - desc->_hPanStart);
+ float angleT = fmod((panRange - panAngle) / panRange, 1.0f);
if (angleT < 0.0f) {
angleT += 1.0f;
}
More information about the Scummvm-git-logs
mailing list