summaryrefslogtreecommitdiffstats
path: root/Src/vp32
diff options
context:
space:
mode:
authorJef <jef@targetspot.com>2024-09-24 14:54:57 +0200
committerJef <jef@targetspot.com>2024-09-24 14:54:57 +0200
commit20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch)
tree12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/vp32
parentAdding .gitignore (diff)
downloadwinamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar
winamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz
winamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.bz2
winamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.lz
winamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.xz
winamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.zst
winamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.zip
Diffstat (limited to 'Src/vp32')
-rw-r--r--Src/vp32/include/CPUIdLib.h59
-rw-r--r--Src/vp32/include/VP31DVERSION.H13
-rw-r--r--Src/vp32/include/VP31EVERSION.H13
-rw-r--r--Src/vp32/include/cclib.h363
-rw-r--r--Src/vp32/include/duck_dxl.h460
-rw-r--r--Src/vp32/include/mac/duckprefix.h26
-rw-r--r--Src/vp32/include/mac/vp3eprefix.h17
-rw-r--r--Src/vp32/include/vp31/codec_common_interface.h64
-rw-r--r--Src/vp32/include/vp31/comp_interface.h89
-rw-r--r--Src/vp32/include/vp31/timer.h60
-rw-r--r--Src/vp32/include/vp31/type_aliases.h82
-rw-r--r--Src/vp32/include/vp31/vfw_PB_Interface.h78
-rw-r--r--Src/vp32/include/vp31/vfw_comp_interface.h105
13 files changed, 1429 insertions, 0 deletions
diff --git a/Src/vp32/include/CPUIdLib.h b/Src/vp32/include/CPUIdLib.h
new file mode 100644
index 000000000..550e467e5
--- /dev/null
+++ b/Src/vp32/include/CPUIdLib.h
@@ -0,0 +1,59 @@
+//==========================================================================
+//
+// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
+// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
+// PURPOSE.
+//
+// Copyright (c) 1999 - 2001 On2 Technologies Inc. All Rights Reserved.
+//
+//--------------------------------------------------------------------------
+
+
+
+#ifndef _CPUIDLIB_H
+#define _CPUIDLIB_H
+
+typedef enum PROCTYPE {
+ X86 = 0, /* 486, Pentium plain, or any other x86 compatible */
+ PMMX = 1, /* Pentium with MMX */
+ PPRO = 2, /* Pentium Pro */
+ PII = 3, /* Pentium II */
+ C6X86 = 4,
+ C6X86MX = 5,
+ AMDK63D = 6,
+ AMDK6 = 7,
+ AMDK5 = 8,
+ MACG3 = 9,
+ MAC68K = 10,
+ XMM = 11, /* SIMD instructions */
+ WMT = 12, /* Willamette Processor */
+ SpecialProc = -1 /* Will NEVER be returned by CPUID, function dependent meaning */
+}PROCTYPE;
+
+#ifdef __cplusplus /* this ifdef only works correctly for Microsoft visual C compilers */
+
+extern "C" PROCTYPE findCPUId(void);
+
+#else
+
+/*
+ * **-findCPUId
+ *
+ * This function will return the type of CPU that you have in your system.
+ *
+ * Assumptions:
+ * None
+ *
+ * Inputs:
+ * None
+ *
+ * Output:
+ * The type of CPU that you have in your system is returned
+ *
+ */
+extern PROCTYPE findCPUId(void);
+
+#endif
+
+#endif /* CPUIDLIB_H */
diff --git a/Src/vp32/include/VP31DVERSION.H b/Src/vp32/include/VP31DVERSION.H
new file mode 100644
index 000000000..a9ae5acc0
--- /dev/null
+++ b/Src/vp32/include/VP31DVERSION.H
@@ -0,0 +1,13 @@
+//==========================================================================
+//
+// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
+// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
+// PURPOSE.
+//
+// Copyright (c) 1999 - 2001 On2 Technologies Inc. All Rights Reserved.
+//
+//--------------------------------------------------------------------------
+
+
+#define VP31DVERSION "1.0.0.3"
diff --git a/Src/vp32/include/VP31EVERSION.H b/Src/vp32/include/VP31EVERSION.H
new file mode 100644
index 000000000..5cdde7e97
--- /dev/null
+++ b/Src/vp32/include/VP31EVERSION.H
@@ -0,0 +1,13 @@
+//==========================================================================
+//
+// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
+// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
+// PURPOSE.
+//
+// Copyright (c) 1999 - 2001 On2 Technologies Inc. All Rights Reserved.
+//
+//--------------------------------------------------------------------------
+
+
+#define VP31EVERSION "1.0.0.2"
diff --git a/Src/vp32/include/cclib.h b/Src/vp32/include/cclib.h
new file mode 100644
index 000000000..0822d3759
--- /dev/null
+++ b/Src/vp32/include/cclib.h
@@ -0,0 +1,363 @@
+//==========================================================================
+//
+// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
+// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
+// PURPOSE.
+//
+// Copyright (c) 1999 - 2001 On2 Technologies Inc. All Rights Reserved.
+//
+//--------------------------------------------------------------------------
+
+
+#ifndef _CCLIB_H
+#define _CCLIB_H
+#include "cpuidlib.h"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/*
+ * **-CCLIB.H
+ *
+ * ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage **
+ * ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage **
+ * ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage **
+ *
+ *
+ *
+ * The library contains color space conversion functions. The proper way to use this library is to
+ * call InitCCLib with a value of "SpecialProc" BEFORE attempting any color space conversions. DeInitCCLib
+ * should be called when you are done with the libary. It will preform any clean up that is necessary.
+ *
+ *
+ *
+ *
+ * ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage **
+ * ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage **
+ * ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage ** Usage **
+ */
+
+
+
+/*
+ * **-InitCCLib
+ *
+ * This function MUST be called before attempting to use any of the functions in the library.
+ * This function will initilize all the function pointers to point to valid routines.
+ *
+ * Assumptions:
+ * Assumes that it is safe to write to the function pointers.
+ *
+ * Input:
+ * CpuType - If CpuType type is set to "SpecialProc" the code will autodetect the CPU and initilize the function
+ * pointers appropiatly. If CpuType is set to any other value it will assume that that was the CPUType
+ * detected. NOTE: You should be careful when forcing the CPU to a specific type. If you force the
+ * CPU type to one that is not valid for your system you will most likely crash.
+ *
+ * Output:
+ * Return Non-Zero value if there was a problem initilizing the function pointers
+ *
+ * Function pointers RGB32toYV12FuncPtr
+ * RGB24toYV12FuncPtr
+ * YVYUtoYV12FuncPtr
+ *
+ * Initilized to point to the proper routines for this system
+ */
+int InitCCLib( PROCTYPE CpuType );
+
+
+/*
+ * **-DeInitCCLib
+ *
+ * You should call this function when you are done using the color conversion library.
+ *
+ * Assumptions:
+ * You are done with the color conversion library and would like it to clean up after itself
+ *
+ * Input:
+ * None
+ *
+ * Output:
+ * No explicit return value
+ *
+ * color conversion library cleaned up
+ */
+void DeInitCCLib( void );
+
+/*
+ * *** N O T E *** N O T E *** *** N O T E *** N O T E *** *** N O T E *** N O T E *** *** N O T E *** N O T E *** *** N O T E *** N O T E ***
+ *
+ *
+ * There are macros below to reduce the pain needed to use these functions
+ *
+ *
+ * *** N O T E *** N O T E *** *** N O T E *** N O T E *** *** N O T E *** N O T E *** *** N O T E *** N O T E *** *** N O T E *** N O T E ***
+ */
+
+/*
+ * **-RGB32toYV12FuncPtr
+ *
+ * This function pointer points to the fastest version of the function that will convert a RGB32 buffer to planer YV12 output
+ * Alpha is ignored.
+ *
+ * InitCCLib MUST be called before using this function pointer or you will go off into the weeds.
+ *
+ * Inputs:
+ * RGBABuffer - Pointer to buffer containing RGB data. We assume that data looks like
+ *
+ * +---+---+---+---+---+---+---+---+
+ * Memory Address | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
+ * +---+---+---+---+---+---+---+---+
+ * Contents | B | G | R | A | B | G | R | A |
+ * +---+---+---+---+---+---+---+---+
+ *
+ * ImageWidth - Width (in pixels) of the image to be processed
+ *
+ * ImageHeight - Height (in pixels) of the image to be processed
+ *
+ * YBuffer - Pointer to buffer where we should place the converted Y data. The caller needs to
+ * ensure that sufficent memory is allocated. We do not check.
+ *
+ * UBuffer - Pointer to buffer where we should place the converted U data. The caller needs to
+ * ensure that sufficent memory is allocated. We do not check.
+ *
+ * VBuffer - Pointer to buffer where we should place the converted U data. The caller needs to
+ * ensure that sufficent memory is allocated. We do not check.
+ *
+ * Outputs:
+ * YBuffer - Buffer filled with RGB data converted to YV12 format
+ *
+ * UBuffer - Buffer filled with RGB data converted to YV12 format
+ *
+ * VBuffer - Buffer filled with RGB data converted to YV12 format
+ *
+ * Assumptions:
+ * Assumes that InitCCLib has been called to initilize this function pointer
+ *
+ * We assume that the width and height of the image passed in is even. If it is not
+ * the last line and column will get bad U and V values. This is due to us averging
+ * 4x4 block to get U and V values.
+ *
+ * Formulas:
+ * Cb = U
+ * Cr = V
+ *
+ * Y = 0.257R + 0.504G + 0.098B + 16
+ * Cb = -0.148R - 0.291G + 0.439B + 128
+ * Cr = 0.439R - 0.368G - 0.071B + 128
+ *
+ * The formulas above were obtained from the book Video Demistyfied.
+ *
+ * The YV12 format drops every other U and V across and every other U, V vertical line.
+ * To calculate U and V we will average the 4 RGB values before we convert to U and V.
+ * This is slightly less accurate than converting the 4 RGB values to 4 U and V values
+ * and then averaging the U and V values. The plus side of averaging before is that
+ * we the coversion is about 10% faster than if we were to convert the values and then
+ * average.
+ *
+ * We process the image in 2x2 blocks. From left to right then from top to bottom.
+ * Given the following image we will process it in the following order
+ *
+ * 1) (0,0), (0,1), (1,0), (1,1)
+ * 2) (0,2), (0,3), (1,2), (1,3)
+ * 3) (2,0), (2,1), (2,2), (2,3)
+ * 4) (3,0), (3,1), (3,2), (3,3)
+ *
+ * +-----+-----+-----+-----+
+ * | 0,0 | 0,1 | 0,2 | 0,3 |
+ * +-----+-----+-----+-----+
+ * | 1,0 | 1,1 | 1,2 | 1,3 |
+ * +-----+-----+-----+-----+
+ * | 2,0 | 2,1 | 2,2 | 2,3 |
+ * +-----+-----+-----+-----+
+ * | 3,0 | 3,1 | 3,2 | 3,3 |
+ * +-----+-----+-----+-----+
+ *
+ * To try and avoid rounding errors we are going to scale the number and only
+ * convert when we write the number to memory.
+ *
+ * When we finally scale the numbers down we will round values with fractions
+ * greater than .5 up and less than .5 down. To achieve this we add in a round
+ * factor which is equal to half of the amount that we divide by.
+ *
+ * The values that this function generates for Y, Cr, Cb are very accurate.
+ * Utilizing double precision floating point will not generate more accurate
+ * results.
+ *
+ * When converting from the 32-bit Y, Cb, Cr to the 8-bit Y, Cb, Cr values we do
+ * not need to worry about over flowing the 8-bit value. Using the worst R, G, B
+ * values we get the following Min and Max values for Y, Cb, Cr.
+ *
+ * +=====+=====+=====++=====+=====+=====++=========+
+ * | R | G | B || Y | Cb | Cr || |
+ * +=====+=====+=====++=====+=====+=====++=========+
+ * | 255 | 255 | 0 || 210 | 16 | 146 || Min Cb |
+ * +-----+-----+-----++-----+-----+-----++---------+
+ * | 0 | 0 | 255 || 40 | 239 | 109 || Max Cb |
+ * +-----+-----+-----++-----+-----+-----++---------+
+ * | 0 | 255 | 255 || 169 | 165 | 16 || Min Cr |
+ * +-----+-----+-----++-----+-----+-----++---------+
+ * | 255 | 0 | 0 || 81 | 90 | 239 || Max Cr |
+ * +-----+-----+-----++-----+-----+-----++---------+
+ * | 0 | 0 | 0 || 16 | 128 | 128 || Min Y |
+ * +-----+-----+-----++-----+-----+-----++---------+
+ * | 255 | 255 | 255 || 235 | 128 | 128 || Max Y |
+ * +-----+-----+-----++-----+-----+-----++---------+
+ *
+ *
+ */
+extern void (*RGB32toYV12FuncPtr)( unsigned char *RGBABuffer, int ImageWidth, int ImageHeight,
+ unsigned char *YBuffer, unsigned char *UBuffer, unsigned char *VBuffer );
+
+/*
+ * **-RGB24toYV12FuncPtr
+ *
+ * This function is 99.99% the same as CC_RGB32toYV12 see comments for CC_RGB32toYV12 if you want to know how this
+ * function works. The only difference from CC_RGB32toYV12 is we assume that
+ * the input buffer is of the RGB 24 format given below.
+ *
+ * +---+---+---+---+---+---+---+---+
+ * Memory Address | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
+ * +---+---+---+---+---+---+---+---+
+ * Contents | B | G | R | B | G | R | B | G |
+ * +---+---+---+---+---+---+---+---+
+ *
+ */
+extern void (*RGB24toYV12FuncPtr)( unsigned char *RGBBuffer, int ImageWidth, int ImageHeight,
+ unsigned char *YBuffer, unsigned char *UBuffer, unsigned char *VBuffer );
+
+/*
+ * **-YVYUtoYV12FuncPtr
+ *
+ * This function pointer points to the fastest version of the following function that will run on
+ * this system.
+ *
+ * InitCCLib MUST be called before trying to use this pointer. If you do not you will be in the
+ * weeds
+ *
+ * The function will convert a YVYU (a.k.a. YUV 4:2:2) format YUV buffer to YV12 format buffer.
+ * The YVYU format has two lines of U and V data per two lines of Y data. The YV12 format only
+ * has one line of U, V data per two lines of Y data. To fit the extra U, V data into a single U, V
+ * line we will average the two U, V lines.
+ *
+ * Example:
+ * +--------+--------+--------+--------+--------+--------+--------+--------+-----+
+ * | Y(0,0) | U(0,0) | Y(0,1) | V(0,0) | Y(0,2) | U(0,1) | Y(0,1) | V(0,1) | ... |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+-----+
+ * | Y(1,0) | U(1,0) | Y(1,1) | V(1,0) | Y(1,2) | U(1,1) | Y(1,1) | V(1,1) | ... |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+-----+
+ * | Y(2,0) | U(2,0) | Y(2,1) | V(2,0) | Y(2,2) | U(2,1) | Y(2,1) | V(2,1) | ... |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+-----+
+ * | Y(3,0) | U(3,0) | Y(3,1) | V(3,0) | Y(3,2) | U(3,1) | Y(3,1) | V(3,1) | ... |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+-----+
+ * | ... | ... | ... | ... | ... | ... | ... | ... | ... |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+-----+
+ *
+ *
+ * ==
+ *
+ * +--------+--------+--------+--------+-----+
+ * | Y(0,0) | Y(0,1) | Y(0,2) | Y(0,1) | ... |
+ * +--------+--------+--------+--------+-----+
+ * | Y(1,0) | Y(1,1) | Y(1,2) | Y(1,1) | ... |
+ * +--------+--------+--------+--------+-----+
+ * | Y(2,0) | Y(2,1) | Y(2,2) | Y(2,1) | ... |
+ * +--------+--------+--------+--------+-----+
+ * | Y(3,0) | Y(3,1) | Y(3,2) | Y(3,1) | ... |
+ * +--------+--------+--------+--------+-----+
+ * | ... | ... | ... | ... | ... |
+ * +--------+--------+--------+--------+-----+
+ *
+ *
+ * +--------------------+--------------------+------+
+ * | AVG[U(0,0),U(1,0)] | AVG[U(0,1),U(1,1)] | ... |
+ * +--------------------+--------------------+------+
+ * | AVG[U(2,0),U(3,0)] | AVG[U(2,1),U(3,1)] | ... |
+ * +--------------------+--------------------+------+
+ * | ... | ... | ... |
+ * +--------------------+--------------------+------+
+ *
+ *
+ * +--------------------+--------------------+------+
+ * | AVG[V(0,0),U(1,0)] | AVG[V(0,1),U(1,1)] | ... |
+ * +--------------------+--------------------+------+
+ * | AVG[V(2,0),U(3,0)] | AVG[V(2,1),U(3,1)] | ... |
+ * +--------------------+--------------------+------+
+ * | ... | ... | ... |
+ * +--------------------+--------------------+------+
+ *
+ * A single pass of the core look will process two horizontal lines of the image at once.
+ * The makes it easier to average the U and V values.
+ *
+ *
+ * Inputs:
+ * YVYUBuffer - Pointer to buffer containing YVYU data. We assume that the data looks like
+ *
+ * +---+---+---+---+---+---+---+---+
+ * Memory Address | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
+ * +---+---+---+---+---+---+---+---+
+ * Contents | Y | V | Y | U | Y | V | Y | U |
+ * +---+---+---+---+---+---+---+---+
+ *
+ * ImageWidth - Width (in pixels) of the image to be processed
+ *
+ * ImageHeight - Height (in pixels) of the image to be processed
+ *
+ * YBuffer - Pointer to buffer where we should place the converted Y data. The caller needs to
+ * ensure that sufficent memory is allocated. We do not check.
+ *
+ * UBuffer - Pointer to buffer where we should place the converted U data. The caller needs to
+ * ensure that sufficent memory is allocated. We do not check.
+ *
+ * VBuffer - Pointer to buffer where we should place the converted U data. The caller needs to
+ * ensure that sufficent memory is allocated. We do not check.
+ *
+ * Outputs:
+ * YBuffer - Buffer filled with YVYU data converted to YV12 format
+ *
+ * UBuffer - Buffer filled with YVYU data converted to YV12 format
+ *
+ * VBuffer - Buffer filled with YVYU data converted to YV12 format
+ *
+ * Assumptions:
+ * Assumes that InitCCLib has been called to initilize this function pointer
+ *
+ * Height of the image that we are processing is assumed to be even. If
+ * the height is not even the last line of the image will be corrupted.
+ *
+ * For the C version the width of the image must be a multiple of two. For
+ * the assembly version the width of the image must be a multiple of 8.
+ *
+ */
+extern void (*YVYUtoYV12FuncPtr)( unsigned char *YVYUBuffer, int ImageWidth, int ImageHeight,
+ unsigned char *YBuffer, unsigned char *UBuffer, unsigned char *VBuffer );
+
+
+/*
+ * Macros to make it easier to call the needed functions
+ */
+#define CC_RGB32toYV12( _RGBABuffer, _ImageWidth, _ImageHeight, _YBuffer, _UBuffer, _VBuffer ) \
+ (*RGB32toYV12FuncPtr)( _RGBABuffer, _ImageWidth, _ImageHeight, _YBuffer, _UBuffer, _VBuffer )
+
+#define CC_RGB24toYV12( _RGBBuffer, _ImageWidth, _ImageHeight, _YBuffer, _UBuffer, _VBuffer ) \
+ (*RGB24toYV12FuncPtr)( _RGBBuffer, _ImageWidth, _ImageHeight, _YBuffer, _UBuffer, _VBuffer )
+
+#define CC_YVYUtoYV12( _YVYUBuffer, _ImageWidth, _ImageHeight, _YBuffer, _UBuffer, _VBuffer ) \
+ (*YVYUtoYV12FuncPtr)( _YVYUBuffer, _ImageWidth, _ImageHeight, _YBuffer, _UBuffer, _VBuffer )
+
+
+void ConvertRGBtoYUV(
+ unsigned char *r_src,unsigned char *g_src,unsigned char *b_src,
+ int width, int height, int rgb_step, int rgb_pitch,
+ unsigned char *y_src, unsigned char *u_src, unsigned char *v_src,
+ int uv_width_shift, int uv_height_shift,
+ int y_step, int y_pitch,int uv_step,int uv_pitch
+ );
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* _CCLIB_H */
diff --git a/Src/vp32/include/duck_dxl.h b/Src/vp32/include/duck_dxl.h
new file mode 100644
index 000000000..40377aaa4
--- /dev/null
+++ b/Src/vp32/include/duck_dxl.h
@@ -0,0 +1,460 @@
+//==========================================================================
+//
+// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
+// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
+// PURPOSE.
+//
+// Copyright (c) 1999 - 2001 On2 Technologies Inc. All Rights Reserved.
+//
+//--------------------------------------------------------------------------
+
+
+#ifndef _duck_dxl_h
+#define _duck_dxl_h
+
+
+/******************************************************************************\
+* *
+* duck_dxl.h - TrueMotion include file for decompression libraries *
+* *
+* Version: 6.0.0 *
+* Created: 3/3/98 *
+* *
+\******************************************************************************/
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+/* enumerated data types */
+
+typedef enum BLITQUALITY {
+ DXBLIT_SAME = 0, /* Blit directly, w/o stretching */
+ DXBLIT_R1,
+ DXBLIT_R2,
+ DXBLIT_STRETCH, /* double horizontally, skip lines vertically */
+ DXBLIT_R3,
+ DXBLIT_STRETCH_BRIGHT, /* double horizontally, interpolate vertically */
+ DXBLIT_R4,
+ DXBLIT_R5,
+ DXBLIT_R6,
+ DXBLIT_NONE,
+ DXBLITMAX
+} dxvBlitQuality ;
+
+typedef enum BITDEPTH {
+ DXRGBNULL = 0,
+ DXRGB8 = 1,
+
+ DXRGB16_555 = 2,
+ DXRGB24 = 3,
+ DXRGB_UNUSED = 4,
+ DXRGB16VESA = 5,
+ DXRGB8VESA = 6,
+ DXRGB16_565 = 7,
+
+ DXYUY2 = 8,
+ DXYVU9 = 9,
+ DXYV12 = 10,
+ DXUYVY = 11,
+
+ DXRGB32 = 12,
+ DXRGB16VESA_565 = 13,
+ DXHALFTONE8 =14,
+ DXMAX
+} dxvBitDepth ;
+
+#define DXRGB16 DXRGB16_555
+#define DXRGB24CHAR DXRGB24
+
+typedef enum OFFSETXY {
+ DXL_ABSOLUTE = 0,
+ DXL_RELATIVE
+} dxvOffsetMode;
+
+typedef enum IMAGETYPE {
+ DXL_INTRAFRAME = 0,
+ DXL_INTERFRAME,
+ DXL_SPRITE
+} dxvImageType;
+
+typedef enum DXL_ERR{
+ DXL_LOW_ERR = -32000,
+ DXL_INVALID_REQUEST = -8,
+ DXL_VERSION_CONFLICT = -7,
+ DXL_INVALID_DATA = -7,
+ DXL_INVALID_BLIT = -6,
+ DXL_BAD_DATA = -5,
+ DXL_ALLOC_FAILED = -4,
+ DXL_NULL_FRAME = -3,
+ DXL_NULLSOURCE = -2,
+ DXL_NOTINUSE = -1,
+ DXL_OK = 0,
+ DXL_HOLD_FRAME = 1
+} dxvError ;
+
+typedef enum BGMODE /* sprite drawing modes
+ v1.0.2 supports NORM & NO_BACKGROUND */{
+ NORM = 0, /* normal sprite mode, blend edges w/background */
+ NO_BACKGROUND = 1,/* transparant sprite mode 1,
+ sets all background data transparant no blending */
+ NORM_TRANS = 2, /* transparant sprite mode 2,
+ blend edges (alphas) w/separate background buffer,
+ set sprite background to trans */
+ RGB_OPAQUE = 3, /* blend edges to sprColor, set background to sprColor*/
+ RGB_TRANS = 4 /* blend edges w/sprColor, set background to trans */
+} dxvBackgroundMode ;
+
+/*********************************************************/
+
+/* definition of data handles */
+
+typedef struct vScreen *DXL_VSCREEN_HANDLE;
+typedef struct tXImage *DXL_XIMAGE_HANDLE;
+typedef struct tXAudioSource *DXL_XAUDIOSRC_HANDLE;
+typedef struct tAudioBuff *DXL_AUDIODST_HANDLE;
+
+/* main video decompression init, exit and query */
+
+int DXL_InitVideo(int maxScreens,int maxImages);
+void DXL_ExitVideo(void);
+
+/*get pointer to NULL terminated
+ array of supported fourCCs */
+unsigned long *DXL_GetFourCCList(void);
+
+/* create an xImage (decompressor) object,
+ based on the provided compressed data */
+DXL_XIMAGE_HANDLE DXL_CreateXImage(
+ unsigned char *data
+ );
+
+int DXL_SetXImageCSize(DXL_XIMAGE_HANDLE xImage, int compressedSize);
+int DXL_InitVideoEx(int lmaxScreens, int lmaxImages);
+
+/* create an xImage (decompressor) object
+ of a specific type */
+DXL_XIMAGE_HANDLE DXL_CreateXImageOfType(
+ unsigned char *data,
+ unsigned long fccType
+ );
+
+/* destroy the specified xImage */
+void DXL_DestroyXImage(DXL_XIMAGE_HANDLE src);
+
+/* feed the xImage new data, get ready to decompress */
+int DXL_AlterXImageData(
+ DXL_XIMAGE_HANDLE src,
+ unsigned char *ptrData
+ );
+
+/* explicitly alter attributes of an xImage */
+DXL_XIMAGE_HANDLE DXL_AlterXImage(
+ DXL_XIMAGE_HANDLE ,
+ unsigned char *ptrData,
+ int xImType,
+ dxvBitDepth bitDepth ,
+ int maxWidth,int maxHeight
+ );
+
+/* get xImage target bounding rectangle */
+int DXL_GetXImageDirtyXYWH(
+ DXL_XIMAGE_HANDLE ,
+ int *,int *,int *,int *
+ );
+
+/* force decompressor to refresh all destination pixels */
+int DXL_SetXImageBlitAll(
+ DXL_XIMAGE_HANDLE xImage
+ );
+
+/* if available, get pointer to internal frameBuffer */
+void *DXL_GetXImageFrameBuffer(
+ DXL_XIMAGE_HANDLE src
+ );
+
+long DXL_GetXImageCSize(
+ DXL_XIMAGE_HANDLE src
+ );
+
+/* change x,y, offset at which to decompress image */
+int DXL_MoveXImage(
+ DXL_XIMAGE_HANDLE src,
+ dxvOffsetMode mode,
+ int x,int y
+ );
+
+/* set sprite transparency mode (SegaSaturn only) */
+int DXL_AlterXImageSpriteModes(
+ DXL_XIMAGE_HANDLE src,
+ int sprMode, int sprColor
+ );
+
+/* get application specified x,y offset,
+ and overall decompressed width and height */
+int DXL_GetXImageXYWH(
+ DXL_XIMAGE_HANDLE src,
+ int *x,int *y,int *w, int *h
+ );
+
+int DXL_GetXImageType(DXL_XIMAGE_HANDLE src);
+int DXL_GetXImageColorDepth(DXL_XIMAGE_HANDLE src);
+int DXL_IsXImageKeyFrame(DXL_XIMAGE_HANDLE src);
+
+/* decompress and blit as a single process */
+int DXL_dxImageToVScreen(
+ DXL_XIMAGE_HANDLE src,
+ DXL_VSCREEN_HANDLE dst
+ );
+
+/* compatibility check prior between
+ decompressor and destination */
+int DXL_CheckdxImageToVScreen(
+ DXL_XIMAGE_HANDLE src,
+ DXL_VSCREEN_HANDLE dst
+ );
+
+/* blit from xImage internal "working area" to vScreen */
+int DXL_BlitXImageToVScreen(
+ DXL_XIMAGE_HANDLE src,
+ DXL_VSCREEN_HANDLE dst
+ );
+
+/* vscreen management functions */
+
+/* create a virtual screen target for decompression (renderer?) */
+DXL_VSCREEN_HANDLE DXL_CreateVScreen(
+ unsigned char *addr,
+ dxvBitDepth colorMode,
+ short bytePitch,
+ short height
+ );
+
+/* alter attributes of an existing vScreen */
+int DXL_AlterVScreen(
+ DXL_VSCREEN_HANDLE dst,
+ unsigned char *addr,
+ dxvBitDepth colorMode,
+ int bytePitch,
+ int height
+ );
+
+
+void DXL_VScreenSetInfoDotsFlag(DXL_VSCREEN_HANDLE vScreen, int showDots);
+
+
+/* alter clipping rectangle of vScreen */
+/* not supported by all decompressors */
+int DXL_AlterVScreenClip(
+ DXL_VSCREEN_HANDLE dst,
+ int x,int y,
+ int w,int h
+ );
+
+/* alter viewport rectangle of vScreen */
+/* width/height not supported by all decompressors */
+int DXL_AlterVScreenView(
+ DXL_VSCREEN_HANDLE dst,
+ int x,int y,
+ int w,int h
+ );
+
+/* destroy a vScreen object/struct */
+void DXL_DestroyVScreen(
+ DXL_VSCREEN_HANDLE dst
+ );
+
+/* set blit mode/quality of a vScreen
+ same (normal), stretch (black lined)
+ stretch bright (stretched w/interpolation) */
+int DXL_SetVScreenBlitQuality(
+ DXL_VSCREEN_HANDLE dest,
+ dxvBlitQuality bq
+ );
+
+/* get vScreens current blit mode/quality */
+dxvBlitQuality DXL_GetVScreenBlitQuality(
+ DXL_VSCREEN_HANDLE
+ );
+
+/* alter spite background associated with a vscreen */
+/* used only by SegaSaturn for hardware sprite support */
+int DXL_AlterVScreenBackground(
+ DXL_VSCREEN_HANDLE ,
+ unsigned char *,
+ dxvBitDepth bd ,int ,int ,int ,int
+ );
+
+/* set DOS VESA mode for vScreen (DOS only) */
+int DXL_AlterVScreenVESAMode(
+ DXL_VSCREEN_HANDLE ,
+ int vesaMode
+ );
+
+/* set physical screen to vScreen's vesa mode */
+int DXL_ActivateVScreenVESAMode(DXL_VSCREEN_HANDLE);
+
+/* get vScreen (generally physical) vesa mode */
+int DXL_GetVScreenVESAMode(DXL_VSCREEN_HANDLE );
+
+void DXL_EraseVScreen(DXL_VSCREEN_HANDLE );
+void DXL_BlackLineVScreen(DXL_VSCREEN_HANDLE );
+
+/* copy one vScreen to another */
+/* provides support for offscreen compositing,
+ 16 bit and 8 bit modes only */
+int DXL_BlitVScreenToVScreen(
+ DXL_VSCREEN_HANDLE fromVScreen,
+ DXL_VSCREEN_HANDLE toVScreen
+ );
+
+/* get attributes of the vScreen */
+int DXL_GetVScreenAttributes(
+ DXL_VSCREEN_HANDLE vScreen,
+ void **addr,
+ dxvBlitQuality *bq,
+ short *pitch,
+ short *height
+ );
+
+char *DXL_GetXImageStats(DXL_XIMAGE_HANDLE xImage,char *storage);
+
+
+/* get vScreen's current viewport rectangle
+ a viewport represents an x,y, offset and
+ a clipping width and height */
+int DXL_GetVScreenView(
+ DXL_VSCREEN_HANDLE dst,
+ int *x,int *y,int *w,int *h
+ );
+
+/* get vScreen's current clipping rectangle */
+int DXL_GetVScreenClip(
+ DXL_VSCREEN_HANDLE dst,
+ int *x,int *y,int *w,int *h
+ );
+
+/* provide Color lookup tables for 8 bit support */
+int DXL_SetVScreenCLUTs(
+ DXL_VSCREEN_HANDLE vScr,
+ unsigned char *clpt,
+ unsigned char *clpt2,
+ int exp
+ );
+
+/* return the palette currently used */
+int DXL_GetBitDepthPalette(dxvBitDepth colorMode,
+ unsigned char **pal);
+
+/* relinquish color lookup table structures */
+void DXL_ResetVScreenCLUTs(
+ DXL_VSCREEN_HANDLE vScr
+ );
+
+/* check to see if a blit mode is supported */
+
+int DXL_CheckVScreenBlit(DXL_VSCREEN_HANDLE dst,unsigned long fourcc);
+int DXL_CheckVScreenXImageBlit(DXL_VSCREEN_HANDLE dst,DXL_XIMAGE_HANDLE src);
+
+/* audio function prototypes */
+
+int DXL_InitAudio(int srcs,int dsts);
+void DXL_ExitAudio(void);
+
+typedef struct tDKWAVEFORM *DKWAVEFORMPTR; /* place holder pointer */
+
+/* create a compressed audio source (decompressor) */
+DXL_XAUDIOSRC_HANDLE DXL_CreateXAudioSrc(
+ DKWAVEFORMPTR wv,
+ unsigned char *addr,int length
+ );
+
+/* feed an audio decompressor new data (w/o decompressing) */
+void DXL_AlterXAudioData(
+ DXL_XAUDIOSRC_HANDLE xSource,
+ unsigned char *addr,int length
+ );
+
+/* destroy an audio decompressor */
+void DXL_DestroyXAudioSrc(DXL_XAUDIOSRC_HANDLE xSource);
+
+/* create a audio destination description */
+DXL_AUDIODST_HANDLE DXL_CreateAudioDst(
+ void *addrL,void *addrR,
+ int length,int bitDepth,
+ int numChannels,
+ int sampleRate
+ );
+
+/* change characteristics of audio destination descriptor */
+void DXL_AlterAudioDst(
+ DXL_AUDIODST_HANDLE dst,
+ void *addrL,void *addrR,
+ int length,int bitDepth,
+ int numChannels,
+ int sampleRate
+ );
+
+/* destroy audio destination description struct */
+void DXL_DestroyAudioDst(DXL_AUDIODST_HANDLE dst);
+
+/* decompress up to maxSamplesToDecompress */
+/* function returns the actual number of
+ samples decompressed */
+int DXL_dxAudio(
+ DXL_XAUDIOSRC_HANDLE src,
+ DXL_AUDIODST_HANDLE dst,
+ int maxSamplesToDecompress
+ );
+
+/* windows 95 dll system abstraction functions */
+
+/* set memory allocator function */
+void DXV_Setmalloc(
+ void *(*mallocFuncPtr)(unsigned int size)
+ );
+
+/* set cleared memory allocator function */
+void DXV_Setcalloc(
+ void *(*callocFuncPtr)(unsigned int size, unsigned int number)
+ );
+
+/*set memory free function */
+void DXV_Setfree(
+ void (*freeFuncPtr)(void *)
+ );
+
+
+/* can only have a max of 32 cpu specific features */
+typedef enum tCPU_FEATURES
+{
+ NO_FEATURES = 0,
+ MMX_SUPPORTED = 1
+} CPU_FEATURES;
+
+CPU_FEATURES DXL_GetCPUFeatures(void);
+unsigned long DXL_GetXImageFOURCC(DXL_XIMAGE_HANDLE src);
+
+
+void vp31_SetParameter(DXL_XIMAGE_HANDLE src,int Command, unsigned long Parameter );
+
+
+
+//int DXL_RegisteredAudioDXerGet(DXL_AUDIO_REGISTRATION *oneRegistration);
+
+typedef struct tFrameInfo
+{
+ int KeyFrame;
+ int Version;
+ int Quality;
+ int vp30Flag;
+} FrameInfo;
+
+void vp31_GetInfo(unsigned char * source, FrameInfo * frameInfo);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /* include guards */
diff --git a/Src/vp32/include/mac/duckprefix.h b/Src/vp32/include/mac/duckprefix.h
new file mode 100644
index 000000000..75fb6d76f
--- /dev/null
+++ b/Src/vp32/include/mac/duckprefix.h
@@ -0,0 +1,26 @@
+
+
+#define MAC
+#define MACPPC
+
+//#define TM2B
+//#define TORQB
+#define VP30B
+#define VP31B
+#define VP3XB
+
+#define NETHFB 1
+
+//defines for VP31
+#define PBDLL
+#define PREDICT_2D
+#define VFW_PB
+//#define USE_DRAWDIB
+//#define VPED_EXPORTS
+
+#define POSTPROCESS 1
+
+
+
+#define _inline
+#define __inline \ No newline at end of file
diff --git a/Src/vp32/include/mac/vp3eprefix.h b/Src/vp32/include/mac/vp3eprefix.h
new file mode 100644
index 000000000..204282838
--- /dev/null
+++ b/Src/vp32/include/mac/vp3eprefix.h
@@ -0,0 +1,17 @@
+#define MACPPC
+#define __try
+#define __except(X)
+#define _inline
+#define __inline
+
+#define VFW_PB
+#define VFW_COMP
+#define COMPDLL
+#define PREDICT_2D
+//#define PBDLL
+#define USE_DRAWDIB
+#define POSTPROCESS
+//#define CPUISLITTLEENDIAN
+
+
+//#define __try try \ No newline at end of file
diff --git a/Src/vp32/include/vp31/codec_common_interface.h b/Src/vp32/include/vp31/codec_common_interface.h
new file mode 100644
index 000000000..f7909290f
--- /dev/null
+++ b/Src/vp32/include/vp31/codec_common_interface.h
@@ -0,0 +1,64 @@
+//==========================================================================
+//
+// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
+// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
+// PURPOSE.
+//
+// Copyright (c) 1999 - 2001 On2 Technologies Inc. All Rights Reserved.
+//
+//--------------------------------------------------------------------------
+
+
+/****************************************************************************
+*
+* Module Title : codec_common_if.H
+*
+* Description : Interface to video codec demo decompressor DLL
+*
+*****************************************************************************
+*/
+
+#ifndef CODEC_COMMON_INTERFACE_H
+#define CODEC_COMMON_INTERFACE_H
+
+#define __export
+#define _export
+#define DllExport __declspec( dllexport )
+#define DllImport __declspec( dllimport )
+
+// Playback ERROR Codes.
+#define NO_DECODER_ERROR 0
+#define REMOTE_DECODER_ERROR -1
+
+#define DFR_BAD_DCT_COEFF -100
+#define DFR_ZERO_LENGTH_FRAME -101
+#define DFR_FRAME_SIZE_INVALID -102
+#define DFR_OUTPUT_BUFFER_OVERFLOW -103
+#define DFR_INVALID_FRAME_HEADER -104
+#define FR_INVALID_MODE_TOKEN -110
+#define ETR_ALLOCATION_ERROR -200
+#define ETR_INVALID_ROOT_PTR -201
+#define SYNCH_ERROR -400
+#define BUFFER_UNDERFLOW_ERROR -500
+#define PB_IB_OVERFLOW_ERROR -501
+
+// External error triggers
+#define PB_HEADER_CHECKSUM_ERROR -601
+#define PB_DATA_CHECKSUM_ERROR -602
+
+// DCT Error Codes
+#define DDCT_EXPANSION_ERROR -700
+#define DDCT_INVALID_TOKEN_ERROR -701
+
+// ExceptionErrors
+#define GEN_EXCEPTIONS -800
+#define EX_UNQUAL_ERROR -801
+
+// Unrecoverable error codes
+#define FATAL_PLAYBACK_ERROR -1000
+#define GEN_ERROR_CREATING_CDC -1001
+#define GEN_THREAD_CREATION_ERROR -1002
+#define DFR_CREATE_BMP_FAILED -1003
+
+#endif \ No newline at end of file
diff --git a/Src/vp32/include/vp31/comp_interface.h b/Src/vp32/include/vp31/comp_interface.h
new file mode 100644
index 000000000..1d4d529a0
--- /dev/null
+++ b/Src/vp32/include/vp31/comp_interface.h
@@ -0,0 +1,89 @@
+//==========================================================================
+//
+// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
+// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
+// PURPOSE.
+//
+// Copyright (c) 1999 - 2001 On2 Technologies Inc. All Rights Reserved.
+//
+//--------------------------------------------------------------------------
+
+
+/****************************************************************************
+*
+* Module Title : COMP_INTERFACE.H
+*
+* Description : Interface to video codec demo compressor DLL
+*
+*
+*****************************************************************************
+*/
+
+#ifndef COMP_INTERFACE_H
+#define COMP_INTERFACE_H
+
+#define INC_WIN_HEADER 1
+#include <windows.h>
+
+#include "codec_common_interface.h"
+#include "type_aliases.h"
+
+/* Command interface to compressor. */
+/* Settings Control */
+typedef enum
+{ C_FRAME_SIZE,
+ C_QUALITY, // Quality trade off value (0 best to 15 worst)
+ C_DATA_RATE,
+ C_FRAME_RATE,
+ C_FORCE_BASE_FRAME, // Forces a key frame
+ C_RESYNCH_VIDEO, // Forces video to re-synch
+ C_SETUP_GRABBER,
+ C_RESET_FRAME_COUNTER, // Relates to stats - may be removed
+
+ /* Specialist test facilities. */
+ C_ON_LINE, // Test function soon to be removed
+
+ C_INTER_PREDICTION, // Test code soon to be removed
+ C_MOTION_COMP, // Test code soon to be removed
+ C_EXT_SRC, // Test code soon to be removed
+
+} C_SETTING;
+
+typedef enum
+{
+ LOCAL_NORMAL,
+ LOCAL_GF,
+
+} LOCAL_DISP_MODE;
+
+typedef struct
+{
+ UINT32 CompTime;
+ UINT32 MeanCompTime;
+ UINT32 PPTime;
+ UINT32 MeanPPTime;
+
+} COMP_TIMINGS;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+typedef struct CP_INSTANCE * xCP_INST;
+extern BOOL CCONV StartEncoder( xCP_INST cpi, UINT32 FrameSize, UINT32 TargetRate, UINT32 Quality );
+extern int CCONV GetCompressorSetting ( xCP_INST cpi, C_SETTING Setting );
+extern void CCONV ChangeCompressorSetting ( xCP_INST cpi, C_SETTING Setting, int Value );
+extern INT32 CCONV GetVideoData( xCP_INST cpi, UINT8 * VideoBufferPtr );
+extern BOOL CCONV StopEncoder(xCP_INST cpi );
+extern BOOL CCONV GetFrameDetails( xCP_INST cpi, UINT32 * FrameNumber, UINT32 * FrameSize );
+extern void CCONV GetStillFrame( xCP_INST cpi, BOOL FullStill );
+extern void CCONV ResumeVideo(xCP_INST cpi);
+extern xCP_INST CreateCPInstance(void);
+extern void DeleteCPInstance(xCP_INST *cpi);
+
+#ifdef _cplusplus
+}
+#endif
+
+#endif \ No newline at end of file
diff --git a/Src/vp32/include/vp31/timer.h b/Src/vp32/include/vp31/timer.h
new file mode 100644
index 000000000..118cf60db
--- /dev/null
+++ b/Src/vp32/include/vp31/timer.h
@@ -0,0 +1,60 @@
+//==========================================================================
+//
+// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
+// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
+// PURPOSE.
+//
+// Copyright (c) 1999 - 2001 On2 Technologies Inc. All Rights Reserved.
+//
+//--------------------------------------------------------------------------
+
+
+/****************************************************************************
+*
+* Module Title : Timer.h
+*
+* Description : Video CODEC timer module
+*
+* AUTHOR : Paul Wilkins
+*
+*****************************************************************************
+* Revision History
+*
+* 1.00 PGW 12/10/99 Configuration baseline
+*
+*****************************************************************************
+*/
+
+#ifndef TIMER_H
+#define TIMER_H
+
+#include "type_aliases.h"
+
+/****************************************************************************
+* Constants
+*****************************************************************************
+*/
+
+
+/****************************************************************************
+* Types
+*****************************************************************************
+*/
+
+/****************************************************************************
+* Data structures
+*****************************************************************************
+*/
+
+
+/****************************************************************************
+* Functions
+*****************************************************************************
+*/
+
+extern void MyInitTimer( void );
+extern UINT32 MyGetTime( void );
+extern UINT32 MyGetElapsedCpuTime( void );
+
+#endif
diff --git a/Src/vp32/include/vp31/type_aliases.h b/Src/vp32/include/vp31/type_aliases.h
new file mode 100644
index 000000000..8ff78c4dc
--- /dev/null
+++ b/Src/vp32/include/vp31/type_aliases.h
@@ -0,0 +1,82 @@
+//==========================================================================
+//
+// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
+// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
+// PURPOSE.
+//
+// Copyright (c) 1999 - 2001 On2 Technologies Inc. All Rights Reserved.
+//
+//--------------------------------------------------------------------------
+
+
+/****************************************************************************
+*
+* Module Title : TYPE_ALIASES.H
+*
+* Description : Standard type aliases
+*
+*
+*****************************************************************************
+*/
+
+#ifndef TYPE_ALIASES
+#define TYPE_ALIASES
+
+#define EXPORT
+#define IMPORT extern /* Used to declare imported data & routines */
+#define PRIVATE static /* Used to declare & define module-local data */
+#define LOCAL static /* Used to define all persistent routine-local data */
+#define STD_IN_PATH 0 /* Standard input path */
+#define STD_OUT_PATH 1 /* Standard output path */
+#define STD_ERR_PATH 2 /* Standard error path */
+#define STD_IN_FILE stdin /* Standard input file pointer */
+#define STD_OUT_FILE stdout /* Standard output file pointer */
+#define STD_ERR_FILE stderr /* Standard error file pointer */
+#define MAX_int 0x7FFFFFFF
+
+#define __export
+#define _export
+
+typedef signed char INT8;
+typedef unsigned char UINT8;
+typedef signed short INT16;
+typedef unsigned short UINT16;
+
+typedef signed int INT32;
+typedef unsigned int UINT32;
+typedef int BOOL;
+
+#ifdef LINUX
+#define _inline __inline__
+#endif
+
+#if defined( MACPPC ) || defined( LINUX )
+typedef long long INT64;
+#else
+typedef __int64 INT64;
+#endif
+
+#ifndef NULL
+#ifdef __cplusplus
+#define NULL 0
+#else
+#define NULL ((void *)0)
+#endif
+#endif
+
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+#ifndef TRUE
+#define TRUE 1
+#endif
+
+/* Floating point value. */
+typedef double FLOAT64;
+typedef float FLOAT32;
+typedef unsigned char BOOLEAN;
+#define CCONV
+
+#endif
diff --git a/Src/vp32/include/vp31/vfw_PB_Interface.h b/Src/vp32/include/vp31/vfw_PB_Interface.h
new file mode 100644
index 000000000..2e27ca5e8
--- /dev/null
+++ b/Src/vp32/include/vp31/vfw_PB_Interface.h
@@ -0,0 +1,78 @@
+//==========================================================================
+//
+// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
+// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
+// PURPOSE.
+//
+// Copyright (c) 1999 - 2001 On2 Technologies Inc. All Rights Reserved.
+//
+//--------------------------------------------------------------------------
+
+
+/****************************************************************************
+*
+* Module Title : VFW_PB_INTERFACE.H
+*
+* Description : Interface to video codec demo decompressor DLL
+*
+*
+*****************************************************************************
+*/
+
+#include "codec_common_interface.h"
+
+#include "type_aliases.h"
+#ifndef XPB_DEFINED
+#define XPB_DEFINED
+typedef struct PB_INSTANCE * xPB_INST;
+#endif
+//#include "pbdll.h"
+
+// YUV buffer configuration structure
+typedef struct
+{
+ int YWidth;
+ int YHeight;
+ int YStride;
+
+ int UVWidth;
+ int UVHeight;
+ int UVStride;
+
+ unsigned char * YBuffer;
+ unsigned char * UBuffer;
+ unsigned char * VBuffer;
+
+} YUV_BUFFER_CONFIG;
+
+// Settings Control
+typedef enum
+{
+ PBC_SET_POSTPROC,
+ PBC_SET_CPUFREE,
+ PBC_MAX_PARAM
+} PB_COMMAND_TYPE;
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+extern BOOL CCONV StartDecoder( xPB_INST *pbi, UINT32 ImageWidth, UINT32 ImageHeight );
+extern void CCONV GetPbParam( xPB_INST, PB_COMMAND_TYPE Command, UINT32 *Parameter );
+extern void CCONV SetPbParam( xPB_INST, PB_COMMAND_TYPE Command, UINT32 Parameter );
+extern void CCONV GetYUVConfig( xPB_INST, YUV_BUFFER_CONFIG * YuvConfig );
+extern const char * CCONV VP31D_GetVersionNumber(void);
+
+extern int CCONV DecodeFrameToYUV( xPB_INST, char * VideoBufferPtr, unsigned int ByteCount,
+ UINT32 ImageWidth, UINT32 ImageHeight );
+extern BOOL CCONV StopDecoder(xPB_INST *pbi);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+
diff --git a/Src/vp32/include/vp31/vfw_comp_interface.h b/Src/vp32/include/vp31/vfw_comp_interface.h
new file mode 100644
index 000000000..e3621e70d
--- /dev/null
+++ b/Src/vp32/include/vp31/vfw_comp_interface.h
@@ -0,0 +1,105 @@
+//==========================================================================
+//
+// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
+// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
+// PURPOSE.
+//
+// Copyright (c) 1999 - 2001 On2 Technologies Inc. All Rights Reserved.
+//
+//--------------------------------------------------------------------------
+
+
+#if !defined(VFW_COMP_INTERFACE_H)
+#define VFW_COMP_INTERFACE_H
+/****************************************************************************
+*
+* Module Title : VFW_COMP_INTERFACE.H
+*
+* Description : Interface to video codec demo compressor DLL
+*
+*
+*****************************************************************************
+*/
+
+#include "codec_common_interface.h"
+#include "type_aliases.h"
+
+/* Command interface to compressor. */
+/* Settings Control */
+
+typedef enum
+{
+ C_SET_KEY_FRAME,
+ C_SET_FIXED_Q,
+ C_SET_FIRSTPASS_FILE,
+ C_SET_NODROPS
+
+} C_SETTING;
+
+typedef enum
+{
+ MAINTAIN_ASPECT_RATIO = 0x0,
+ SCALE_TO_FIT = 0x1,
+ CENTER = 0x2,
+ OTHER = 0x3
+} SCALE_MODE;
+
+typedef struct
+{
+ UINT32 FrameSize;
+ UINT32 TargetBitRate;
+ UINT32 FrameRate;
+ UINT32 KeyFrameFrequency;
+ UINT32 KeyFrameDataTarget;
+ UINT32 Quality;
+ BOOL AllowDF;
+ BOOL QuickCompress;
+ BOOL AutoKeyFrameEnabled;
+ INT32 AutoKeyFrameThreshold;
+ UINT32 MinimumDistanceToKeyFrame;
+ INT32 ForceKeyFrameEvery;
+ INT32 NoiseSensitivity;
+
+} COMP_CONFIG;
+
+#ifndef YUVINPUTBUFFERCONFIG
+#define YUVINPUTBUFFERCONFIG
+typedef struct
+{
+ int YWidth;
+ int YHeight;
+ int YStride;
+
+ int UVWidth;
+ int UVHeight;
+ int UVStride;
+
+ char * YBuffer;
+ char * UBuffer;
+ char * VBuffer;
+
+} YUV_INPUT_BUFFER_CONFIG;
+#endif
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+typedef struct CP_INSTANCE * xCP_INST;
+extern BOOL CCONV StartEncoder( xCP_INST *cpi, COMP_CONFIG * CompConfig );
+extern void CCONV ChangeCompressorSetting ( xCP_INST cpi, C_SETTING Setting, int Value );
+extern void CCONV ChangeEncoderConfig ( xCP_INST cpi, COMP_CONFIG * CompConfig );
+extern UINT32 CCONV EncodeFrame( xCP_INST cpi, unsigned char * InBmpIPtr, unsigned char * InBmpPtr, unsigned char * OutPutPtr, unsigned int * is_key );
+extern UINT32 CCONV EncodeFrameYuv( xCP_INST cpi, YUV_INPUT_BUFFER_CONFIG * YuvInputData, unsigned char * OutPutPtr, unsigned int * is_key );
+extern BOOL CCONV StopEncoder( xCP_INST *cpi);
+extern void VPEInitLibrary(void);
+extern void VPEDeInitLibrary(void);
+extern const char * CCONV VP31E_GetVersionNumber(void);
+
+#ifdef __cplusplus
+
+}
+#endif
+
+#endif // VFW_COMP_INTERFACE_H