31 Commits

Author SHA1 Message Date
Cameron Cawley 1c7e5a75c2 IMAGE: Unify the default pixel format for YUV codecs 2025-07-13 20:01:28 +03:00
Alikhan Balpykov d3afd13866 VIDEO: MPEGPS: Check if packet's pts is large enough before offsetting 2025-06-10 14:35:40 +02:00
Alikhan Balpykov 4b4b877cf3 VIDEO: Shift timestamps so that the first timestamp is 0 2025-06-07 20:41:23 +02:00
Alikhan Balpykov 76d4c2137e VIDEO: Make PREBUFFERED_PACKETS a settable variable in MPEGPSDemuxer 2025-06-07 20:41:23 +02: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
Cameron Cawley 4867e171bf IMAGE: Add more validation for Codec::setOutputPixelFormat 2025-03-02 02:34:07 +02:00
Eugene Sandulenko 531e1effbd VIDEO: Switched decoder debug output to 'gvideo' debug channel 2025-02-22 15:51:24 +01:00
Eugene Sandulenko af00823a11 VIDEO: Hid debug message deeper 2024-08-14 19:10:00 +02:00
Cameron Cawley d72fee204c VIDEO: Implement setOutputPixelFormat() for MPEGPSDecoder 2023-04-05 12:45:13 +02:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Paweł Kołodziejski 328c12a28d VIDEO: Added support for PS2 audio codec in MPEG stream 2020-09-24 18:52:31 +02:00
Eugene Sandulenko 8b0ff834d0 VIDEO: Fix typo which could lead to crash in mpeg decoder 2020-04-28 10:38:37 +02:00
D G Turner b7b66c5049 VIDEO: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
2019-11-30 19:47:06 +00:00
Torbjörn Andersson 9785d5007a ZVISION: Boost volume for MPEG cutscenes
The high-resolution videos play back at much lower volume than the
original ones. This adds hard-coded values for how much to amplify
each cutscene. It's all done by ear, and it does introduce some
clipping, but I think it should be acceptable.

Of course, it could also be a problem with the audio decoder, so
this may be the wrong approach entirely.
2019-02-10 16:32:02 +02:00
Torbjörn Andersson 7c58534f4f VIDEO: Add buffering demuxer to MPEG-PS decoder
In all my attempts to get the audio and video to sync up in the
ZGI videos, there have always been 9-10 frames of video before the
audio even starts, even though the audio is timestamped to start
before. This attempts to fix that by prioritizing sending audio
packets to the decoder in a timely fashion.

I do not know if this is the correct way of doing this, and there
are still some things that need to be fixed. But pragmatically, it
does procude significantly better sync, so...
2018-11-04 22:33:22 +01:00
Torbjörn Andersson a5b5b68a1a VIDEO: Use all video PTS's
Sometimes (only at the very start of a movie?) there will be a
video packet that has a PTS but no frame to display. Save that PTS
and use it for the next frame. This doesn't actually improve
anything, as far as I can tell, but feels right.
2018-11-04 22:33:22 +01:00
Torbjörn Andersson 1255e8de4d VIDEO: Removed _psmESType
We weren't doing anything with it anyway. And I'm not sure it's
even available in the ZGI videos.
2018-11-04 22:33:22 +01:00
Torbjörn Andersson 1d69564876 VIDEO: Moved MPEGStream creation out of readNextPacket()
I think it makes things easier to read, and I have some ideas
that I want to try which should be easier this way...
2018-11-04 22:33:22 +01:00
Torbjörn Andersson ac40828ed2 VIDEO: Make the video pts sync easier to understand 2018-11-04 22:33:22 +01:00
Torbjörn Andersson b672a694b9 VIDEO: Synchronize video to pts timestamps
This is another attempts at improving the audio/video sync in the
MPEG-PS decoder. Unfortunately, the audio probably also needs to
be synced to its pts timestamps...
2018-11-04 22:33:22 +01:00
Torbjörn Andersson 43b29a93d7 VIDEO: Use the standalone AC-3 decoder in the MPEG-PS code
This code comes from clone2727's now defunct (?) ac3 branch, with
some minor compile fixes. This represents the latest version of
the stalled AC-3 decoder work for Zork: Grand Inquisitor. Note,
however, that I have not yet asked for clone2727's permission to
use this. I'm just experimenting.
2018-11-04 22:33:22 +01:00
Torbjörn Andersson ef70af5e99 VIDEO: Some minor cleanups to the AC-3 decoder 2018-11-04 22:33:22 +01:00
Torbjörn Andersson e6abe39752 VIDEO: Skip DVD code. The sound plays, but audio/video sync is off
Like most things that make this branch actually work, this comes
from clone2727.
2018-11-04 22:33:22 +01:00
Torbjörn Andersson 89ec9766a1 VIDEO: After figuring out sample rate, rewind the AC-3 stream 2018-11-04 22:33:22 +01:00
Torbjörn Andersson ad41dfb7ff VIDEO: Committed fixes from clone2727
This collects the whole frame before trying to decode it. It's
still now working right, but it's way better than it was before.
2018-11-04 22:33:22 +01:00
Torbjörn Andersson fc7fa1de3a VIDEO: Use liba52 to decode audio. This is still laughably broken
At the moment, this produces nothing but misery in the form of
Valgrind warnings and horrible noise.
2018-11-04 22:33:22 +01:00
Bastien Bouclet ec49730711 VIDEO: Allow setting the mixer sound type used to play audio tracks 2017-07-27 06:40:07 +02:00
Eugene Sandulenko fab199d37e JANITORIAL: Make GPL headers uniform 2016-09-03 12:46:38 +02:00
Ori Avtalion 3564032330 JANITORIAL: Reduce audio header dependencies 2016-04-14 16:10:21 +03:00
Matthew Hoops 14e57ca76f VIDEO: Switch MPEG-PS audio code to use the packetized MP3 code 2015-08-30 19:53:53 -04:00
Matthew Hoops 7054bcd9c5 VIDEO: Add MPEG-PS demuxer
For use with ZVision and later MADE
2015-01-08 00:45:13 -05:00