Commit graph

46 commits

Author SHA1 Message Date
Cameron Cawley
47755b4b38 COMMON: Make better use of inlining in BitStream functions 2022-08-28 00:05:31 +03:00
Paweł Kołodziejski
e3fc9b8226 VIDEO: Silence Sanitizer runtime error 2022-01-06 00:07:14 +01:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Orgad Shaneh
2e68b4ffdc JANITORIAL: Use override
Using clang-tidy modernize-use-override
2021-11-14 02:59:23 +02: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
Eugene Sandulenko
5e7fe2dc57
JANITORIAL: Replace spaces in indentation with tabs 2021-04-15 21:20:36 +02:00
Paweł Kołodziejski
0051eef251 VIDEO: Added support for alpha component support for BINK videos 2020-09-24 14:24:17 +02:00
Paweł Kołodziejski
5c441f9420 VIDEO: Added support for seeking BINK streams 2020-09-24 01:23:50 +02:00
Paweł Kołodziejski
1aff4a4cd3 VIDEO: Added getter for getFrameRate() for BINK and SMK video streams. 2020-09-24 00:26:27 +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
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
Bastien Bouclet
43e04d19c4 VIDEO: Fix Bink clearing color comment
YUV 000 is a green, not black. Thanks DrMcCoy for noticing and fixing
the issue.
2019-04-01 20:49:51 +02:00
Bastien Bouclet
195b4cbd20 VIDEO: Fix an integer overflow when dequantizing the DCT coeffs
See 2968bedf12
2019-04-01 20:49:45 +02:00
Adrian Frühwirth
9bee9e1ba6 JANITORIAL: Fix whitespace 2018-04-19 12:08:31 +02:00
Bastien Bouclet
6e6fab5b83 VIDEO: BINK: Fix plane data clobbering caused by incorrect pitch value
When decoding blocks, the YUV planes' pitches were computed using the
target video surface size instead of the block based size, resulting in
decoded plane data being overwritten for some video sizes.

Affected videos are LEOS-11102.bik and LEOS-11152.bik from Myst III.
2017-10-08 08:54:40 +02:00
Torbjörn Andersson
59f8e62adf JANITORIAL: Silence GCC 7 warnings
These fall throughs have to be deliberate, or they wouldn't have to
check if mode equals 2 in the mode == 2 cases.
2017-09-11 06:48:34 +02:00
Bastien Bouclet
ec49730711 VIDEO: Allow setting the mixer sound type used to play audio tracks 2017-07-27 06:40:07 +02:00
Paul Gilbert
bd010bc79f COMMON: Converted Common::BitStream to use DisposeAfterUse 2016-09-10 11:16:07 -04:00
Willem Jan Palenstijn
a22f9bccf3 VIDEO: Reduce BinkDecoder stack usage
See bug #6677.
2014-07-08 21:18:12 +02:00
Johannes Schickel
8f3a923686 VIDEO: Make GPL headers consistent in themselves. 2014-02-18 02:39:39 +01:00
Matthew Hoops
ce82977ea1 VIDEO: Improve support for multiple Bink audio tracks 2014-01-11 18:43:42 -05:00
Johannes Schickel
0e3f8d68c4 VIDEO: Silence C++11 narrowing warnings. 2013-01-09 07:24:37 +01:00
Johannes Schickel
89abab97e3 JANITORIAL: Remove trailing whitespaces.
Powered by:
git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'
2012-09-26 04:17:55 +02:00
Matthew Hoops
09269fce8c GRAPHICS: Implement different luminance ranges
Bink and Theora are now much improved
2012-09-18 16:50:01 -04:00
Matthew Hoops
893a2b37ff GRAPHICS: Rework YUV->RGB code a bit 2012-09-17 19:30:46 -04:00
Einar Johan Trøan Sømåen
d6be917808 VIDEO: Add support for odd-sized Bink-videos 2012-09-07 16:29:00 +02:00
Matthew Hoops
18823198ad VIDEO: Merge AdvancedVideoDecoder into VideoDecoder 2012-08-16 14:00:14 -04:00
Matthew Hoops
57a06e383b VIDEO: Convert Bink to the new AdvancedVideoDecoder API 2012-07-25 11:22:28 -04:00
Matthew Hoops
10f7e805c2 VIDEO: Add volume/balance control to VideoDecoder 2012-05-28 14:00:16 -04:00
Matthew Hoops
9e330174c8 VIDEO: Change getElapsedTime() into getTime()
This name change accompanies a slight meaning change; now it means the current time position from the beginning of the video and not from starting the video.
2012-05-12 21:28:13 -04:00
Bastien Bouclet
9d85382c15 VIDEO: Fix the BINK decoder to play file whose width is 24px
See https://ffmpeg.org/trac/ffmpeg/ticket/962
2012-02-09 16:10:47 +01:00
Bastien Bouclet
1432011fdc VIDEO: Small refactoring of the Bink Decoder
This allows subclassing the Bink decoder to add seeking support
2012-01-09 08:52:08 +01:00
Eugene Sandulenko
f5e4d63a77 Merge pull request #80 from DrMcCoy/newbitstream
COMMON: Rewrite Common::BitStream as a template
2011-10-20 09:27:26 -07:00
Bastien Bouclet
cf54fc98d5 VIDEO: Fix Bink bundle count lenghts to be computed like ffmpeg does.
Fixes several movies in Myst 3.
2011-09-18 09:38:30 +02:00
Sven Hesse
f1724f1637 COMMON: Rewrite BitStream as a template
This rewrites BitStream as a template, allowing for more different
memory layouts of the actual bit data.
2011-08-27 23:37:07 +02:00
Alyssa Milburn
c39245b771 VIDEO: Remove incorrect TO_LE_16 calls from Bink audio code. 2011-08-06 10:44:16 +02:00
Sven Hesse
62862ecb23 VIDEO: Don't depend on IEEE floats for Bink audio 2011-07-24 23:56:56 +02:00
Littleboy
da60ff3ded JANITORIAL: Fix MSVC warnings
- Conversion from double to float
 - Unary minus operator applied to unsigned type
 - ARRAYSIZE redefinition
2011-07-19 14:12:07 -04:00
Matthew Hoops
724d7ef101 VIDEO: Use C++ versions of exp/ldexp
Should fix compilation on Mac PPC, and MinGW32 on buildbot
2011-07-19 07:35:40 -04:00
Filippos Karapetis
e1ca235c44 BINK decoder: Fixed compilation with MSVC 2011-07-19 10:50:48 +03: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
Matthew Hoops
ccfb7cb86f VIDEO: Remember to call reset() from BinkDecoder::close() 2011-07-02 19:53:15 -04:00
Matthew Hoops
7c28d22ca0 VIDEO: Fix mismatched new[]/free 2011-07-02 19:37:46 -04:00
Matthew Hoops
82ed30817d VIDEO: Cleanup Bink a bit
- Fix playing videos back-to-back
- Silence a cast warning
2011-07-02 19:23:49 -04:00
Matthew Hoops
4c065363a0 VIDEO: Fix Bink RDFT stereo
Thanks to DrMcCoy
2011-07-02 17:32:36 -04:00
Matthew Hoops
4ace7f626b VIDEO: Add Bink video decoder
Based on eos' code which is in turn based on FFmpeg's code
2011-07-02 16:36:37 -04:00