1 /*---------------------------------------------------------------------------*
2   Project:  TwlSDK - PRC - include
3   File:     prc/algo_standard.h
4 
5   Copyright 2003-2008 Nintendo. All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain
8   proprietary information of Nintendo of America Inc. and/or Nintendo
9   Company Ltd., and are protected by Federal copyright law. They may
10   not be disclosed to third parties or copied or duplicated in any form,
11   in whole or in part, without the prior written consent of Nintendo.
12 
13   $Date:: 2008-09-18#$
14   $Rev: 8573 $
15   $Author: okubata_ryoma $
16  *---------------------------------------------------------------------------*/
17 #ifndef NITRO_PRC_ALGO_STANDARD_H_
18 #define NITRO_PRC_ALGO_STANDARD_H_
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 #include <nitro/misc.h>
25 #include <nitro/types.h>
26 #include <nitro/prc/types.h>
27 #include <nitro/prc/common.h>
28 #include <nitro/prc/resample.h>
29 #include <nitro/prc/algo_common.h>
30 
31 /*===========================================================================*
32   Constant Definitions
33  *===========================================================================*/
34 
35 /*===========================================================================*
36   Type Definitions
37  *===========================================================================*/
38 
39 /*---------------------------------------------------------------------------*
40   Parameters for Sample DB Expansion
41     normalizeSize       Normalization Size
42     resampleThreshold   post-normalization resample threshold
43  *---------------------------------------------------------------------------*/
44 typedef PRCPrototypeDBParam_Common PRCPrototypeDBParam_Standard;
45 
46 /*---------------------------------------------------------------------------*
47   Parameters for Input Pattern Interpretation
48     normalizeSize       Normalization Size
49     resampleThreshold   post-normalization resample threshold
50  *---------------------------------------------------------------------------*/
51 typedef PRCInputPatternParam_Common PRCInputPatternParam_Standard;
52 
53 /*---------------------------------------------------------------------------*
54   Input-Originating Recognition Pattern
55  *---------------------------------------------------------------------------*/
56 typedef PRCInputPattern_Common PRCInputPattern_Standard;
57 
58 /*---------------------------------------------------------------------------*
59   Sample DB Expanded in Memory
60  *---------------------------------------------------------------------------*/
61 typedef PRCPrototypeDB_Common PRCPrototypeDB_Standard;
62 
63 /*---------------------------------------------------------------------------*
64   Parameters for Recognition Processing
65  *---------------------------------------------------------------------------*/
66 typedef struct PRCRecognizeParam_Standard
67 {
68     int     dummy;
69 }
70 PRCRecognizeParam_Standard;
71 
72 
73 
74 /*---------------------------------------------------------------------------*
75   Name:         PRC_Init_Standard
76 
77   Description:  Initializes pattern recognition API.
78 
79   Arguments:    None.
80 
81   Returns:      None.
82  *---------------------------------------------------------------------------*/
PRC_Init_Standard(void)83 static inline void PRC_Init_Standard(void)
84 {
85     PRC_Init_Common();
86 }
87 
88 /*---------------------------------------------------------------------------*
89   Name:         PRC_GetPrototypeDBBufferSize_Standard
90 
91   Description:  Calculates the work area size required for expanding sample DB.
92 
93   Arguments:    prototypeList   sample pattern list
94 
95   Returns:      required memory capacity for expanding sample DB
96  *---------------------------------------------------------------------------*/
PRC_GetPrototypeDBBufferSize_Standard(const PRCPrototypeList * prototypeList)97 static inline u32 PRC_GetPrototypeDBBufferSize_Standard(const PRCPrototypeList *prototypeList)
98 {
99     return PRC_GetPrototypeDBBufferSize_Common(prototypeList);
100 }
101 
102 /*---------------------------------------------------------------------------*
103   Name:         PRC_GetPrototypeDBBufferSizeEx_Standard
104 
105   Description:  Calculates the work area size required for expanding sample DB.
106 
107   Arguments:    prototypeList   sample pattern list
108                 kindMask        mask for type specification
109                 ignoreDisabledEntries   Whether or not sample DB entries with the enabled flag FALSE are ever expanded.
110 
111                 param           parameters for sample DB expansion
112 
113   Returns:      required memory capacity for expanding sample DB
114  *---------------------------------------------------------------------------*/
115 static inline u32
PRC_GetPrototypeDBBufferSizeEx_Standard(const PRCPrototypeList * prototypeList,u32 kindMask,BOOL ignoreDisabledEntries,const PRCPrototypeDBParam_Standard * param)116 PRC_GetPrototypeDBBufferSizeEx_Standard(const PRCPrototypeList *prototypeList,
117                                         u32 kindMask,
118                                         BOOL ignoreDisabledEntries,
119                                         const PRCPrototypeDBParam_Standard *param)
120 {
121     return PRC_GetPrototypeDBBufferSizeEx_Common(prototypeList, kindMask, ignoreDisabledEntries,
122                                                  param);
123 }
124 
125 /*---------------------------------------------------------------------------*
126   Name:         PRC_InitPrototypeDB_Standard
127 
128   Description:  Creates the PRCPrototypeDB structure.
129                 A buffer region larger than the size that PRC_GetPrototypeDBBufferSize returns needs to be set up in the buffer.
130 
131 
132   Arguments:    protoDB         sample DB structure to be initialized
133                 buffer          pointer to memory region used for sample DB expansion
134                                 (Memory area size >= return value of PRC_GetPrototypeDBBufferSize)
135                 prototypeList   sample pattern list
136 
137   Returns:      None.
138  *---------------------------------------------------------------------------*/
139 static inline BOOL
PRC_InitPrototypeDB_Standard(PRCPrototypeDB_Standard * protoDB,void * buffer,const PRCPrototypeList * prototypeList)140 PRC_InitPrototypeDB_Standard(PRCPrototypeDB_Standard *protoDB,
141                              void *buffer, const PRCPrototypeList *prototypeList)
142 {
143     return PRC_InitPrototypeDB_Common(protoDB, buffer, prototypeList);
144 }
145 
146 /*---------------------------------------------------------------------------*
147   Name:         PRC_InitPrototypeDBEx_Standard
148 
149   Description:  Creates the PRCPrototypeDB structure.
150                 A buffer region larger than the size that PRC_GetPrototypeDBBufferSize returns needs to be set up in the buffer.
151 
152                 Parameters during expansion can be specified with param.
153 
154   Arguments:    protoDB         sample DB structure to be initialized
155                 buffer          pointer to memory region used for sample DB expansion
156                                 (Memory area size >= return value of PRC_GetPrototypeDBBufferSize)
157                 prototypeList   sample pattern list
158                 kindMask        mask for type specification
159                 ignoreDisabledEntries   Whether or not sample DB entries with the enabled flag FALSE are ever expanded.
160 
161                 param           parameters for sample DB expansion
162 
163   Returns:      None.
164  *---------------------------------------------------------------------------*/
165 static inline BOOL
PRC_InitPrototypeDBEx_Standard(PRCPrototypeDB_Standard * protoDB,void * buffer,const PRCPrototypeList * prototypeList,u32 kindMask,BOOL ignoreDisabledEntries,const PRCPrototypeDBParam_Standard * param)166 PRC_InitPrototypeDBEx_Standard(PRCPrototypeDB_Standard *protoDB,
167                                void *buffer,
168                                const PRCPrototypeList *prototypeList,
169                                u32 kindMask,
170                                BOOL ignoreDisabledEntries,
171                                const PRCPrototypeDBParam_Standard *param)
172 {
173     return PRC_InitPrototypeDBEx_Common(protoDB, buffer, prototypeList, kindMask,
174                                         ignoreDisabledEntries, param);
175 }
176 
177 /*---------------------------------------------------------------------------*
178   Name:         PRC_GetInputPatternBufferSize_Standard
179 
180   Description:  Calculates work area required for expanding pattern data for comparison.
181 
182 
183   Arguments:    maxPointCount   Upper limit of input points (includes stylus up marker)
184                 maxStrokeCount      Upper limit of stroke count
185 
186   Returns:      memory capacity required for expanding pattern
187  *---------------------------------------------------------------------------*/
PRC_GetInputPatternBufferSize_Standard(int maxPointCount,int maxStrokeCount)188 static inline u32 PRC_GetInputPatternBufferSize_Standard(int maxPointCount, int maxStrokeCount)
189 {
190     return PRC_GetInputPatternBufferSize_Common(maxPointCount, maxStrokeCount);
191 }
192 
193 /*---------------------------------------------------------------------------*
194   Name:         PRC_InitInputPattern_Standard
195 
196   Description:  Creates PRCInputPattern structure.
197 
198   Arguments:    pattern             pattern structure to be initialized
199                 buffer              pointer to memory region used for pattern expansion
200                                     (Region size >=return value of PRC_GetInputPatternBufferSize)
201                 strokes             Raw input coordinate value before forming
202                 maxPointCount   Upper limit of input points (includes stylus up marker)
203                 maxStrokeCount      Upper limit of stroke count
204 
205   Returns:      TRUE if create succeeded.
206  *---------------------------------------------------------------------------*/
207 static inline BOOL
PRC_InitInputPattern_Standard(PRCInputPattern_Standard * pattern,void * buffer,const PRCStrokes * strokes,int maxPointCount,int maxStrokeCount)208 PRC_InitInputPattern_Standard(PRCInputPattern_Standard *pattern,
209                               void *buffer,
210                               const PRCStrokes *strokes, int maxPointCount, int maxStrokeCount)
211 {
212     return PRC_InitInputPattern_Common(pattern, buffer, strokes, maxPointCount, maxStrokeCount);
213 }
214 
215 /*---------------------------------------------------------------------------*
216   Name:         PRC_InitInputPatternEx_Standard
217 
218   Description:  Creates PRCInputPattern structure.
219                 Specification of parameters for input pattern interpretation can be done with param.
220 
221   Arguments:    pattern             pattern structure to be initialized
222                 buffer              pointer to memory region used for pattern expansion
223                                     (Region size >=return value of PRC_GetInputPatternBufferSize)
224                 strokes             Raw input coordinate value before forming
225                 param               parameters for input pattern interpretation
226 
227   Returns:      TRUE if create succeeded.
228  *---------------------------------------------------------------------------*/
229 static inline BOOL
PRC_InitInputPatternEx_Standard(PRCInputPattern_Standard * pattern,void * buffer,const PRCStrokes * strokes,int maxPointCount,int maxStrokeCount,const PRCInputPatternParam_Standard * param)230 PRC_InitInputPatternEx_Standard(PRCInputPattern_Standard *pattern,
231                                 void *buffer,
232                                 const PRCStrokes *strokes,
233                                 int maxPointCount,
234                                 int maxStrokeCount, const PRCInputPatternParam_Standard *param)
235 {
236     return PRC_InitInputPatternEx_Common(pattern, buffer, strokes, maxPointCount, maxStrokeCount,
237                                          param);
238 }
239 
240 /*---------------------------------------------------------------------------*
241   Name:         PRC_GetRecognitionBufferSizeEx_Standard
242 
243   Description:  Calculates the work area size required for recognition algorithm.
244 
245 
246   Arguments:    maxPointCount   Upper limit of input points (includes stylus up marker)
247                 maxStrokeCount      Upper limit of stroke count
248                 protoDB     sample DB
249                 param       parameters for recognition processing
250 
251   Returns:      The memory capacity required for the recognition algorithm.
252  *---------------------------------------------------------------------------*/
253 u32
254 
255 
256 PRC_GetRecognitionBufferSizeEx_Standard(int maxPointCount,
257                                         int maxStrokeCount,
258                                         const PRCPrototypeDB_Standard *protoDB,
259                                         const PRCRecognizeParam_Standard *param);
260 
261 /*---------------------------------------------------------------------------*
262   Name:         PRC_GetRecognitionBufferSize_Standard
263 
264   Description:  Calculates the work area size required for recognition algorithm.
265 
266 
267   Arguments:    maxPointCount   Upper limit of input points (includes stylus up marker)
268                 maxStrokeCount      Upper limit of stroke count
269                 protoDB     sample DB
270 
271   Returns:      The memory capacity required for the recognition algorithm.
272  *---------------------------------------------------------------------------*/
273 static inline u32
PRC_GetRecognitionBufferSize_Standard(int maxPointCount,int maxStrokeCount,const PRCPrototypeDB_Standard * protoDB)274 PRC_GetRecognitionBufferSize_Standard(int maxPointCount,
275                                       int maxStrokeCount, const PRCPrototypeDB_Standard *protoDB)
276 {
277     return PRC_GetRecognitionBufferSizeEx_Standard(maxPointCount, maxStrokeCount, protoDB, NULL);
278 }
279 
280 /*---------------------------------------------------------------------------*
281   Name:         PRC_GetRecognizedEntriesEx_Standard
282 
283   Description:  Compares and recognizes a specific kind entry and input pattern to return the top numRanking ranking of the result.
284 
285 
286   Arguments:    resultEntries   Pointer to array that holds pointer to recognition result.
287                                 If less than the requested number could be recognized, fill in remainder with NULL.
288 
289                 resultScores    pointer to recognition result score array
290                 numRanking      Number of returns to result*
291                 buffer      Pointer to memory region used by recognition algorithm
292                                 (Region size >= return value of PRC_GetRecognitionBufferSize)
293                 input           Input pattern
294                 protoDB     sample DB
295                 kindMask    Take the AND of kind values for each sample DB entry, with any non-zero values considered valid.
296 
297                 param       parameters for recognition processing
298 
299   Returns:      Number of compared patterns in the sample DB
300  *---------------------------------------------------------------------------*/
301 int
302 
303 
304 PRC_GetRecognizedEntriesEx_Standard(PRCPrototypeEntry **resultEntries,
305                                     fx32 *resultScores,
306                                     int numRanking,
307                                     void *buffer,
308                                     const PRCInputPattern_Standard *input,
309                                     const PRCPrototypeDB_Standard *protoDB,
310                                     u32 kindMask, const PRCRecognizeParam_Standard *param);
311 
312 /*---------------------------------------------------------------------------*
313   Name:         PRC_GetRecognizedEntries_Standard
314 
315   Description:  Compares and recognizes sample DB input patterns, and returns the top numRanking ranking of the result.
316 
317 
318   Arguments:    resultEntries   Pointer to array that holds pointer to recognition result.
319                                 If less than the requested number could be recognized, fill in remainder with NULL.
320 
321                 resultScores    pointer to recognition result score array
322                 numRanking      the number of items desired to be returned to result*
323                 buffer      Pointer to memory region used by recognition algorithm
324                                 (Region size >= return value of PRC_GetRecognitionBufferSize)
325                 input           Input pattern
326                 protoDB     sample DB
327 
328   Returns:      Number of compared patterns in the sample DB
329  *---------------------------------------------------------------------------*/
330 static inline int
PRC_GetRecognizedEntries_Standard(PRCPrototypeEntry ** resultEntries,fx32 * resultScores,int numRanking,void * buffer,const PRCInputPattern_Standard * input,const PRCPrototypeDB_Standard * protoDB)331 PRC_GetRecognizedEntries_Standard(PRCPrototypeEntry **resultEntries,
332                                   fx32 *resultScores,
333                                   int numRanking,
334                                   void *buffer,
335                                   const PRCInputPattern_Standard *input,
336                                   const PRCPrototypeDB_Standard *protoDB)
337 {
338     return PRC_GetRecognizedEntriesEx_Standard(resultEntries, resultScores, numRanking, buffer,
339                                                input, protoDB, PRC_KIND_ALL, NULL);
340 }
341 
342 /*---------------------------------------------------------------------------*
343   Name:         PRC_GetRecognizedEntryEx_Standard
344 
345   Description:  Compares and recognizes a specific kind entry and input pattern for the sample DB.
346 
347   Arguments:    resultEntry  Pointer that receives pointer to recognized sample DB entry.
348                             If could not recognize, NULL is entered.
349                 buffer      Pointer to memory region used by recognition algorithm
350                             (Region size >= return value of PRC_GetRecognitionBufferSize)
351                 input           Input pattern
352                 protoDB     sample DB
353                 kindMask    Take the AND of kind values for each sample DB entry, with any non-zero values considered valid.
354 
355                 param       parameters for recognition processing
356 
357   Returns:      score value
358  *---------------------------------------------------------------------------*/
359 static inline fx32
PRC_GetRecognizedEntryEx_Standard(PRCPrototypeEntry ** resultEntry,void * buffer,const PRCInputPattern_Standard * input,const PRCPrototypeDB_Standard * protoDB,u32 kindMask,const PRCRecognizeParam_Standard * param)360 PRC_GetRecognizedEntryEx_Standard(PRCPrototypeEntry **resultEntry,
361                                   void *buffer,
362                                   const PRCInputPattern_Standard *input,
363                                   const PRCPrototypeDB_Standard *protoDB,
364                                   u32 kindMask, const PRCRecognizeParam_Standard *param)
365 {
366     fx32    score;
367     (void)PRC_GetRecognizedEntriesEx_Standard(resultEntry, &score, 1, buffer, input, protoDB,
368                                               kindMask, param);
369     return score;
370 }
371 
372 /*---------------------------------------------------------------------------*
373   Name:         PRC_GetRecognizedEntry_Standard
374 
375   Description:  Compares and recognizes sample DB and input pattern.
376 
377   Arguments:    resultEntry  Pointer that receives pointer to recognized sample DB entry.
378                             If could not recognize, NULL is entered.
379                 buffer      Pointer to memory region used by recognition algorithm
380                             (Region size >= return value of PRC_GetRecognitionBufferSize)
381                 input           Input pattern
382                 protoDB     sample DB
383 
384   Returns:      score value
385  *---------------------------------------------------------------------------*/
386 static inline fx32
PRC_GetRecognizedEntry_Standard(PRCPrototypeEntry ** resultEntry,void * buffer,const PRCInputPattern_Standard * input,const PRCPrototypeDB_Standard * protoDB)387 PRC_GetRecognizedEntry_Standard(PRCPrototypeEntry **resultEntry,
388                                 void *buffer,
389                                 const PRCInputPattern_Standard *input,
390                                 const PRCPrototypeDB_Standard *protoDB)
391 {
392     return PRC_GetRecognizedEntryEx_Standard(resultEntry, buffer, input, protoDB, PRC_KIND_ALL,
393                                              NULL);
394 }
395 
396 /*---------------------------------------------------------------------------*
397   Name:         PRC_GetInputPatternStrokes_Standard
398 
399   Description:  Gets dot sequence data from PRCInputPattern structure.
400 
401   Arguments:    strokes:        Obtained dot sequence data
402                                 Overwriting is not permitted.
403                 input           Input pattern
404 
405   Returns:      None.
406  *---------------------------------------------------------------------------*/
407 static inline void
PRC_GetInputPatternStrokes_Standard(PRCStrokes * strokes,const PRCInputPattern_Standard * input)408 PRC_GetInputPatternStrokes_Standard(PRCStrokes *strokes, const PRCInputPattern_Standard *input)
409 {
410     PRC_GetInputPatternStrokes_Common(strokes, input);
411 }
412 
413 
414 /*===========================================================================*
415   Inline Functions
416  *===========================================================================*/
417 
418 
419 
420 
421 /*===========================================================================*
422   Set as the standard function of the graphics recognition API
423  *===========================================================================*/
424 #ifndef PRC_DEFAULT_ALGORITHM
425 #define PRC_DEFAULT_ALGORITHM "Standard"
426 
427 /*---------------------------------------------------------------------------*
428   Parameters for Sample DB Expansion
429  *---------------------------------------------------------------------------*/
430 typedef PRCPrototypeDBParam_Standard PRCPrototypeDBParam;
431 
432 /*---------------------------------------------------------------------------*
433   Parameters for Input Pattern Interpretation
434  *---------------------------------------------------------------------------*/
435 typedef PRCInputPatternParam_Standard PRCInputPatternParam;
436 
437 /*---------------------------------------------------------------------------*
438   Input-Originating Recognition Pattern
439  *---------------------------------------------------------------------------*/
440 typedef PRCInputPattern_Standard PRCInputPattern;
441 
442 /*---------------------------------------------------------------------------*
443   Sample DB Expanded in Memory
444  *---------------------------------------------------------------------------*/
445 typedef PRCPrototypeDB_Standard PRCPrototypeDB;
446 
447 /*---------------------------------------------------------------------------*
448   Parameters for Recognition Processing
449  *---------------------------------------------------------------------------*/
450 typedef PRCRecognizeParam_Standard PRCRecognizeParam;
451 
452 
453 /*---------------------------------------------------------------------------*
454   Functions
455  *---------------------------------------------------------------------------*/
PRC_Init(void)456 static inline void PRC_Init(void)
457 {
458     PRC_Init_Standard();
459 }
460 
PRC_GetPrototypeDBBufferSize(const PRCPrototypeList * prototypeList)461 static inline u32 PRC_GetPrototypeDBBufferSize(const PRCPrototypeList *prototypeList)
462 {
463     return PRC_GetPrototypeDBBufferSize_Standard(prototypeList);
464 }
465 
466 static inline u32
PRC_GetPrototypeDBBufferSizeEx(const PRCPrototypeList * prototypeList,u32 kindMask,BOOL ignoreDisabledEntries,const PRCPrototypeDBParam * param)467 PRC_GetPrototypeDBBufferSizeEx(const PRCPrototypeList *prototypeList,
468                                u32 kindMask,
469                                BOOL ignoreDisabledEntries, const PRCPrototypeDBParam *param)
470 {
471     return PRC_GetPrototypeDBBufferSizeEx_Standard(prototypeList, kindMask, ignoreDisabledEntries,
472                                                    param);
473 }
474 
475 static inline BOOL
PRC_InitPrototypeDB(PRCPrototypeDB * protoDB,void * buffer,const PRCPrototypeList * prototypeList)476 PRC_InitPrototypeDB(PRCPrototypeDB *protoDB, void *buffer, const PRCPrototypeList *prototypeList)
477 {
478     return PRC_InitPrototypeDB_Standard(protoDB, buffer, prototypeList);
479 }
480 
481 static inline BOOL
PRC_InitPrototypeDBEx(PRCPrototypeDB * protoDB,void * buffer,const PRCPrototypeList * prototypeList,u32 kindMask,BOOL ignoreDisabledEntries,const PRCPrototypeDBParam * param)482 PRC_InitPrototypeDBEx(PRCPrototypeDB *protoDB,
483                       void *buffer,
484                       const PRCPrototypeList *prototypeList,
485                       u32 kindMask, BOOL ignoreDisabledEntries, const PRCPrototypeDBParam *param)
486 {
487     return PRC_InitPrototypeDBEx_Standard(protoDB, buffer, prototypeList, kindMask,
488                                           ignoreDisabledEntries, param);
489 }
490 
PRC_GetInputPatternBufferSize(int maxPointCount,int maxStrokeCount)491 static inline u32 PRC_GetInputPatternBufferSize(int maxPointCount, int maxStrokeCount)
492 {
493     return PRC_GetInputPatternBufferSize_Standard(maxPointCount, maxStrokeCount);
494 }
495 
496 static inline BOOL
PRC_InitInputPattern(PRCInputPattern * pattern,void * buffer,const PRCStrokes * strokes,int maxPointCount,int maxStrokeCount)497 PRC_InitInputPattern(PRCInputPattern *pattern,
498                      void *buffer, const PRCStrokes *strokes, int maxPointCount, int maxStrokeCount)
499 {
500     return PRC_InitInputPattern_Standard(pattern, buffer, strokes, maxPointCount, maxStrokeCount);
501 }
502 
503 static inline BOOL
PRC_InitInputPatternEx(PRCInputPattern * pattern,void * buffer,const PRCStrokes * strokes,int maxPointCount,int maxStrokeCount,const PRCInputPatternParam * param)504 PRC_InitInputPatternEx(PRCInputPattern *pattern,
505                        void *buffer,
506                        const PRCStrokes *strokes,
507                        int maxPointCount, int maxStrokeCount, const PRCInputPatternParam *param)
508 {
509     return PRC_InitInputPatternEx_Standard(pattern, buffer, strokes, maxPointCount, maxStrokeCount,
510                                            param);
511 }
512 
513 static inline u32
PRC_GetRecognitionBufferSize(int maxPointCount,int maxStrokeCount,const PRCPrototypeDB_Standard * protoDB)514 PRC_GetRecognitionBufferSize(int maxPointCount,
515                              int maxStrokeCount, const PRCPrototypeDB_Standard *protoDB)
516 {
517     return PRC_GetRecognitionBufferSize_Standard(maxPointCount, maxStrokeCount, protoDB);
518 }
519 
520 static inline u32
PRC_GetRecognitionBufferSizeEx(int maxPointCount,int maxStrokeCount,const PRCPrototypeDB_Standard * protoDB,const PRCRecognizeParam_Standard * param)521 PRC_GetRecognitionBufferSizeEx(int maxPointCount,
522                                int maxStrokeCount,
523                                const PRCPrototypeDB_Standard *protoDB,
524                                const PRCRecognizeParam_Standard *param)
525 {
526     return PRC_GetRecognitionBufferSizeEx_Standard(maxPointCount, maxStrokeCount, protoDB, param);
527 }
528 
529 static inline fx32
PRC_GetRecognizedEntry(PRCPrototypeEntry ** resultEntry,void * buffer,const PRCInputPattern * input,const PRCPrototypeDB * protoDB)530 PRC_GetRecognizedEntry(PRCPrototypeEntry **resultEntry,
531                        void *buffer, const PRCInputPattern *input, const PRCPrototypeDB *protoDB)
532 {
533     return PRC_GetRecognizedEntry_Standard(resultEntry, buffer, input, protoDB);
534 }
535 
536 static inline fx32
PRC_GetRecognizedEntryEx(PRCPrototypeEntry ** resultEntry,void * buffer,const PRCInputPattern * input,const PRCPrototypeDB * protoDB,u32 kindMask,const PRCRecognizeParam * param)537 PRC_GetRecognizedEntryEx(PRCPrototypeEntry **resultEntry,
538                          void *buffer,
539                          const PRCInputPattern *input,
540                          const PRCPrototypeDB *protoDB,
541                          u32 kindMask, const PRCRecognizeParam *param)
542 {
543     return PRC_GetRecognizedEntryEx_Standard(resultEntry, buffer, input, protoDB, kindMask, param);
544 }
545 
546 static inline int
PRC_GetRecognizedEntries(PRCPrototypeEntry ** resultEntries,fx32 * resultScores,int numRanking,void * buffer,const PRCInputPattern * input,const PRCPrototypeDB * protoDB)547 PRC_GetRecognizedEntries(PRCPrototypeEntry **resultEntries,
548                          fx32 *resultScores,
549                          int numRanking,
550                          void *buffer, const PRCInputPattern *input, const PRCPrototypeDB *protoDB)
551 {
552     return PRC_GetRecognizedEntries_Standard(resultEntries, resultScores, numRanking, buffer, input,
553                                              protoDB);
554 }
555 
556 static inline int
PRC_GetRecognizedEntriesEx(PRCPrototypeEntry ** resultEntries,fx32 * resultScores,int numRanking,void * buffer,const PRCInputPattern * input,const PRCPrototypeDB * protoDB,u32 kindMask,const PRCRecognizeParam * param)557 PRC_GetRecognizedEntriesEx(PRCPrototypeEntry **resultEntries,
558                            fx32 *resultScores,
559                            int numRanking,
560                            void *buffer,
561                            const PRCInputPattern *input,
562                            const PRCPrototypeDB *protoDB,
563                            u32 kindMask, const PRCRecognizeParam *param)
564 {
565     return PRC_GetRecognizedEntriesEx_Standard(resultEntries, resultScores, numRanking, buffer,
566                                                input, protoDB, kindMask, param);
567 }
568 
PRC_GetInputPatternStrokes(PRCStrokes * strokes,const PRCInputPattern * input)569 static inline void PRC_GetInputPatternStrokes(PRCStrokes *strokes, const PRCInputPattern *input)
570 {
571     PRC_GetInputPatternStrokes_Standard(strokes, input);
572 }
573 
574 #endif // PRC_DEFAULT_ALGORITHM
575 
576 
577 
578 
579 #ifdef __cplusplus
580 } /* extern "C" */
581 #endif
582 
583 /* NITRO_PRC_ALGO_STANDARD_H_ */
584 #endif
585