Commit Graph

127 Commits

Author SHA1 Message Date
kevinlaurier
84a17ad9ae IMAGE: Added support for 16 bit bitmap images, and check for RGB555
format
2022-01-23 21:38:33 +01:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Orgad Shaneh
7a4e5612de JANITORIAL: Replace new[]/memset with new[]()
Mostly done using the following Ruby script:

(Dir.glob('**/*.cpp') + Dir.glob('**/*.h')).each do |file|
  s = File.read(file, encoding: 'iso8859-1')
  t = s.gsub(/(([\w_.\[\]]+)\s*=\s*new\s+\S+?\[[^\]]+?\](?!\())([^\{\}]*?)\n\s+memset\(\s*\2\s*,\s*0\s*,[^;]*;/m, '\1()\3')
  if t != s
    File.open(file, 'w') { |io| io.write(t) }
  end
end
2021-11-10 19:53:15 +01:00
sluicebox
620dc8a1df IMAGE: Fix BitmapRawDecoder constructor regression
Fixes parameter order mismatch between definition and declaration
introduced in: 5d093e725f

Fixes flipped QFG4 intro movie, bug #13059
2021-11-04 00:46:46 -05:00
lb_ii
236be25624
IMAGE: Parse 4bpp BMP files 2021-11-01 16:26:19 +02:00
lb_ii
5d093e725f
IMAGE: Extend raw decoder to support BMP with alpha channel 2021-11-01 16:25:43 +02:00
Eugene Sandulenko
8626c39b21
IMAGE: Fix SMC decoder
It is a regression introduced in 6fb49b6595.
Because of this, we were not reading all the bytes from the source.
2021-08-10 20:51:42 +02:00
ysj1173886760
2be3f87a49 DIRECTOR: change _isQT to _flip in BimapRawDecoder 2021-08-05 19:03:58 +08:00
ysj1173886760
1b5f986df9 IMAGE: change the type of rleCode to int to prevent overflow. 2021-08-05 17:42:10 +08:00
ysj1173886760
adfa11e684 IMAGE: flip 8bpp images when we are decoding QuickTimeVideo 2021-08-05 15:06:14 +08:00
Matthew Duggan
732d05f036 IMAGE: Make JYV1 decoder a little more robust to bad data 2021-07-25 15:40:03 +09:00
Paul Gilbert
005561d305 COMMON: Increase Stream pos, seek, size from int32 to int64 2021-07-08 18:24:28 -07:00
Paul Gilbert
baccbedf50 GRAPHICS: Changed surface classes sizes from uint16 to int16 2021-07-04 18:24:27 -07:00
Matthew Duggan
c24f92cb6f IMAGE: Fix decoding bug in Crusader: No Remorse RRV videos
Previously the upscale test was changing the frame contents with incorrect data
before going back, but the algorithm relies on not changing contents for some
pixels by "skipping" them.  Duplicated a bit of code to create a
non-destructive upscale test before decoding the whole frame.
2021-05-26 12:27:44 +09:00
Cameron Cawley
d9fe53efb2 CRYOMNI3D: Move HNMDecoder into common code 2021-04-17 21:48:45 +03:00
Eugene Sandulenko
5e7fe2dc57
JANITORIAL: Replace spaces in indentation with tabs 2021-04-15 21:20:36 +02:00
Matthew Duggan
017a801c96 IMAGE: Add support for Xan codec videos (Crusader, Wing Commander) 2021-03-14 19:16:24 +01:00
Le Philousophe
cd8cd86a9e IMAGE: Move mpeg2dec.h inclusion in CPP file
This avoids to pollute declarations with inttypes.h and mpeg2dec.h when
including mpeg.h
2021-02-13 17:49:21 +01:00
Eugene Sandulenko
6fb49b6595 IMAGE: Added sanity checks to SMC video decoder 2020-08-19 14:54:47 +02:00
Eugene Sandulenko
2999977154 IMAGE: CODECS: Plug QT RAW decoder 2020-08-10 12:46:38 +02:00
Cameron Cawley
00e3c03755 ALL: Remove unnecessary graphics/colormasks.h includes 2020-06-15 16:59:34 +01:00
Matthew Duggan
2ac6579236 IMAGE: Fix use of and keyword 2020-05-12 22:43:00 +09:00
Matthew Duggan
818e681746 IMAGE: Add support for Crusader: No Remorse movie decoding
The movies for Crusader: No Remorse have a unique decoder which is not too hard
to implement.  Unfortunately, they don't properly implement the "compression"
FourCC, and instead put their ID in the "Stream Handler".  Since supporting
them requires a change to the existing Image API, I thought I should make a
pull request for comments.

With this change, the movies in Crusader can all be played nicely.
2020-05-11 07:54:24 +02:00
D G Turner
f0c02796f4 IMAGE: Fix Missing Default Switch Case in Truemotion 1 Codec
This is flagged by GCC if -Wswitch-default is enabled.
2019-12-01 01:26:53 +00:00
D G Turner
aee09409e8 IMAGE: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
2019-11-30 22:08:44 +00:00
Bastien Bouclet
0d5d04ca3a IMAGE: Allow setting the output pixel format to the JPEG decoder 2019-04-28 07:59:14 +02:00
Bastien Bouclet
0f57aea2df COMMON: Use a prefix table to speed up the Huffman decoder
Symbols for codes shorter than the prefix table index width are stored
in the table. All the entries in the table with an index starting with
the code are set to the symbol value. That way, when decoding it is
possible to get the number of bits corresponding to the table width from
the bitstream and directly find the symbol value. Longer code still need
to be searched for in the codes list.
2019-04-13 16:24:25 +03:00
Torbjörn Andersson
d4f8b330d6 IMAGE: Honor nb_fields when calculating frame duration
From what I understand, this has something to do with the image
being either made up from two or three parts. When it's made from
three parts, the frame should be displayed for half again as long
as normal.

This makes the speed of the Zork: Grand Inquisitor video look
about right to me. It's still out of sync, but it doesn't seem to
get *more* out of sync as the video progresses.
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
Cameron Cawley
a7bc08992e IMAGE: INDEO: Use the system pixel format for non-8bpp screen modes 2018-04-15 08:05:24 -05:00
Torbjörn Andersson
4702681be2 IMAGE: Explicitly initialize CinePak codebooks
Starship Titanic produces lots of "uninitialized value" warnings
at the very beginning of the game, when turning right. This is
because in the very first movie frame it uses codebooks that have
not been loaded. Explicitly set their data to 0 to guarantee
consistent behavior.
2018-04-07 10:03:50 +02:00
Adrian Frühwirth
4faa8b0439 JANITORIAL: Remove useless comment 2018-03-25 18:37:10 +02:00
Adrian Frühwirth
cec905e036 IMAGE: Fix Indeo3 compiler warnings 2018-01-20 20:00:30 +01:00
Colin Snover
56cc138e58 IMAGE: Remove unnecessary heap allocation in BitmapRawDecoder 2017-09-24 16:22:40 -05:00
Paul Gilbert
5424f70002 IMAGE: Fix memory leak in BitmapRawDecoder 2017-09-24 12:02:48 -04:00
Cameron Cawley
7846d098b2 IMAGE: Support rendering Indeo videos at 15bpp 2017-09-05 23:40:05 +01:00
Paul Gilbert
0b19ebe7b2 IMAGE: Fix shadowing warning 2017-09-04 09:16:59 -04:00
Colin Snover
2b46eda5b6 IMAGE: Allow Indeo4 transparency decoding in scalable videos
y459.avi in Starship Titanic uses these two modes together, and
this appears to work fine.
2017-08-24 21:17:54 -05:00
Colin Snover
4a39f85c1b IMAGE: Implement handling of key color in Indeo transparency
This should also improve performance by eliminating unnecessary
writes to the output bitmap for opaque pixels and by simplifying
the rendering loop.
2017-08-24 20:36:08 -05:00
Colin Snover
d39a9272bf IMAGE: Remove unnecessary extra heap allocation of Indeo surface 2017-08-24 20:34:55 -05:00
Colin Snover
7dd2c0342d IMAGE: Remove unnecessary temporary surface in Indeo4/5 2017-08-24 20:34:19 -05:00
Colin Snover
085ec30b49 IMAGE: Add support for Indeo4 transparency plane
This is used by TITANIC for most of the furniture in the SGT
stateroom and Titania's parts.
2017-08-24 20:34:16 -05:00
Willem Jan Palenstijn
edfdbb9dd7 IMAGE: Use new BitStreamMemory class for indeo 2017-08-24 19:46:59 +02:00
Willem Jan Palenstijn
60fae8847e IMAGE: Inline indeo getVLC2 2017-08-24 19:46:59 +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
Eugene Sandulenko
c48cb7af7c JANITORIAL: Add fall through statement 2017-08-11 21:40:11 +02:00
Paul Gilbert
411cc2cb4e IMAGE: Extra initialization of Indeo decoder IVIHuffTab 2017-07-25 19:50:23 -04:00
Willem Jan Palenstijn
4ec3c2875b IMAGE: Inline two simple indeo functions 2017-07-11 01:32:05 +02:00
Colin Snover
7b90f0693a IMAGE: Return correct pixel format for Indeo3
This gives Indeo3 the same behavior as other codecs when
encapsulated in a container that provides bit depth information
(e.g. AVI).

Closes #888.
2017-01-11 10:59:55 -06:00
D G Turner
f63b9d0fcb IMAGE: Fix Unused Variable Compiler Warning in Indeo 4 Codec. 2017-01-09 07:21:59 +00:00