PRC_GetPrototypeDBBufferSize*

Syntax

#include <nitro/prc.h>

u32 PRC_GetPrototypeDBBufferSize(
    const PRCPrototypeList*     prototypeList );

u32 PRC_GetPrototypeDBBufferSizeEx(
    const PRCPrototypeList* prototypeList,
    u32                         kindMask,
    BOOL                        ignoreDisabledEntries,
    const PRCPrototypeDBParam*  param );

Arguments

prototypeList Pointer to the sample pattern list.
kindMask Bit field used to select the pattern type of the sample DB entry that will be taken into the sample DB.
ignoreDisabledEntries Designates whether a sample entry whose enabled flag is FALSE should be ignored.
param Other parameter values that are dependent on the recognition algorithm (use NULL as the default).

Return Values

Returns the work area memory size required for the conversion of the sample DB.

Description

When using a PRCPrototypeList type sample pattern list for recognition, you must convert it into a PRCPrototypeDB type sample DB. PRC_GetPrototypeDBBufferSizeEx() returns the work area required for this. Before calling the PRC_InitPrototypeDB function, allocate at least as much memory as the size given by this return value.

The logical AND of the kindMask value and of the kind value for each sample DB entry in the prototypeList is performed. The entry will be brought into the sample DB if the result is nonzero. Specifying PRC_KIND_ALL for kindMask will select all kinds. If ignoreDisabledEntries is TRUE, sample DB entries whose enabled flag is FALSE will not be imported, even if their kind values match.

PRC_GetPrototypeDBBufferSize(prototypeList) is the same as PRC_GetPrototypeDBBufferSizeEx(prototypeList, PRC_KIND_ALL, FALSE, NULL).

See Also

PRC_InitPrototypeDB, PRC_InitPrototypeDBEx

Revision History

2004/06/23 Initial version.


CONFIDENTIAL