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