[Scummvm-git-logs] scummvm master -> 81b8da49a6319518f6d718db405ba0213fac72d3
whoozle
noreply at scummvm.org
Thu Feb 12 22:08:00 UTC 2026
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
81b8da49a6 PHOENIXVR: fix quality dequantisation multipliers
Commit: 81b8da49a6319518f6d718db405ba0213fac72d3
https://github.com/scummvm/scummvm/commit/81b8da49a6319518f6d718db405ba0213fac72d3
Author: Vladimir Menshakov (vladimir.menshakov at gmail.com)
Date: 2026-02-12T22:02:21Z
Commit Message:
PHOENIXVR: fix quality dequantisation multipliers
Changed paths:
engines/phoenixvr/vr.cpp
diff --git a/engines/phoenixvr/vr.cpp b/engines/phoenixvr/vr.cpp
index b8aba1225e8..2c381f23d8f 100644
--- a/engines/phoenixvr/vr.cpp
+++ b/engines/phoenixvr/vr.cpp
@@ -76,8 +76,19 @@ struct Quantisation {
int quantCbCr[64];
Quantisation(int quality) {
+ int q;
+ if (quality < 0) {
+ q = 5000;
+ } else if (quality > 100) {
+ quality = 100;
+ q = 2 * (100 - quality);
+ } else if (quality >= 50) {
+ q = 2 * (100 - quality);
+ } else {
+ q = 5000 / quality;
+ }
for (uint i = 0; i != 64; ++i) {
- auto v = (QY[i] * quality + 50) / 100;
+ auto v = (QY[i] * q + 50) / 100;
if (v > 255)
v = 255;
else if (v < 8) {
@@ -88,7 +99,7 @@ struct Quantisation {
quantY[i] = v;
}
for (uint i = 0; i != 64; ++i) {
- auto v = (QUV[i] * quality + 50) / 100;
+ auto v = (QUV[i] * q + 50) / 100;
if (v > 255)
v = 255;
else if (v < 8) {
@@ -142,7 +153,7 @@ void unpack(Graphics::Surface &pic, const byte *huff, uint huffSize, const byte
}
}
- Video::FourXM::idct(ac, 5);
+ Video::FourXM::idct(ac, 4);
}
int dstY;
int dstX;
More information about the Scummvm-git-logs
mailing list