aboutsummaryrefslogtreecommitdiff
path: root/Src/vp32/include/vp31/vfw_comp_interface.h
blob: e3621e70dd6c5cf89f6f3e48457a7cc70863056d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
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