diff --git a/configure b/configure
index 589ae03..7cd1c15 100755
a
|
b
|
_text_console=no
|
116 | 116 | _mt32emu=yes |
117 | 117 | _build_hq_scalers=yes |
118 | 118 | _build_scalers=yes |
| 119 | _indeo3=auto |
119 | 120 | # Default vkeybd/keymapper options |
120 | 121 | _vkeybd=no |
121 | 122 | _keymapper=no |
… |
… |
Optional Libraries:
|
609 | 610 | --with-mpeg2-prefix=DIR Prefix where libmpeg2 is installed (optional) |
610 | 611 | --enable-mpeg2 enable mpeg2 codec for cutscenes [no] |
611 | 612 | |
| 613 | --disable-indeo3 disable Indeo3 decoder [autodetect] |
| 614 | |
612 | 615 | --with-fluidsynth-prefix=DIR Prefix where libfluidsynth is installed (optional) |
613 | 616 | --disable-fluidsynth disable fluidsynth MIDI driver [autodetect] |
614 | 617 | |
… |
… |
for ac_option in $@; do
|
654 | 657 | --enable-nasm) _nasm=yes ;; |
655 | 658 | --disable-nasm) _nasm=no ;; |
656 | 659 | --enable-mpeg2) _mpeg2=yes ;; |
| 660 | --disable-indeo3) _indeo3=no ;; |
| 661 | --enable-indeo3) _indeo3=yes ;; |
657 | 662 | --disable-fluidsynth) _fluidsynth=no ;; |
658 | 663 | --enable-readline) _readline=yes ;; |
659 | 664 | --disable-readline) _readline=no ;; |
… |
… |
add_to_config_mk_if_no $_build_hq_scalers 'DISABLE_HQ_SCALERS = 1'
|
1652 | 1657 | add_to_config_mk_if_no $_build_scalers 'DISABLE_SCALERS = 1' |
1653 | 1658 | |
1654 | 1659 | # |
| 1660 | # Check whether to compile the Indeo3 decoder |
| 1661 | # |
| 1662 | if test "$_indeo3" = auto ; then |
| 1663 | # Autodetect. Build if either the gob engine or plugins are enabled |
| 1664 | if test `get_engine_build gob` = yes || test "$_dynamic_modules" = yes ; then |
| 1665 | _indeo3="yes" |
| 1666 | else |
| 1667 | _indeo3="no" |
| 1668 | fi |
| 1669 | fi |
| 1670 | if test "$_indeo3" = no ; then |
| 1671 | _def_indeo3='#undef USE_INDEO3' |
| 1672 | else |
| 1673 | _def_indeo3='#define USE_INDEO3' |
| 1674 | fi |
| 1675 | add_to_config_mk_if_yes "$_indeo3" 'USE_INDEO3 = 1' |
| 1676 | |
| 1677 | # |
1655 | 1678 | # Check for math lib |
1656 | 1679 | # |
1657 | 1680 | cat > $TMPC << EOF |
… |
… |
if test "$_mt32emu" = yes ; then
|
2003 | 2026 | echo_n ", MT-32 emu" |
2004 | 2027 | fi |
2005 | 2028 | |
| 2029 | if test "$_indeo3" = yes ; then |
| 2030 | echo_n ", Indeo3 decoder" |
| 2031 | fi |
| 2032 | |
2006 | 2033 | if test "$_text_console" = yes ; then |
2007 | 2034 | echo_n ", text console" |
2008 | 2035 | fi |
… |
… |
$_def_readline
|
2230 | 2257 | /* Options */ |
2231 | 2258 | $_def_text_console |
2232 | 2259 | $_def_mt32emu |
| 2260 | $_def_indeo3 |
2233 | 2261 | |
2234 | 2262 | /* Plugin settings */ |
2235 | 2263 | $_def_plugin |
diff --git a/graphics/video/coktelvideo/coktelvideo.cpp b/graphics/video/coktelvideo/coktelvideo.cpp
index 39aeca0..82d60d8 100644
a
|
b
|
|
23 | 23 | * |
24 | 24 | */ |
25 | 25 | |
| 26 | #include "graphics/video/coktelvideo/coktelvideo.h" |
| 27 | |
| 28 | #ifdef GRAPHICS_VIDEO_COKTELVIDEO_H |
| 29 | |
26 | 30 | #include "common/endian.h" |
27 | 31 | #include "common/system.h" |
28 | 32 | |
29 | 33 | #include "graphics/dither.h" |
30 | | #include "graphics/video/coktelvideo/coktelvideo.h" |
31 | 34 | #include "graphics/video/coktelvideo/indeo3.h" |
32 | 35 | |
33 | 36 | namespace Graphics { |
… |
… |
bool Vmd::assessVideoProperties() {
|
1127 | 1130 | |
1128 | 1131 | if (_externalCodec) { |
1129 | 1132 | if (_videoCodec == MKID_BE('iv32')) { |
| 1133 | #ifdef USE_INDEO3 |
1130 | 1134 | _features &= ~kFeaturesPalette; |
1131 | 1135 | _features |= kFeaturesFullColor; |
1132 | 1136 | _codecIndeo3 = new Indeo3(_width, _height, _palLUT); |
| 1137 | #else |
| 1138 | warning("Vmd::assessVideoProperties(): Indeo3 decoder not compiled in"); |
| 1139 | #endif |
1133 | 1140 | } else { |
1134 | 1141 | char *fourcc = (char *) &_videoCodec; |
1135 | 1142 | |
… |
… |
bool Vmd::assessVideoProperties() {
|
1186 | 1193 | } |
1187 | 1194 | } |
1188 | 1195 | |
| 1196 | #ifdef USE_INDEO3 |
1189 | 1197 | if (_externalCodec && _codecIndeo3) |
1190 | 1198 | _features |= kFeaturesSupportsDouble; |
| 1199 | #endif |
1191 | 1200 | |
1192 | 1201 | return true; |
1193 | 1202 | } |
… |
… |
void Vmd::setDoubleMode(bool doubleMode) {
|
1502 | 1511 | |
1503 | 1512 | } |
1504 | 1513 | |
| 1514 | #ifdef USE_INDEO3 |
1505 | 1515 | if (_codecIndeo3) { |
1506 | 1516 | delete _codecIndeo3; |
1507 | 1517 | |
1508 | 1518 | _codecIndeo3 = new Indeo3(_width * (doubleMode ? 2 : 1), |
1509 | 1519 | _height * (doubleMode ? 2 : 1), _palLUT); |
1510 | 1520 | } |
| 1521 | #endif |
1511 | 1522 | |
1512 | 1523 | _doubleMode = doubleMode; |
1513 | 1524 | } |
… |
… |
void Vmd::clear(bool del) {
|
1553 | 1564 | Imd::clear(del); |
1554 | 1565 | |
1555 | 1566 | if (del) { |
| 1567 | #ifdef USE_INDEO3 |
1556 | 1568 | delete _codecIndeo3; |
| 1569 | #endif |
1557 | 1570 | delete[] _frames; |
1558 | 1571 | delete[] _vidMemBuffer; |
1559 | 1572 | } |
… |
… |
void Vmd::clear(bool del) {
|
1561 | 1574 | _hasVideo = true; |
1562 | 1575 | _videoCodec = 0; |
1563 | 1576 | |
| 1577 | #ifdef USE_INDEO3 |
1564 | 1578 | _codecIndeo3 = 0; |
| 1579 | #endif |
1565 | 1580 | |
1566 | 1581 | _partsPerFrame = 0; |
1567 | 1582 | _frames = 0; |
… |
… |
uint32 Vmd::renderFrame(int16 &left, int16 &top, int16 &right, int16 &bottom) {
|
1795 | 1810 | int16 height = bottom - top + 1; |
1796 | 1811 | int16 sW = _vidMemWidth; |
1797 | 1812 | int16 sH = _vidMemHeight; |
1798 | | uint32 dataLen = _frameDataLen; |
1799 | 1813 | |
1800 | 1814 | byte *dataPtr = _frameData; |
1801 | 1815 | byte *imdVidMem = _vidMem + sW * top + left; |
… |
… |
uint32 Vmd::renderFrame(int16 &left, int16 &top, int16 &right, int16 &bottom) {
|
1809 | 1823 | uint8 type; |
1810 | 1824 | byte *dest = imdVidMem; |
1811 | 1825 | |
| 1826 | #ifdef USE_INDEO3 |
| 1827 | uint32 dataLen = _frameDataLen; |
| 1828 | |
1812 | 1829 | if (Indeo3::isIndeo3(dataPtr, dataLen)) { |
1813 | 1830 | if (!_codecIndeo3) |
1814 | 1831 | return 0; |
… |
… |
uint32 Vmd::renderFrame(int16 &left, int16 &top, int16 &right, int16 &bottom) {
|
1831 | 1848 | return 0; |
1832 | 1849 | } |
1833 | 1850 | |
| 1851 | #else |
| 1852 | |
| 1853 | if (_externalCodec) { |
| 1854 | return 0; |
| 1855 | } else { |
| 1856 | |
| 1857 | #endif |
| 1858 | |
1834 | 1859 | type = *dataPtr++; |
1835 | 1860 | srcPtr = dataPtr; |
1836 | 1861 | |
… |
… |
Common::MemoryReadStream *Vmd::getExtraData(const char *fileName) {
|
2277 | 2302 | } |
2278 | 2303 | |
2279 | 2304 | } // End of namespace Graphics |
| 2305 | |
| 2306 | #endif // GRAPHICS_VIDEO_COKTELVIDEO_H |
diff --git a/graphics/video/coktelvideo/coktelvideo.h b/graphics/video/coktelvideo/coktelvideo.h
index db80b4c..b24195d 100644
a
|
b
|
|
23 | 23 | * |
24 | 24 | */ |
25 | 25 | |
| 26 | // Currently, only GOB plays IMDs and VMDs, so skip compiling if GOB is disabled. |
| 27 | #if !(defined(ENABLE_GOB) || defined(DYNAMIC_MODULES)) |
| 28 | |
| 29 | // Do not compile the CoktelVideo code |
| 30 | |
| 31 | #else |
| 32 | |
26 | 33 | #ifndef GRAPHICS_VIDEO_COKTELVIDEO_H |
27 | 34 | #define GRAPHICS_VIDEO_COKTELVIDEO_H |
28 | 35 | |
| 36 | #include "common/scummsys.h" |
29 | 37 | #include "common/stream.h" |
30 | 38 | #include "common/array.h" |
31 | 39 | #include "graphics/dither.h" |
… |
… |
|
34 | 42 | |
35 | 43 | namespace Graphics { |
36 | 44 | |
| 45 | #ifdef USE_INDEO3 |
37 | 46 | class Indeo3; |
| 47 | #endif |
38 | 48 | |
39 | 49 | /** Common interface for handling Coktel Vision videos and derivated formats. */ |
40 | 50 | class CoktelVideo { |
… |
… |
protected:
|
475 | 485 | bool _doubleMode; |
476 | 486 | |
477 | 487 | Graphics::PaletteLUT *_palLUT; |
| 488 | |
| 489 | #ifdef USE_INDEO3 |
478 | 490 | Indeo3 *_codecIndeo3; |
| 491 | #endif |
479 | 492 | |
480 | 493 | void clear(bool del = true); |
481 | 494 | |
… |
… |
protected:
|
519 | 532 | } // End of namespace Graphics |
520 | 533 | |
521 | 534 | #endif // GRAPHICS_VIDEO_COKTELVIDEO_H |
| 535 | |
| 536 | #endif // Engine and dynamic plugins guard |
diff --git a/graphics/video/coktelvideo/indeo3.cpp b/graphics/video/coktelvideo/indeo3.cpp
index 26d1e4c..581f59b 100644
a
|
b
|
|
23 | 23 | * |
24 | 24 | */ |
25 | 25 | |
| 26 | #include "common/scummsys.h" |
| 27 | |
| 28 | #ifdef USE_INDEO3 |
| 29 | |
26 | 30 | /* Intel Indeo 3 decompressor, derived from ffmpeg. |
27 | 31 | * |
28 | 32 | * Original copyright note: * Intel Indeo 3 (IV31, IV32, etc.) video decoder for ffmpeg |
… |
… |
const uint32 Indeo3::correctionhighorder[] = {
|
3477 | 3481 | }; |
3478 | 3482 | |
3479 | 3483 | } // End of namespace Graphics |
| 3484 | |
| 3485 | #endif // USE_INDEO3 |
diff --git a/graphics/video/coktelvideo/indeo3.h b/graphics/video/coktelvideo/indeo3.h
index c417a54..af6ef26 100644
a
|
b
|
|
23 | 23 | * |
24 | 24 | */ |
25 | 25 | |
| 26 | #include "common/scummsys.h" |
| 27 | |
| 28 | #ifdef USE_INDEO3 |
| 29 | |
26 | 30 | /* Intel Indeo 3 decompressor, derived from ffmpeg. |
27 | 31 | * |
28 | 32 | * Original copyright note: |
… |
… |
private:
|
118 | 122 | } // End of namespace Graphics |
119 | 123 | |
120 | 124 | #endif // GRAPHICS_VIDEO_INDEO3_H |
| 125 | |
| 126 | #endif // USE_INDEO3 |