mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-19 02:35:46 -04:00
Initial community commit
This commit is contained in:
64
Src/vp32/include/vp31/codec_common_interface.h
Normal file
64
Src/vp32/include/vp31/codec_common_interface.h
Normal file
@ -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
|
89
Src/vp32/include/vp31/comp_interface.h
Normal file
89
Src/vp32/include/vp31/comp_interface.h
Normal file
@ -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
|
60
Src/vp32/include/vp31/timer.h
Normal file
60
Src/vp32/include/vp31/timer.h
Normal file
@ -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
|
82
Src/vp32/include/vp31/type_aliases.h
Normal file
82
Src/vp32/include/vp31/type_aliases.h
Normal file
@ -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
|
78
Src/vp32/include/vp31/vfw_PB_Interface.h
Normal file
78
Src/vp32/include/vp31/vfw_PB_Interface.h
Normal file
@ -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
|
||||
|
||||
|
||||
|
105
Src/vp32/include/vp31/vfw_comp_interface.h
Normal file
105
Src/vp32/include/vp31/vfw_comp_interface.h
Normal file
@ -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
|
Reference in New Issue
Block a user