diff options
Diffstat (limited to 'Src/libvp6/include/vp50')
-rw-r--r-- | Src/libvp6/include/vp50/comp_interface.h | 54 | ||||
-rw-r--r-- | Src/libvp6/include/vp50/vfw_pb_interface.h | 66 | ||||
-rw-r--r-- | Src/libvp6/include/vp50/vp50_comp_interface.h | 138 |
3 files changed, 258 insertions, 0 deletions
diff --git a/Src/libvp6/include/vp50/comp_interface.h b/Src/libvp6/include/vp50/comp_interface.h new file mode 100644 index 00000000..c38c3943 --- /dev/null +++ b/Src/libvp6/include/vp50/comp_interface.h @@ -0,0 +1,54 @@ +#if !defined(COMP_INTERFACE_H) +#define COMP_INTERFACE_H +/**************************************************************************** +* +* Module Title : COMP_INTERFACE.H +* +* Description : Interface to video codec demo compressor DLL +* +* AUTHOR : Paul Wilkins +* +***************************************************************************** +* Revision History +* +* 1.04 JBB 26 AUG 00 JBB Added fixed q setting +* 1.03 PGW 07/12/99 Retro fit JBB changes +* 1.02 PGW 16/09/99 Interface changes to simplify things for command line +* compressor. +* 1.01 PGW 07/07/99 Added COMP_CONFIG. +* 1.00 PGW 28/06/99 New configuration baseline +* +***************************************************************************** +*/ + +// C4514 Unreferenced inline function has been removed +#pragma warning(disable: 4514) + +#include "codec_common_interface.h" +#include "type_aliases.h" +#include "vp50_comp_interface.h" + +#ifdef __cplusplus +extern "C" +{ +#endif +typedef struct CP_INSTANCE * xCP_INST; +extern BOOL CCONV StartEncoder( xCP_INST *cpi, COMP_CONFIG_VP5 * CompConfig ); +extern void CCONV ChangeCompressorSetting ( xCP_INST cpi, C_SETTING Setting, int Value ); +extern void CCONV ChangeEncoderConfig ( xCP_INST cpi, COMP_CONFIG_VP5 * 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 VP50E_GetVersionNumber(void); +extern UINT32 CCONV VPGetState(xCP_INST cpi, void * ret); +extern void CCONV VPSetState(xCP_INST cpi, void * ret); +extern int CCONV VPGetPB(xCP_INST cpi); +#ifdef __cplusplus + +} +#endif + + +#endif
\ No newline at end of file diff --git a/Src/libvp6/include/vp50/vfw_pb_interface.h b/Src/libvp6/include/vp50/vfw_pb_interface.h new file mode 100644 index 00000000..d9eb593d --- /dev/null +++ b/Src/libvp6/include/vp50/vfw_pb_interface.h @@ -0,0 +1,66 @@ +/**************************************************************************** +* +* Module Title : VFW_PB_INTERFACE.H +* +* Description : Interface to video codec demo decompressor DLL +* +* AUTHOR : Paul Wilkins +* +***************************************************************************** +* Revision History +* +* 1.03 YWX 17/Dec/02 Added enum for setup DeInteralcedMode +* 1.02 JBB 25 AUG 00 Versioning +* 1.01 PGW 29/06/99 Interface to DecodeFrame() changed. +* 1.00 PGW 07/06/99 Baseline code. +* +***************************************************************************** +*/ + +#ifndef VFW_PB_INTERFACE +#define VFW_PB_INTERFACE + +#include "codec_common_interface.h" + +#include "type_aliases.h" +typedef struct PB_INSTANCE * xPB_INST; +//#include "pbdll.h" + + +// Settings Control +typedef enum +{ + PBC_SET_POSTPROC, + PBC_SET_CPUFREE, + PBC_MAX_PARAM, + PBC_SET_TESTMODE, + PBC_SET_PBSTRUCT, + PBC_SET_BLACKCLAMP, + PBC_SET_WHITECLAMP, + PBC_SET_REFERENCEFRAME, + PBC_SET_DEINTERLACEMODE + +} PB_COMMAND_TYPE; + + +#ifdef __cplusplus +extern "C" +{ +#endif + +extern BOOL CCONV VP5_StartDecoder( xPB_INST *pbi, UINT32 ImageWidth, UINT32 ImageHeight ); +extern void CCONV VP5_GetPbParam( xPB_INST, PB_COMMAND_TYPE Command, UINT32 *Parameter ); +extern void CCONV VP5_SetPbParam( xPB_INST, PB_COMMAND_TYPE Command, UINT32 Parameter ); +extern void CCONV VP5_GetYUVConfig( xPB_INST, YUV_BUFFER_CONFIG * YuvConfig ); +extern const char * CCONV VP31D_GetVersionNumber(void); + +extern int CCONV VP5_DecodeFrameToYUV( xPB_INST, char * VideoBufferPtr, unsigned int ByteCount, + UINT32 ImageWidth, UINT32 ImageHeight ); +extern BOOL CCONV VP5_StopDecoder(xPB_INST *pbi); + +#ifdef __cplusplus +} +#endif +#endif + + diff --git a/Src/libvp6/include/vp50/vp50_comp_interface.h b/Src/libvp6/include/vp50/vp50_comp_interface.h new file mode 100644 index 00000000..b1c8a387 --- /dev/null +++ b/Src/libvp6/include/vp50/vp50_comp_interface.h @@ -0,0 +1,138 @@ +#if !defined(VP50_COMP_INTERFACE_H) +#define VP50_COMP_INTERFACE_H +/**************************************************************************** +* +* Module Title : VFW_COMP_INTERFACE.H +* +* Description : Interface to video codec demo compressor DLL +* +* AUTHOR : Paul Wilkins +* +***************************************************************************** +* Revision History +* +* 1.04 JBB 26 AUG 00 JBB Added fixed q setting +* 1.03 PGW 07/12/99 Retro fit JBB changes +* 1.02 PGW 16/09/99 Interface changes to simplify things for command line +* compressor. +* 1.01 PGW 07/07/99 Added COMP_CONFIG. +* 1.00 PGW 28/06/99 New configuration baseline +* +***************************************************************************** +*/ + +// C4514 Unreferenced inline function has been removed +#ifndef MACPPC +#pragma warning(disable: 4514) +#endif + +#include "codec_common_interface.h" +#include "type_aliases.h" + +/* Command interface to compressor. */ +/* Settings Control */ + +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; + BOOL AllowSpatialResampling; + + // The Intended Horizontal Scale + UINT32 HScale; + UINT32 HRatio; + + // The Intended Vertical Scale + UINT32 VScale; + UINT32 VRatio; + + // The way in which we intended + UINT32 ScalingMode; + + // Interlaced (0) means no (1) means Yes + UINT32 Interlaced; + + BOOL FixedQ; + + INT32 StartingBufferLevel; // The initial encoder buffer level + INT32 OptimalBufferLevel; // The buffer level target we strive to reach / maintain. + INT32 DropFramesWaterMark; // Buffer fullness watermark for forced drop frames. + INT32 ResampleDownWaterMark; // Buffer fullness watermark for downwards spacial re-sampling + INT32 ResampleUpWaterMark; // Buffer fullness watermark where returning to larger image size is consdered + INT32 OutputFrameRate; + INT32 Speed; + + BOOL ErrorResilientMode; // compress using a mode that won't completely fall apart if we decompress using + // the frame after a dropped frame + +} COMP_CONFIG_VP5; + +INLINE +void comp_config_default_vp5(COMP_CONFIG_VP5* pcc) +{ + pcc->FrameSize = 0; // No default value + pcc->TargetBitRate = 300; + pcc->FrameRate = 0; // No default value + pcc->KeyFrameFrequency = 120; + pcc->KeyFrameDataTarget = 0; // No default value + pcc->Quality = 56; + pcc->AllowDF = 0; + pcc->QuickCompress = 1; + pcc->AutoKeyFrameEnabled = 1; + pcc->AutoKeyFrameThreshold = 80; + pcc->MinimumDistanceToKeyFrame = 8; + pcc->ForceKeyFrameEvery = 120; + pcc->NoiseSensitivity = 0; + pcc->AllowSpatialResampling = 0; + pcc->HScale = 1; + pcc->HRatio = 1; + pcc->VScale = 1; + pcc->VRatio = 1; + pcc->ScalingMode = MAINTAIN_ASPECT_RATIO; + pcc->Interlaced = 0; + pcc->FixedQ = 0; + + pcc->StartingBufferLevel = 6; + pcc->OptimalBufferLevel = 10; + pcc->DropFramesWaterMark = 20; + pcc->ResampleDownWaterMark = 35; + pcc->ResampleUpWaterMark = 45; + + pcc->OutputFrameRate = 30; + pcc->Speed = 12; + pcc->ErrorResilientMode = FALSE; + + return; +} + +#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 + +#endif |