Commit Graph

42 Commits

Author SHA1 Message Date
Colin Snover
4ba87013a9 VIDEO: Support old-style stereo in VMDs
This format is used by the stereo audio VMDs in Lighthouse.
2017-08-20 11:36:26 -05:00
Bastien Bouclet
ec49730711 VIDEO: Allow setting the mixer sound type used to play audio tracks 2017-07-27 06:40:07 +02:00
Colin Snover
0d63d2a7ad VIDEO: Wrap out-of-range VMD audio samples instead of clipping
The 16-bit DPCM decompressors in SSCI and Urban Runner use a 16-bit
register to store sample data, without any special handling of
overflow. As such, out-of-range samples simply wrap around, rather
than getting clipped.

It is not totally clear if the wrapping behaviour was intentionally
exploited to handle extreme transients, but in any case, videos
like GK2 5280.VMD that generate samples outside the signed 16-bit
range cause a loud pop when using clipping, but play back correctly
when wrapping.
2017-06-17 13:09:27 -05:00
Colin Snover
53fb26550d VIDEO: Unexpose audio sync API in AdvancedVMDDecoder
This change was inadvertently added in commit
44dd029cb1 but is not actually used.
2017-04-29 14:30:09 -05: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
Colin Snover
44dd029cb1 SCI32: Implement kSetHotRectangles
Used only by chapter 7 of Phant1.
2016-09-29 19:39:16 -05:00
Colin Snover
28d4f5b0e4 VIDEO: Expose API for providing a memory location to draw VMDs
In SSCI, VMD is drawn by a standard CelObjMem wrapped by a
ScreenItem, giving the location of the bitmap memory to the
decoder. The decoder already supports this, but the API was
previously hidden behind the AdvancedVMDDecoder wrapper
(which is more convenient to use than the VMDDecoder class).
2016-07-10 09:35:24 -05:00
Matthew Hoops
08ea14a8d0 IMAGE: Make Codec take a stream reference; change function name to decodeFrame 2014-02-28 00:27:37 -05:00
Matthew Hoops
b568ac73b9 IMAGE: Move video codecs to image/ 2014-02-28 00:27:36 -05:00
Johannes Schickel
8f3a923686 VIDEO: Make GPL headers consistent in themselves. 2014-02-18 02:39:39 +01:00
Johannes Schickel
8fc54d6d77 VIDEO: Fix regression in Urban Runner videos.
This is a regression from 6fce92b0ea. Thanks to
DrMcCoy for tracking this down.
2013-08-04 01:07:34 +02:00
Johannes Schickel
0cb1504a5b VIDEO: Do not set Surface::pixels directly anymore. 2013-08-03 04:14:08 +02:00
Johannes Schickel
e0c9c1d261 VIDEO: Take advantage of Surface::getPixels. 2013-08-03 04:02:49 +02:00
Johannes Schickel
6fce92b0ea VIDEO: Prefer getBasePtr over direct Surface::pixels access. 2013-08-03 04:02:49 +02:00
Sven Hesse
4b3f5149b5 VIDEO: Add hypothetical 32bpp support 2013-06-30 19:07:04 +02:00
Sven Hesse
fad5cf7243 VIDEO: Fix a typo (minus vs. plus) in the VMD decoder 2013-04-13 15:22:06 +02: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
3e2ff0a443 VIDEO: Fix compilation with some compilers 2012-08-26 20:30:32 -04:00
Matthew Hoops
18823198ad VIDEO: Merge AdvancedVideoDecoder into VideoDecoder 2012-08-16 14:00:14 -04:00
Matthew Hoops
7294a1cbcf VIDEO: Remove the Coktel video code from using the VideoDecoder API
After discussing with DrMcCoy, we felt this the best way to proceed. A wrapper class that implements AdvancedVideoDecoder is still around for use in SCI.
2012-08-16 12:17:23 -04:00
Sven Hesse
8c3d2fc741 GOB: Add a way to reopen currently opened IMD/VMD videos
This is a workaround for how Lost in Time behaves in combination
with changes I made to the DataIO code for running Urban Runner
on low-memory devices.

Urban Runner's intro are far to big to have them copied into
memory for these devices, so I made the DataIO code return a
SafeSeekableSubReadStream into the opened archive stream instead.
Unfortunately, Lost in Time might not close a video file when it
closes the data file which it was originally in, especially when
loading a saved game. Since the video player needs to be able to
gaplessly continue a video and there does not, by itself, close
the video if not requested by the scripts, this leads to reading
out of an already closed stream in certain cases.

So, to worka round this issues, the video player tries to reopen
each currently opened video after a data archive was closed, to
make sure that that video is still available. If not, the video
is closed.
2012-06-07 00:29:46 +02:00
Matthew Hoops
10f7e805c2 VIDEO: Add volume/balance control to VideoDecoder 2012-05-28 14:00:16 -04:00
Matthew Hoops
6bbff58314 VIDEO: Rewrite VMD audio streaming
Audio is now decoded in AudioStream classes instead of being decoded ahead of time and then queued.
2011-11-27 15:52:05 +01:00
Max Horn
717a7accf5 BUILD: Always enable indeo3 codec 2011-05-25 13:24:37 +02:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Johannes Schickel
71bdb86e02 Merge pull request #16 "Add a PixelFormat to Graphics::Surface.".
For further discussion check here:
https://github.com/scummvm/scummvm/pull/16

Conflicts:
	graphics/png.cpp
2011-05-01 16:54:45 +02:00
Ori Avtalion
9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
Johannes Schickel
da734a4af0 ALL/GRAPHICS: Remove Surface::bytesPerPixel. 2011-04-17 21:27:34 +02:00
Johannes Schickel
f90bbf9cfa VIDEO: Prefer Surface::format over Surface::bytesPerPixel. 2011-04-17 20:55:49 +02:00
Johannes Schickel
5e279996eb VIDEO: Prefer Surface::create taking a PixelFormat over the one taking a byte depth.
Certain codecs seem to use a Surface with Bpp 2, but do not have any proper
format description. Whoever is maintaining these should check this commit and
fix the format properly.
2011-04-17 16:35:12 +02:00
Max Horn
8f70e089ac VIDEO: Use shared ADPCM data tables in VMDDecoder 2011-04-13 12:48:58 +02:00
Max Horn
0ce2ca4e00 COMMON: Replace MKID_BE by MKTAG
MKID_BE relied on unspecified behavior of the C++ compiler,
and as such was always a bit unsafe. The new MKTAG macro
is slightly less elegant, but does no longer depend on the
behavior of the compiler.
Inspired by FFmpeg, which has an almost identical macro.
2011-04-12 16:53:15 +02:00
dhewg
d83a83ef50 JANITORIAL: Remove/comment unused vars
Found by GCC 4.6's -Wunused-but-set-variable
2011-03-29 21:57:56 +02:00
Sven Hesse
97966c36e1 VIDEO: Add a workaround for the Inca 2 wisdom gate video
When decompressing directly onto the output surface fails (because
it's too small), retry decompressing into the video buffer first,
which then gets blitted onto the output surface.
2011-03-29 12:47:20 +02:00
Sven Hesse
8291732c94 VIDEO: Fix deLZ77() bound check
The Inca 2 video where Atahualpa walks through the gate after
solving the wisdom challenge now only warns (and graphically
glitches) instead of segfaulting.
2011-03-29 12:39:51 +02:00
Max Horn
42ab839dd6 AUDIO: Rename sound/ dir to audio/
svn-id: r55850
2011-02-09 01:09:01 +00:00
Max Horn
357c225f64 VIDEO: Rename VideoDecoder::load() to loadStream()
svn-id: r55810
2011-02-07 17:54:16 +00:00
Sven Hesse
3e29897bb7 VIDEO: Fix a gfx glitch
Visible in some Inca 2 videos

svn-id: r55505
2011-01-24 16:06:27 +00:00
Sven Hesse
6ca13f926d VIDEO: Don't fill empty sound slices at the end
svn-id: r55502
2011-01-24 14:09:47 +00:00
Eugene Sandulenko
caa6684752 VIDEO: Move video classes to Video:: namespace
svn-id: r55479
2011-01-23 19:08:09 +00:00
Eugene Sandulenko
f123802f4c GRAPHICS: Move graphics/video/ to video/. Step 2/2
svn-id: r55474
2011-01-23 17:37:17 +00:00
Eugene Sandulenko
806ccf5d25 GRAPHICS: Move graphics/video/ to video/. Step 1/2
svn-id: r55473
2011-01-23 17:14:43 +00:00