Commit Graph

32 Commits

Author SHA1 Message Date
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
D G Turner
99a1a90e76 AUDIO: Fix for GCC Warnings from 64-bit Stream API Changes 2021-07-09 04:23:10 +01:00
Eugene Sandulenko
5e7fe2dc57
JANITORIAL: Replace spaces in indentation with tabs 2021-04-15 21:20:36 +02:00
D G Turner
3959797b85 AUDIO: Fix Remaining Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
2019-11-28 14:38:43 +00:00
Bastien Bouclet
1757f7dc5d AUDIO: Switch to BitStreamMemoryStream in the QDM2 decoder 2017-11-08 20:57:35 +01:00
Bastien Bouclet
bf3c98815f AUDIO: Add some padding to the QDM2 decoder input buffer
Fixes out of bounds reads in the Myst ME intro videos.

OOB reads may happen because:
- The bitstream implementation reads 4 bytes at a time, and the buffer
  size is not guaranteed to be a multiple of 4.
- The huffman parsing code reads a fixed amount of bits when it
  sometimes needs not all of them.

Also fixed bits vs bytes mismatch for the size parameter of the calls to
the bitstream constructor, and removed a few unnecessary heap
allocations.

Fixes .
2017-11-08 20:57:24 +01:00
Bastien Bouclet
9db2953ca3 AUDIO: QDM2: Use the shared int64 type instead of a custom one 2017-09-30 21:35:16 +02:00
Willem Jan Palenstijn
dde259f068 COMMON: Remove BitStream base class to allow inlining calls
All users of BitStream were in fact using a specific, hardcoded variant,
so we can hardcode that variant, removing the need for virtual calls,
and enabling inlining.
2017-08-24 19:46:59 +02:00
Willem Jan Palenstijn
567054d829 AUDIO: Fix build 2016-07-31 08:55:12 +02:00
Eugene Sandulenko
30498bfbf0 AUDIO: Fix indentation 2016-07-31 09:28:46 +03:00
Matthew Hoops
1b834f92bd AUDIO: Finish off AAC/QDM2 queues when done decoding a packet 2014-07-27 23:44:44 -04:00
Johannes Schickel
452cec49d9 AUDIO: Make GPL headers consistent in themselves. 2014-02-18 02:39:32 +01:00
Matthew Hoops
54d4707edc AUDIO: Fix invalid free call 2013-04-16 12:05:42 -04:00
Johannes Schickel
84426c6355 AUDIO: Fix "if" formatting in QDM2 code. 2012-08-09 03:25:14 +02:00
D G Turner
8a5b08341e AUDIO: Remove now unused Sin/Cos table and FFT code from QDM2 Codec.
This was only used by the RDFT code, now replaced by Common::RDFT.
2012-04-13 07:37:31 +01:00
D G Turner
7f930dfae3 AUDIO: Migrate QDM2 Codec to using Common::RDFT class. 2012-04-13 07:37:30 +01:00
D G Turner
ce1f805212 AUDIO: Fixes to restore QDM2 Codec function.
The Bitstream format is changed to 32LELSB and an error in the getVlc2()
function bitstream reading needed to be corrected to fix operation.
2012-04-13 07:37:29 +01:00
D G Turner
50a9c6429d AUDIO: Update to QDM2 codec fixing pointer to stream buffer usage.
This should allow the QDM2 codec to work again with Common::Bitstream
instead of the older getBits() reader, but this aborts with a reading
past end of stream error...
2012-04-13 07:37:28 +01:00
D G Turner
b5f5cbe5fa AUDIO: Removed qdm2_decode_sub_packet_header() function from QDM2.
This is to allow modification of the code which needs to assign the
data member of the sub_packet structure to an offset in the input
byte readStream.
2012-04-13 07:37:27 +01:00
D G Turner
845812f12e AUDIO: Fix skipping in QDM2 BitStream usage.
getBits(n) would cause a runtime error if n is greater than 32,
but using getBits() to skip is no longer necessary as the newer
BitStream class has a skip method, which is used instead.
2012-04-13 07:37:26 +01:00
D G Turner
220f60fd60 AUDIO: Clean up QDM2 getVlc2() function. 2012-04-13 07:37:25 +01:00
D G Turner
fa44707028 AUDIO: Initial Refactoring of QDM2 to use Common::BitStream.
This removes the internal getBitContext bitwise reading code and
replaces with Common::BitStream.

However, this breaks the codec as in one location, the internal buffer
of getBitContext reader is used and this can't be directly replaced.
This will need to be understood and rewritten.
2012-04-13 07:37:24 +01:00
Matthew Hoops
68e1a04183 AUDIO: Fix QDM2 extra data parsing 2012-03-30 14:40:14 -04:00
Tarek Soliman
a4798602d7 JANITORIAL: Fix missing whitespace in pointer cast
find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g'

This seems to have caught some params as well which is not undesirable IMO.
It also caught some strings containing this which is undesirable so I
excluded them manually. (engines/sci/engine/kernel_tables.h)
2012-02-15 10:07:10 -06:00
Filippos Karapetis
e4d1a5da3d QDM2: Removed superfluous parentheses 2011-11-04 00:42:40 +02:00
D G Turner
54f25aa843 COMMON: Renamed Integer Log2 function from log2 to intLog2.
This avoids naming collisions with system libraries on some platforms
i.e. DS, DC where the log2 is realised by macro.
2011-07-19 02:29:13 +01:00
D G Turner
765813f750 CODECS: Replaced Integer log2 in QDM2 with Common::Math implementation. 2011-07-19 02:07:15 +01:00
Matthew Hoops
46aabed3f5 AUDIO: Fix QDM2 sound in QuickTime files 2011-07-10 15:50:47 -04:00
Matthew Hoops
aa49b38c5a Merge remote branch 'upstream/master' into t7g-ios
Conflicts:
	engines/groovie/script.cpp
2011-05-31 14:16:29 -04:00
Matthew Hoops
a1d41da096 Merge remote branch 'upstream/master' into t7g-ios
Conflicts:
	audio/decoders/qdm2.h
	common/util.cpp
	engines/groovie/music.cpp
	engines/groovie/resource.h
	video/qt_decoder.cpp
	video/qt_decoder.h
2011-05-11 00:30:28 -04:00
Matthew Hoops
6d153f311c Merge remote branch 'upstream/master' into t7g-ios
Conflicts:
	video/qt_decoder.cpp
2011-04-13 16:04:29 -04:00
Matthew Hoops
8cf73e3fb4 AUDIO: Split QuickTime audio into a new class
Standalone QuickTime files can now be played as an AudioStream
2011-04-07 19:40:07 -04:00