ILMVP8Encoder Interface  

This is the interface for the LEAD VP8 Encoder.

Interface Properties:

Type

Name

Description

long

Bitrate

Sets the bitrate for the VP8 encoder in bits per second units. When the Mode is set to LVP8Enc_Mode_SinglePass_CBR, it represents the actual constant bitrate. For all other Mode values, this value represents the average bitrate.

eVP8EncDeadline

Deadline

Use this option to set the VP8 encoding deadline. Possible values are:

 

 

Value

Meaning

 

 

LVP8Enc_Deadline_BestQuality

[0] Encodes using no deadline to ensure the best quality

 

 

LVP8Enc_Deadline_Realtime

[1] Encodes as quickly as possible, sacrificing quality. The encoder supports the notion of a soft real-time deadline. Given a non-zero value to the deadline parameter, the encoder makes a "best effort" guarantee to return before the given time slice expires. It is implicit that limiting the available time for encoding degrades the output quality.

This is the default

 

 

LVP8Enc_Deadline_GoodQuality

[1000000] Encodes with better quality than realtime above, but still limiting encoding time to reduce the compression time.

double

KeyFrameInterval

This option set the interval for key frames in seconds. Possible values are: 0 - 100 seconds.

eVP8EncMode

Mode

Use this option to set or get the VP8 encoder mode. Possible values are:

 

 

Value

Meaning

 

 

LVP8Enc_Mode_SinglePass_VBR

[0] Encodes using a single pass, allowing for variable bit rate. This is the default.

 

 

LVP8Enc_Mode_SinglePass_CBR

[1] Encodes using a single pass, keeping the bit rate constant.

 

 

LVP8Enc_Mode_DoublePass_VBR_1

[2] Encodes using the two pass method, allowing for variable bit rate. NOTE: The Double pass VBR - pass 2 encoding step below must also be performed before the final VP8 compression is complete.

 

 

LVP8Enc_Mode_DoublePass_VBR_2

[3] Encode using the two pass method, allowing for variable bit rate. NOTE: The Double pass VBR - pass 1 encoding step above must first be performed before running the VP8 compressor in this mode.

 

Interface Methods:

HRESULT  CommitSettings()

Parameters

None

Description

Saves the current encoder settings as the default settings.

Returns

S_OK - Success

< 0 - An error occurred writing to the registry. The error is constructed using the HRESULT_FROM_WIN32 macro, so it has the form 0x8007XXXX, where XXXX is the Windows error code of the failed registry operation. Please consult the Windows documentation for information on the Windows error codes.

 

HRESULT  ResetToDefaultsEx(eVP8EncApiLevel ApiLevel)

Parameters

ApiLevel

 Specifies which defaults should be used by the encoder.

Description

Resets the filter to default values. The ApiLevel parameter determines which default values to use.

Current applications should set ApiLevel to LVP8Enc_ApiLevel_1 = 0. The encoder might change in the future and have different properties or default behaviour. Calling this method ensures future versions of the filter will behave the same way as when you developed your application.

It is best to call ResetToDefaultsEx(LVP8Enc_ApiLevel_1) before you start setting properties and start calling other methods for this interface.

Returns

S_OK - Success

E_INVALIDARG - The ApiLevel parameter is invalid.

 

Data Types:

eVP8EncMode

typedef enum
{
LVP8Enc_Mode_SinglePass_VBR = 0,
LVP8Enc_Mode_SinglePass_CBR = 1,
LVP8Enc_Mode_DoublePass_VBR_1 = 2,
LVP8Enc_Mode_DoublePass_VBR_2 = 3
} eVP8EncMode;

Indicates which encoding mode should be used (VBR/CBR, one or two pass).

Member

Description

LVP8Enc_Mode_SinglePass_VBR

Encodes using a single pass, allowing for variable bit rate.

LVP8Enc_Mode_SinglePass_CBR

Encodes using a single pass, keeping the bit rate constant.

LVP8Enc_Mode_DoublePass_VBR_1

Encodes using the two pass method, allowing for variable bit rate. NOTE: The Double pass VBR - pass 2 encoding step below must also be performed before the final VP8 compression is complete.

LVP8Enc_Mode_DoublePass_VBR_2

Encodes using the two-pass method, allowing for variable bit rate. NOTE: The Double pass VBR - pass 1 encoding step above must first be performed before running the VP8 compressor in this mode.

 

eVP8EncDeadLine

typedef enum
{
LVP8Enc_Deadline_BestQuality = 0,
LVP8Enc_Deadline_Realtime = 1,
LVP8Enc_Deadline_GoodQuality = 1000000
} eVP8EncDeadline;

Indicates how much quality the encoded file is to have.

Member

Description

LVP8Enc_Deadline_BestQuality

Encodes using no deadline to ensure the best quality.

LVP8Enc_Deadline_Realtime

Encodes as fast as possible, sacrificing quality. The encoder supports the notion of a soft real-time deadline. Given a non-zero value to the deadline parameter, the encoder will make a "best effort" guarantee to return before the given time slice expires. It is implicit that limiting the available time to encode will degrade the output quality.

LVP8Enc_Deadline_GoodQuality

Encodes with better quality than realtime above, but still limiting encoding time to reduce the compression time.

 

eVP8EncApiLevel

typedef enum
{
LVP8Enc_ApiLevel_1 = 0,    // current version
} eVP8EncApiLevel;