MFllMulDiv

Calculates ((a * b) + d) / c, where each term is a 64-bit signed value.

Syntax

LONGLONG MFllMulDiv(
         LONGLONG a,
         LONGLONG b,
         LONGLONG c,
         LONGLONG d
)  

Parameters

a
Type: LONGLONG 

A multiplier.

b
Type: LONGLONG 

Another multiplier.

c
Type: LONGLONG 

The divisor.

d
Type: LONGLONG 

The rounding factor.

Return value

Type: LONGLONG 

Returns the result of the calculation. If numeric overflow occurs, the function returns _I64_MAX (positive overflow) or LLONG_MIN (negative overflow). If Mfplat.dll cannot be loaded, the function returns _I64_MAX.

Refer to Media Foundation return codes.

Remarks

Note

A previous version of this topic described the parameters incorrectly. The divisor is c and the rounding factor is d.

Requirements

Header: Declared in mfapi.h.

Library: Use mfplat.lib.