-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvx_types.h
More file actions
1865 lines (1709 loc) · 92 KB
/
Copy pathvx_types.h
File metadata and controls
1865 lines (1709 loc) · 92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Copyright (c) 2012-2020 The Khronos Group Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _OPENVX_TYPES_H_
#define _OPENVX_TYPES_H_
/*!
* \file vx_types.h
* \brief The type definitions required by OpenVX Library.
*/
#include <stdint.h>
#include <stddef.h>
/*!
* \internal
* \def VX_API_ENTRY
* \brief This is a tag used to identify exported, public API functions as
* distinct from internal functions, helpers, and other non-public interfaces.
* It can optionally be defined in the make system according the the compiler and intent.
* \ingroup group_basic_features
*/
/*!
* \def VX_API_CALL
* \brief Defines calling convention for OpenVX API.
* \ingroup group_basic_features
*/
/*!
* \def VX_CALLBACK
* \brief Defines calling convention for user callbacks.
* \ingroup group_basic_features
*/
#ifndef VX_API_ENTRY
#define VX_API_ENTRY
#endif
#ifndef VX_API_CALL
#if defined(_WIN32)
#define VX_API_CALL __stdcall
#else
#define VX_API_CALL
#endif
#endif
#ifndef VX_CALLBACK
#if defined(_WIN32)
#define VX_CALLBACK __stdcall
#else
#define VX_CALLBACK
#endif
#endif
/*! \brief An 8 bit ASCII character.
* \ingroup group_basic_features
*/
typedef char vx_char;
/*! \brief An 8-bit unsigned value.
* \ingroup group_basic_features
*/
typedef uint8_t vx_uint8;
/*! \brief A 16-bit unsigned value.
* \ingroup group_basic_features
*/
typedef uint16_t vx_uint16;
/*! \brief A 32-bit unsigned value.
* \ingroup group_basic_features
*/
typedef uint32_t vx_uint32;
/*! \brief A 64-bit unsigned value.
* \ingroup group_basic_features
*/
typedef uint64_t vx_uint64;
/*! \brief An 8-bit signed value.
* \ingroup group_basic_features
*/
typedef int8_t vx_int8;
/*! \brief A 16-bit signed value.
* \ingroup group_basic_features
*/
typedef int16_t vx_int16;
/*! \brief A 32-bit signed value.
* \ingroup group_basic_features
*/
typedef int32_t vx_int32;
/*! \brief A 64-bit signed value.
* \ingroup group_basic_features
*/
typedef int64_t vx_int64;
typedef uint32_t vx_bitfield;
#if defined(EXPERIMENTAL_PLATFORM_SUPPORTS_16_FLOAT)
/*! \brief A 16-bit float value.
* \ingroup group_basic_features
*/
#if defined(__arm__) || defined(__arm64__)
typedef __fp16 vx_float16;
#else
typedef hfloat vx_float16;
#endif
#endif
/*! \brief A 32-bit float value.
* \ingroup group_basic_features
*/
typedef float vx_float32;
/*! \brief A 64-bit float value (aka double).
* \ingroup group_basic_features
*/
typedef double vx_float64;
/*! \brief A generic opaque reference to any object within OpenVX.
* \details A user of OpenVX should not assume that this can be cast directly to anything;
* however, any object in OpenVX can be cast back to this for the purposes of
* querying attributes of the object or for passing the object as a parameter to
* functions that take a <tt>\ref vx_reference</tt> type.
* If the API does not take that specific type but may take others, an
* error may be returned from the API.
* \ingroup group_reference
*/
typedef struct _vx_reference *vx_reference;
/*! \brief Sets the standard enumeration type size to be a fixed quantity.
* \details All enumerable fields must use this type as the container to
* enforce enumeration ranges and sizeof() operations.
* \ingroup group_basic_features
*/
typedef int32_t vx_enum;
/*! \brief A wrapper of <tt>size_t</tt> to keep the naming convention uniform.
* \ingroup group_basic_features
*/
typedef size_t vx_size;
/*! \brief Used to hold a VX_DF_IMAGE code to describe the pixel format and color space.
* \ingroup group_basic_features
*/
typedef uint32_t vx_df_image;
/*! \brief Holds the address of a variable where the map/unmap functions return a map identifier.
* \ingroup group_image
*/
typedef uintptr_t vx_map_id;
/*! \brief An opaque reference to a scalar.
* \details A scalar can be up to 64 bits wide.
* \see vxCreateScalar
* \ingroup group_scalar
* \extends vx_reference
*/
typedef struct _vx_scalar *vx_scalar;
/*! \brief An opaque reference to an image.
* \see vxCreateImage
* \ingroup group_image
* \extends vx_reference
*/
typedef struct _vx_image *vx_image;
/*! \brief An opaque reference to the descriptor of a kernel.
* \see vxGetKernelByName
* \see vxGetKernelByEnum
* \ingroup group_kernel
* \extends vx_reference
*/
typedef struct _vx_kernel *vx_kernel;
/*! \brief An opaque reference to a single parameter.
* \see vxGetParameterByIndex
* \ingroup group_parameter
* \extends vx_reference
*/
typedef struct _vx_parameter *vx_parameter;
/*! \brief An opaque reference to a kernel node.
* \see vxCreateGenericNode
* \ingroup group_node
* \extends vx_reference
*/
typedef struct _vx_node *vx_node;
/*! \brief An opaque reference to a graph
* \see vxCreateGraph
* \ingroup group_graph
* \extends vx_reference
*/
typedef struct _vx_graph *vx_graph;
/*! \brief An opaque reference to the implementation context.
* \see vxCreateContext
* \ingroup group_context
* \extends vx_reference
*/
typedef struct _vx_context *vx_context;
/*! \brief The delay object. This is like a ring buffer of objects that is
* maintained by the OpenVX implementation.
* \see vxCreateDelay
* \extends vx_reference
* \ingroup group_delay
*/
typedef struct _vx_delay *vx_delay;
/*! \brief The Look-Up Table (LUT) Object.
* \extends vx_reference
* \ingroup group_lut
*/
typedef struct _vx_lut *vx_lut;
/*! \brief The Distribution object. This has a user-defined number of bins over
* a user-defined range (within a uint32_t range).
* \extends vx_reference
* \ingroup group_distribution
*/
typedef struct _vx_distribution *vx_distribution;
/*! \brief The Matrix Object. An MxN matrix of some unit type.
* \extends vx_reference
* \ingroup group_matrix
*/
typedef struct _vx_matrix *vx_matrix;
/*! \brief The Image Pyramid object. A set of scaled images.
* \extends vx_reference
* \ingroup group_pyramid
*/
typedef struct _vx_pyramid *vx_pyramid;
/*! \brief The Threshold Object. A thresholding object contains the types and
* limit values of the thresholding required.
* \extends vx_reference
* \ingroup group_threshold
*/
typedef struct _vx_threshold *vx_threshold;
/*! \brief The Convolution Object. A user-defined convolution kernel of MxM elements.
* \extends vx_reference
* \ingroup group_convolution
*/
typedef struct _vx_convolution *vx_convolution;
/*! \brief The remap table Object. A remap table contains per-pixel mapping of
* output pixels to input pixels.
* \ingroup group_remap
*/
typedef struct _vx_remap *vx_remap;
/*! \brief The Array Object. Array is a strongly-typed container for other data structures.
* \ingroup group_array
*/
typedef struct _vx_array *vx_array;
/*! \brief The ObjectArray Object. ObjectArray is a strongly-typed container of OpenVX data-objects.
* \ingroup group_object_array
*/
typedef struct _vx_object_array *vx_object_array;
/*! \brief The multidimensional data object (Tensor).
* \see vxCreateTensor
* \ingroup group_object_tensor
* \extends vx_reference
*/
typedef struct _vx_tensor_t * vx_tensor;
/*! \brief A Boolean value.
* This allows 0 to be FALSE, as it is in C, and any non-zero to be TRUE.
* \code
* vx_bool ret = vx_true_e;
* if (ret) printf("true!\n");
* ret = vx_false_e;
* if (!ret) printf("false!\n");
* \endcode
* This would print both strings.
* \see vx_bool
* \ingroup group_basic_features
*/
enum vx_bool_e {
/*! \brief The "false" value. */
vx_false_e = 0,
/*! \brief The "true" value. */
vx_true_e,
};
/*! \brief A formal boolean type with known fixed size.
* \see vx_bool_e
* \ingroup group_basic_features
*/
typedef vx_enum vx_bool;
/*!
* \brief This object is used by output validation functions to specify the meta data
* of the expected output data object.
* \note When the actual output object of the user node is virtual, the information
* given through the vx_meta_format object allows the OpenVX framework to automatically
* create the data object when meta data were not specified by the application at object
* creation time.
* \ingroup group_user_kernels
*/
typedef struct _vx_meta_format* vx_meta_format;
/*! \brief The type enumeration lists all the known types in OpenVX.
* \ingroup group_basic_features
*/
enum vx_type_e {
VX_TYPE_INVALID = 0x000,/*!< \brief An invalid type value. When passed an error must be returned. */
VX_TYPE_CHAR = 0x001,/*!< \brief A <tt>\ref vx_char</tt>. */
VX_TYPE_INT8 = 0x002,/*!< \brief A <tt>\ref vx_int8</tt>. */
VX_TYPE_UINT8 = 0x003,/*!< \brief A <tt>\ref vx_uint8</tt>. */
VX_TYPE_INT16 = 0x004,/*!< \brief A <tt>\ref vx_int16</tt>. */
VX_TYPE_UINT16 = 0x005,/*!< \brief A <tt>\ref vx_uint16</tt>. */
VX_TYPE_INT32 = 0x006,/*!< \brief A <tt>\ref vx_int32</tt>. */
VX_TYPE_UINT32 = 0x007,/*!< \brief A <tt>\ref vx_uint32</tt>. */
VX_TYPE_INT64 = 0x008,/*!< \brief A <tt>\ref vx_int64</tt>. */
VX_TYPE_UINT64 = 0x009,/*!< \brief A <tt>\ref vx_uint64</tt>. */
VX_TYPE_FLOAT32 = 0x00A,/*!< \brief A <tt>\ref vx_float32</tt>. */
VX_TYPE_FLOAT64 = 0x00B,/*!< \brief A <tt>\ref vx_float64</tt>. */
VX_TYPE_ENUM = 0x00C,/*!< \brief A <tt>\ref vx_enum</tt>. Equivalent in size to a <tt>\ref vx_int32</tt>. */
VX_TYPE_SIZE = 0x00D,/*!< \brief A <tt>\ref vx_size</tt>. */
VX_TYPE_DF_IMAGE = 0x00E,/*!< \brief A <tt>\ref vx_df_image</tt>. */
VX_TYPE_FLOAT16 = 0x00F,/*!< \brief A <tt>\ref vx_float16</tt>. */
VX_TYPE_BOOL = 0x010,/*!< \brief A <tt>\ref vx_bool</tt>. */
VX_TYPE_RECTANGLE = 0x020,/*!< \brief A <tt>\ref vx_rectangle_t</tt>. */
VX_TYPE_KEYPOINT = 0x021,/*!< \brief A <tt>\ref vx_keypoint_t</tt>. */
VX_TYPE_COORDINATES2D = 0x022,/*!< \brief A <tt>\ref vx_coordinates2d_t</tt>. */
VX_TYPE_COORDINATES3D = 0x023,/*!< \brief A <tt>\ref vx_coordinates3d_t</tt>. */
VX_TYPE_COORDINATES2DF = 0x024,/*!< \brief A <tt>\ref vx_coordinates2df_t</tt>. */
/* Reserve enums that are defined in khronos extensions
NN extensions:
VX_TYPE_NN_CONVOLUTION_PARAMS = 0x025,
VX_TYPE_NN_DECONVOLUTION_PARAMS = 0x026,
VX_TYPE_NN_ROI_POOL_PARAMS = 0x027,
Classifier extension:
VX_TYPE_CLASSIFER_MODEL = 0x02C,
*/
VX_TYPE_HOG_PARAMS = 0x028, /*!< \brief A <tt>\ref vx_hog_t</tt>. */
VX_TYPE_HOUGH_LINES_PARAMS = 0x029, /*!< \brief A <tt>\ref vx_hough_lines_p_t</tt>. */
VX_TYPE_LINE_2D = 0x02A, /*!< \brief A <tt>\ref vx_line2d_t</tt>. */
VX_TYPE_TENSOR_MATRIX_MULTIPLY_PARAMS = 0x02B, /*!< \brief A <tt>\ref vx_tensor_matrix_multiply_params_t</tt>. */
VX_TYPE_USER_STRUCT_START = 0x100,/*!< \brief A user-defined struct base index.*/
VX_TYPE_VENDOR_STRUCT_START = 0x400,/*!< \brief A vendor-defined struct base index.*/
VX_TYPE_KHRONOS_OBJECT_START = 0x800,/*!< \brief A Khronos defined object base index. */
VX_TYPE_VENDOR_OBJECT_START = 0xC00,/*!< \brief A vendor defined object base index. */
VX_TYPE_KHRONOS_STRUCT_MAX = (vx_enum)VX_TYPE_USER_STRUCT_START - 1,/*!< \brief A value for comparison between Khronos defined structs and user structs. */
VX_TYPE_USER_STRUCT_END = (vx_enum)VX_TYPE_VENDOR_STRUCT_START - 1,/*!< \brief A value for comparison between user structs and vendor structs. */
VX_TYPE_VENDOR_STRUCT_END = (vx_enum)VX_TYPE_KHRONOS_OBJECT_START - 1,/*!< \brief A value for comparison between vendor structs and Khronos defined objects. */
VX_TYPE_KHRONOS_OBJECT_END = (vx_enum)VX_TYPE_VENDOR_OBJECT_START - 1,/*!< \brief A value for comparison between Khronos defined objects and vendor structs. */
VX_TYPE_VENDOR_OBJECT_END = 0xFFF,/*!< \brief A value used for bound checking of vendor objects */
VX_TYPE_REFERENCE = 0x800,/*!< \brief A <tt>\ref vx_reference</tt>. */
VX_TYPE_CONTEXT = 0x801,/*!< \brief A <tt>\ref vx_context</tt>. */
VX_TYPE_GRAPH = 0x802,/*!< \brief A <tt>\ref vx_graph</tt>. */
VX_TYPE_NODE = 0x803,/*!< \brief A <tt>\ref vx_node</tt>. */
VX_TYPE_KERNEL = 0x804,/*!< \brief A <tt>\ref vx_kernel</tt>. */
VX_TYPE_PARAMETER = 0x805,/*!< \brief A <tt>\ref vx_parameter</tt>. */
VX_TYPE_DELAY = 0x806,/*!< \brief A <tt>\ref vx_delay</tt>. */
VX_TYPE_LUT = 0x807,/*!< \brief A <tt>\ref vx_lut</tt>. */
VX_TYPE_DISTRIBUTION = 0x808,/*!< \brief A <tt>\ref vx_distribution</tt>. */
VX_TYPE_PYRAMID = 0x809,/*!< \brief A <tt>\ref vx_pyramid</tt>. */
VX_TYPE_THRESHOLD = 0x80A,/*!< \brief A <tt>\ref vx_threshold</tt>. */
VX_TYPE_MATRIX = 0x80B,/*!< \brief A <tt>\ref vx_matrix</tt>. */
VX_TYPE_CONVOLUTION = 0x80C,/*!< \brief A <tt>\ref vx_convolution</tt>. */
VX_TYPE_SCALAR = 0x80D,/*!< \brief A <tt>\ref vx_scalar</tt>. when needed to be completely generic for kernel validation. */
VX_TYPE_ARRAY = 0x80E,/*!< \brief A <tt>\ref vx_array</tt>. */
VX_TYPE_IMAGE = 0x80F,/*!< \brief A <tt>\ref vx_image</tt>. */
VX_TYPE_REMAP = 0x810,/*!< \brief A <tt>\ref vx_remap</tt>. */
VX_TYPE_ERROR = 0x811,/*!< \brief An error object which has no type. */
VX_TYPE_META_FORMAT = 0x812,/*!< \brief A <tt>\ref vx_meta_format</tt>. */
VX_TYPE_OBJECT_ARRAY = 0x813,/*!< \brief A <tt>\ref vx_object_array</tt>. */
/* Reserved for IX and XML extensions */
/* VX_TYPE_IMPORT = 0x814, !< \brief A <tt>\ref vx_import</tt>. */
VX_TYPE_TENSOR = 0x815,/*!< \brief A <tt>\ref vx_tensor</tt>. */
/* \todo add new object types here */
};
/*! \brief The enumeration of all status codes.
* \see vx_status.
* \ingroup group_basic_features
*/
enum vx_status_e {
VX_STATUS_MIN = -(vx_int32)25,/*!< \brief Indicates the lower bound of status codes in VX. Used for bounds checks only. */
/* add new codes here */
VX_ERROR_REFERENCE_NONZERO = -(vx_int32)24,/*!< \brief Indicates that an operation did not complete due to a reference count being non-zero. */
VX_ERROR_MULTIPLE_WRITERS = -(vx_int32)23,/*!< \brief Indicates that the graph has more than one node outputting to the same data object. This is an invalid graph structure. */
VX_ERROR_GRAPH_ABANDONED = -(vx_int32)22,/*!< \brief Indicates that the graph is stopped due to an error or a callback that abandoned execution. */
VX_ERROR_GRAPH_SCHEDULED = -(vx_int32)21,/*!< \brief Indicates that the supplied graph already has been scheduled and may be currently executing. */
VX_ERROR_INVALID_SCOPE = -(vx_int32)20,/*!< \brief Indicates that the supplied parameter is from another scope and cannot be used in the current scope. */
VX_ERROR_INVALID_NODE = -(vx_int32)19,/*!< \brief Indicates that the supplied node could not be created.*/
VX_ERROR_INVALID_GRAPH = -(vx_int32)18,/*!< \brief Indicates that the supplied graph has invalid connections (cycles). */
VX_ERROR_INVALID_TYPE = -(vx_int32)17,/*!< \brief Indicates that the supplied type parameter is incorrect. */
VX_ERROR_INVALID_VALUE = -(vx_int32)16,/*!< \brief Indicates that the supplied parameter has an incorrect value. */
VX_ERROR_INVALID_DIMENSION = -(vx_int32)15,/*!< \brief Indicates that the supplied parameter is too big or too small in dimension. */
VX_ERROR_INVALID_FORMAT = -(vx_int32)14,/*!< \brief Indicates that the supplied parameter is in an invalid format. */
VX_ERROR_INVALID_LINK = -(vx_int32)13,/*!< \brief Indicates that the link is not possible as specified. The parameters are incompatible. */
VX_ERROR_INVALID_REFERENCE = -(vx_int32)12,/*!< \brief Indicates that the reference provided is not valid. */
VX_ERROR_INVALID_MODULE = -(vx_int32)11,/*!< \brief This is returned from <tt>\ref vxLoadKernels</tt> when the module does not contain the entry point. */
VX_ERROR_INVALID_PARAMETERS = -(vx_int32)10,/*!< \brief Indicates that the supplied parameter information does not match the kernel contract. */
VX_ERROR_OPTIMIZED_AWAY = -(vx_int32)9,/*!< \brief Indicates that the object refered to has been optimized out of existence. */
VX_ERROR_NO_MEMORY = -(vx_int32)8,/*!< \brief Indicates that an internal or implicit allocation failed. Typically catastrophic. After detection, deconstruct the context. \see vxVerifyGraph. */
VX_ERROR_NO_RESOURCES = -(vx_int32)7,/*!< \brief Indicates that an internal or implicit resource can not be acquired (not memory). This is typically catastrophic. After detection, deconstruct the context. \see vxVerifyGraph. */
VX_ERROR_NOT_COMPATIBLE = -(vx_int32)6,/*!< \brief Indicates that the attempt to link two parameters together failed due to type incompatibilty. */
VX_ERROR_NOT_ALLOCATED = -(vx_int32)5,/*!< \brief Indicates to the system that the parameter must be allocated by the system. */
VX_ERROR_NOT_SUFFICIENT = -(vx_int32)4,/*!< \brief Indicates that the given graph has failed verification due to an insufficient number of required parameters, which cannot be automatically created. Typically this indicates required atomic parameters. \see vxVerifyGraph. */
VX_ERROR_NOT_SUPPORTED = -(vx_int32)3,/*!< \brief Indicates that the requested set of parameters produce a configuration that cannot be supported. Refer to the supplied documentation on the configured kernels. \see vx_kernel_e. This is also returned if a function to set an attribute is called on a Read-only attribute.*/
VX_ERROR_NOT_IMPLEMENTED = -(vx_int32)2,/*!< \brief Indicates that the requested kernel is missing. \see vx_kernel_e vxGetKernelByName. */
VX_FAILURE = -(vx_int32)1,/*!< \brief Indicates a generic error code, used when no other describes the error. */
VX_SUCCESS = 0,/*!< \brief No error. */
};
/*! \brief A formal status type with known fixed size.
* \see vx_status_e
* \ingroup group_basic_features
*/
typedef vx_enum vx_status;
/*! \brief The formal typedef of the response from the callback.
* \see vx_action_e
* \ingroup group_node_callback
*/
typedef vx_enum vx_action;
/*! \brief A callback to the client after a particular node has completed.
* \see vx_action
* \see vxAssignNodeCallback
* \param [in] node The node to which the callback was attached.
* \return An action code from <tt>\ref vx_action_e</tt>.
* \ingroup group_node_callback
*/
typedef vx_action (VX_CALLBACK *vx_nodecomplete_f)(vx_node node);
/*! \brief Vendor IDs are 2 nibbles in size and are located in the upper byte of
* the 4 bytes of an enumeration.
* \ingroup group_basic_features
*/
#define VX_VENDOR_MASK (0xFFF00000U)
/*! \brief A type mask removes the scalar/object type from the attribute.
* It is 3 nibbles in size and is contained between the third and second byte.
* \see vx_type_e
* \ingroup group_basic_features
*/
#define VX_TYPE_MASK (0x000FFF00U)
/*! \brief A library is a set of vision kernels with its own ID supplied by a vendor.
* The vendor defines the library ID. The range is \f$ [0,2^{8}-1] \f$ inclusive.
* \ingroup group_basic_features
*/
#define VX_LIBRARY_MASK (0x000FF000U)
/*! \brief An individual kernel in a library has its own unique ID within \f$ [0,2^{12}-1] \f$ (inclusive).
* \ingroup group_basic_features
*/
#define VX_KERNEL_MASK (0x00000FFFU)
/*! \brief An object's attribute ID is within the range of \f$ [0,2^{8}-1] \f$ (inclusive).
* \ingroup group_basic_features
*/
#define VX_ATTRIBUTE_ID_MASK (0x000000FFU)
/*! \brief A type of enumeration. The valid range is between \f$ [0,2^{8}-1] \f$ (inclusive).
* \ingroup group_basic_features
*/
#define VX_ENUM_TYPE_MASK (0x000FF000U)
/*! \brief A generic enumeration list can have values between \f$ [0,2^{12}-1] \f$ (inclusive).
* \ingroup group_basic_features
*/
#define VX_ENUM_MASK (0x00000FFFU)
/*! \brief A macro to extract the vendor ID from the enumerated value.
* \ingroup group_basic_features
*/
#define VX_VENDOR(e) (((vx_uint32)(e) & VX_VENDOR_MASK) >> 20)
/*! \brief A macro to extract the type from an enumerated attribute value.
* \ingroup group_basic_features
*/
#define VX_TYPE(e) (((vx_uint32)(e) & VX_TYPE_MASK) >> 8)
/*! \brief A macro to extract the enum type from an enumerated value.
* \ingroup group_basic_features
*/
#define VX_ENUM_TYPE(e) (((vx_uint32)(e) & VX_ENUM_TYPE_MASK) >> 12)
/*! \brief A macro to extract the kernel library enumeration from a enumerated kernel value.
* \ingroup group_basic_features
*/
#define VX_LIBRARY(e) (((vx_uint32)(e) & VX_LIBRARY_MASK) >> 12)
/*! \def VX_DF_IMAGE
* \brief Converts a set of four chars into a \c uint32_t container of a VX_DF_IMAGE code.
* \note Use a <tt>\ref vx_df_image</tt> variable to hold the value.
* \ingroup group_basic_features
*/
#define VX_DF_IMAGE(a,b,c,d) ((vx_uint32)(vx_uint8)(a) | ((vx_uint32)(vx_uint8)(b) << 8U) | ((vx_uint32)(vx_uint8)(c) << 16U) | ((vx_uint32)(vx_uint8)(d) << 24U))
/*! \def VX_ATTRIBUTE_BASE
* \brief Defines the manner in which to combine the Vendor and Object IDs to get
* the base value of the enumeration.
* \ingroup group_basic_features
*/
#define VX_ATTRIBUTE_BASE(vendor, object) ((vx_int32)(((vx_uint32)(vendor) << 20) | ((vx_uint32)(object) << 8)))
/*! \def VX_KERNEL_BASE
* \brief Defines the manner in which to combine the Vendor and Library IDs to get
* the base value of the enumeration.
* \ingroup group_basic_features
*/
#define VX_KERNEL_BASE(vendor, lib) ((vx_int32)(((vx_uint32)(vendor) << 20) | ((vx_uint32)(lib) << 12)))
/*! \def VX_ENUM_BASE
* \brief Defines the manner in which to combine the Vendor and Object IDs to get
* the base value of the enumeration.
* \details From any enumerated value (with exceptions), the vendor, and enumeration
* type should be extractable. Those types that are exceptions are
* <tt>\ref vx_vendor_id_e</tt>, <tt>\ref vx_type_e</tt>, <tt>\ref vx_enum_e</tt>, <tt>\ref vx_df_image_e</tt>, and \c vx_bool.
* \ingroup group_basic_features
*/
#define VX_ENUM_BASE(vendor, id) ((vx_int32)(((vx_uint32)(vendor) << 20) | ((vx_uint32)(id) << 12)))
/*! \brief The set of supported enumerations in OpenVX.
* \details These can be extracted from enumerated values using <tt>\ref VX_ENUM_TYPE</tt>.
* \ingroup group_basic_features
*/
enum vx_enum_e {
VX_ENUM_DIRECTION = 0x00, /*!< \brief Parameter Direction. */
VX_ENUM_ACTION = 0x01, /*!< \brief Action Codes. */
VX_ENUM_HINT = 0x02, /*!< \brief Hint Values. */
VX_ENUM_DIRECTIVE = 0x03, /*!< \brief Directive Values. */
VX_ENUM_INTERPOLATION = 0x04, /*!< \brief Interpolation Types. */
VX_ENUM_OVERFLOW = 0x05, /*!< \brief Overflow Policies. */
VX_ENUM_COLOR_SPACE = 0x06, /*!< \brief Color Space. */
VX_ENUM_COLOR_RANGE = 0x07, /*!< \brief Color Space Range. */
VX_ENUM_PARAMETER_STATE = 0x08, /*!< \brief Parameter State. */
VX_ENUM_CHANNEL = 0x09, /*!< \brief Channel Name. */
VX_ENUM_CONVERT_POLICY = 0x0A, /*!< \brief Convert Policy. */
VX_ENUM_THRESHOLD_TYPE = 0x0B, /*!< \brief Threshold Type List. */
VX_ENUM_BORDER = 0x0C, /*!< \brief Border Mode List. */
VX_ENUM_COMPARISON = 0x0D, /*!< \brief Comparison Values. */
VX_ENUM_MEMORY_TYPE = 0x0E, /*!< \brief The memory type enumeration. */
VX_ENUM_TERM_CRITERIA = 0x0F, /*!< \brief A termination criteria. */
VX_ENUM_NORM_TYPE = 0x10, /*!< \brief A norm type. */
VX_ENUM_ACCESSOR = 0x11, /*!< \brief An accessor flag type. */
VX_ENUM_ROUND_POLICY = 0x12, /*!< \brief Rounding Policy. */
VX_ENUM_TARGET = 0x13, /*!< \brief Target. */
VX_ENUM_BORDER_POLICY = 0x14, /*!< \brief Unsupported Border Mode Policy List. */
VX_ENUM_GRAPH_STATE = 0x15, /*!< \brief Graph attribute states. */
VX_ENUM_NONLINEAR = 0x16, /*!< \brief Non-linear function list. */
VX_ENUM_PATTERN = 0x17, /*!< \brief Matrix pattern enumeration. */
VX_ENUM_LBP_FORMAT = 0x18, /*!< \brief Lbp format. */
VX_ENUM_COMP_METRIC = 0x19, /*!< \brief Compare metric. */
/* NN extension
VX_ENUM_NN_ROUNDING_TYPE = 0x1A,
VX_ENUM_NN_POOLING_TYPE = 0x1B,
VX_ENUM_NN_NORMALIZATION_TYPE = 0x1C,
VX_ENUM_NN_ACTIVATION_FUNCTION_TYPE = 0x1D,
*/
/* Classifier extension
VX_ENUM_CLASSIFIER_MODEL= 0x1E,
*/
/* IX extension
VX_ENUM_IX_USE = 0x1F, !< \brief How to use references in import and export. */
VX_ENUM_SCALAR_OPERATION= 0X20 /*!< \brief Scalar operation list. */
};
/*! \brief A return code enumeration from a <tt>\ref vx_nodecomplete_f</tt> during execution.
* \see <tt>vxAssignNodeCallback</tt>
* \ingroup group_node_callback
*/
enum vx_action_e {
/*! \brief Continue executing the graph with no changes. */
VX_ACTION_CONTINUE = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_ACTION) + 0x0,
/*! \brief Stop executing the graph. */
VX_ACTION_ABANDON = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_ACTION) + 0x1,
};
/*! \brief An indication of how a kernel will treat the given parameter.
* \ingroup group_parameter
*/
enum vx_direction_e {
/*! \brief The parameter is an input only. */
VX_INPUT = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_DIRECTION) + 0x0,
/*! \brief The parameter is an output only. */
VX_OUTPUT = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_DIRECTION) + 0x1,
};
/*! \brief These enumerations are given to the <tt>\ref vxHint</tt> API to enable/disable platform
* optimizations and/or features. Hints are optional and usually are vendor-specific.
* \see <tt>\ref vxHint</tt>
* \ingroup group_hint
*/
enum vx_hint_e {
/*! \brief Indicates to the implementation that user do not apply any specific
* requirements for performance.
*/
VX_HINT_PERFORMANCE_DEFAULT = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_HINT) + 0x1,
/*! \brief Indicates the user preference is low power consumption versus
* highest performance.
*/
VX_HINT_PERFORMANCE_LOW_POWER = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_HINT) + 0x2,
/*! \brief Indicates the user preference for highest performance over
* low power consumption.
*/
VX_HINT_PERFORMANCE_HIGH_SPEED = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_HINT) + 0x3,
};
/*! \brief These enumerations are given to the \c vxDirective API to enable/disable
* platform optimizations and/or features. Directives are not optional and
* usually are vendor-specific, by defining a vendor range of directives and
* starting their enumeration from there.
* \see <tt>vxDirective</tt>
* \ingroup group_directive
*/
enum vx_directive_e {
/*! \brief Disables recording information for graph debugging. */
VX_DIRECTIVE_DISABLE_LOGGING = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_DIRECTIVE) + 0x0,
/*! \brief Enables recording information for graph debugging. */
VX_DIRECTIVE_ENABLE_LOGGING = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_DIRECTIVE) + 0x1,
/*! \brief Disables performance counters for the context. By default performance counters are disabled */
VX_DIRECTIVE_DISABLE_PERFORMANCE = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_DIRECTIVE) + 0x2,
/*! \brief Enables performance counters for the context. */
VX_DIRECTIVE_ENABLE_PERFORMANCE = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_DIRECTIVE) + 0x3,
};
/*! \brief The Graph State Enumeration.
* \ingroup group_graph
*/
enum vx_graph_state_e {
/*! \brief The graph should be verified before execution */
VX_GRAPH_STATE_UNVERIFIED = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_GRAPH_STATE) + 0x0,
/*! \brief The graph has been verified and has not been executed or scheduled for execution yet */
VX_GRAPH_STATE_VERIFIED = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_GRAPH_STATE) + 0x1,
/*! \brief The graph either has been scheduled and not completed, or is being executed */
VX_GRAPH_STATE_RUNNING = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_GRAPH_STATE) + 0x2,
/*! \brief The graph execution was abandoned */
VX_GRAPH_STATE_ABANDONED = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_GRAPH_STATE) + 0x3,
/*! \brief The graph execution is completed and the graph is not scheduled for execution */
VX_GRAPH_STATE_COMPLETED = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_GRAPH_STATE) + 0x4,
};
/*! \brief The graph attributes list.
* \ingroup group_graph
*/
enum vx_graph_attribute_e {
/*! \brief Returns the number of nodes in a graph. Read-only. Use a <tt>\ref vx_uint32</tt> parameter.*/
VX_GRAPH_NUMNODES = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_GRAPH) + 0x0,
/*! \brief Returns the overall performance of the graph. Read-only. Use a <tt>\ref vx_perf_t</tt> parameter.
* The accuracy of timing information is platform dependent.
* \note Performance tracking must have been enabled. See <tt>\ref vx_directive_e</tt>
*/
VX_GRAPH_PERFORMANCE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_GRAPH) + 0x2,
/*! \brief Returns the number of explicitly declared parameters on the graph. Read-only. Use a <tt>\ref vx_uint32</tt> parameter. */
VX_GRAPH_NUMPARAMETERS = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_GRAPH) + 0x3,
/*! \brief Returns the state of the graph. See <tt>\ref vx_graph_state_e</tt> enum. */
VX_GRAPH_STATE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_GRAPH) + 0x4,
};
/*! \brief The Conversion Policy Enumeration.
* \ingroup group_basic_features
*/
enum vx_convert_policy_e {
/*! \brief Results are the least significant bits of the output operand, as if
* stored in two's complement binary format in the size of its bit-depth.
*/
VX_CONVERT_POLICY_WRAP = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_CONVERT_POLICY) + 0x0,
/*! \brief Results are saturated to the bit depth of the output operand. */
VX_CONVERT_POLICY_SATURATE = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_CONVERT_POLICY) + 0x1,
};
/*! \brief Based on the VX_DF_IMAGE definition.
* \note Use <tt>\ref vx_df_image</tt> to contain these values.
* \ingroup group_basic_features
*/
enum vx_df_image_e {
/*! \brief A virtual image of no defined type. */
VX_DF_IMAGE_VIRT = VX_DF_IMAGE('V','I','R','T'),
/*! \brief A single plane of 24-bit pixel as 3 interleaved 8-bit units of
* R then G then B data. This uses the BT709 full range by default.
*/
VX_DF_IMAGE_RGB = VX_DF_IMAGE('R','G','B','2'),
/*! \brief A single plane of 32-bit pixel as 4 interleaved 8-bit units of
* R then G then B data, then a <i>don't care</i> byte.
* This uses the BT709 full range by default.
*/
VX_DF_IMAGE_RGBX = VX_DF_IMAGE('R','G','B','A'),
/*! \brief A 2-plane YUV format of Luma (Y) and interleaved UV data at
* 4:2:0 sampling. This uses the BT709 full range by default.
*/
VX_DF_IMAGE_NV12 = VX_DF_IMAGE('N','V','1','2'),
/*! \brief A 2-plane YUV format of Luma (Y) and interleaved VU data at
* 4:2:0 sampling. This uses the BT709 full range by default.
*/
VX_DF_IMAGE_NV21 = VX_DF_IMAGE('N','V','2','1'),
/*! \brief A single plane of 32-bit macro pixel of U0, Y0, V0, Y1 bytes.
* This uses the BT709 full range by default.
*/
VX_DF_IMAGE_UYVY = VX_DF_IMAGE('U','Y','V','Y'),
/*! \brief A single plane of 32-bit macro pixel of Y0, U0, Y1, V0 bytes.
* This uses the BT709 full range by default.
*/
VX_DF_IMAGE_YUYV = VX_DF_IMAGE('Y','U','Y','V'),
/*! \brief A 3 plane of 8-bit 4:2:0 sampled Y, U, V planes.
* This uses the BT709 full range by default.
*/
VX_DF_IMAGE_IYUV = VX_DF_IMAGE('I','Y','U','V'),
/*! \brief A 3 plane of 8 bit 4:4:4 sampled Y, U, V planes.
* This uses the BT709 full range by default.
*/
VX_DF_IMAGE_YUV4 = VX_DF_IMAGE('Y','U','V','4'),
/*! \brief A single plane of unsigned 1-bit data packed eight pixels per byte.
* The least significant bit is the first pixel in each byte.
* See <tt>\ref vx_imagepatch_addressing_t</tt> for more details.
*/
VX_DF_IMAGE_U1 = VX_DF_IMAGE('U','0','0','1'),
/*! \brief A single plane of unsigned 8-bit data.
* The range of data is not specified, as it may be extracted from a YUV or
* generated.
*/
VX_DF_IMAGE_U8 = VX_DF_IMAGE('U','0','0','8'),
/*! \brief A single plane of unsigned 16-bit data.
* The range of data is not specified, as it may be extracted from a YUV or
* generated.
*/
VX_DF_IMAGE_U16 = VX_DF_IMAGE('U','0','1','6'),
/*! \brief A single plane of signed 16-bit data.
* The range of data is not specified, as it may be extracted from a YUV or
* generated.
*/
VX_DF_IMAGE_S16 = VX_DF_IMAGE('S','0','1','6'),
/*! \brief A single plane of unsigned 32-bit data.
* The range of data is not specified, as it may be extracted from a YUV or
* generated.
*/
VX_DF_IMAGE_U32 = VX_DF_IMAGE('U','0','3','2'),
/*! \brief A single plane of unsigned 32-bit data.
* The range of data is not specified, as it may be extracted from a YUV or
* generated.
*/
VX_DF_IMAGE_S32 = VX_DF_IMAGE('S','0','3','2'),
};
/*! \brief The Target Enumeration.
* \ingroup group_basic_features
*/
enum vx_target_e {
/*! \brief Any available target. An OpenVX implementation must support at least one target associated with this value */
VX_TARGET_ANY = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_TARGET) + 0x0000,
/*! \brief Target, explicitly specified by its (case-insensitive) name string. */
VX_TARGET_STRING = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_TARGET) + 0x0001,
/*! \brief Start of Vendor specific target enumerates. */
VX_TARGET_VENDOR_BEGIN = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_TARGET) + 0x1000,
};
/*! \brief The reference attributes list.
* \ingroup group_reference
*/
enum vx_reference_attribute_e {
/*! \brief Returns the reference count of the object. Read-only. Use a <tt>\ref vx_uint32</tt> parameter. */
VX_REFERENCE_COUNT = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_REFERENCE) + 0x0,
/*! \brief Returns the <tt>\ref vx_type_e</tt> of the reference. Read-only. Use a <tt>\ref vx_enum</tt> parameter. */
VX_REFERENCE_TYPE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_REFERENCE) + 0x1,
/*! \brief Used to query the reference for its name. Read-write. Use a *<tt>\ref vx_char</tt> parameter. */
VX_REFERENCE_NAME = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_REFERENCE) + 0x2,
};
/*! \brief A list of context attributes.
* \ingroup group_context
*/
enum vx_context_attribute_e {
/*! \brief Queries the unique vendor ID. Read-only. Use a <tt>\ref vx_uint16</tt>. */
VX_CONTEXT_VENDOR_ID = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_CONTEXT) + 0x0,
/*! \brief Queries the OpenVX Version Number. Read-only. Use a <tt>\ref vx_uint16</tt> */
VX_CONTEXT_VERSION = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_CONTEXT) + 0x1,
/*! \brief Queries the context for the number of \e unique kernels. Read-only. Use a <tt>\ref vx_uint32</tt> parameter. */
VX_CONTEXT_UNIQUE_KERNELS = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_CONTEXT) + 0x2,
/*! \brief Queries the context for the number of active modules. Read-only. Use a <tt>\ref vx_uint32</tt> parameter. */
VX_CONTEXT_MODULES = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_CONTEXT) + 0x3,
/*! \brief Queries the context for the number of active references. Read-only. Use a <tt>\ref vx_uint32</tt> parameter. */
VX_CONTEXT_REFERENCES = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_CONTEXT) + 0x4,
/*! \brief Queries the context for it's implementation name. Read-only. Use a <tt>\ref vx_char</tt>[<tt>\ref VX_MAX_IMPLEMENTATION_NAME</tt>] array */
VX_CONTEXT_IMPLEMENTATION = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_CONTEXT) + 0x5,
/*! \brief Queries the number of bytes in the extensions string. Read-only. Use a <tt>\ref vx_size</tt> parameter. */
VX_CONTEXT_EXTENSIONS_SIZE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_CONTEXT) + 0x6,
/*! \brief Retrieves the extensions string. Read-only.
* This is a space-separated string of extension names. Each OpenVX official extension has a unique identifier,
* comprised of capital letters, numbers and the underscore character, prefixed with "KHR_", for example "KHR_NEW_FEATURE".
* Use a <tt>\ref vx_char</tt> pointer allocated to the size returned from <tt>\ref VX_CONTEXT_EXTENSIONS_SIZE</tt>.
*/
VX_CONTEXT_EXTENSIONS = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_CONTEXT) + 0x7,
/*! \brief The maximum width or height of a convolution matrix.
* Read-only. Use a <tt>\ref vx_size</tt> parameter.
* Each vendor must support centered kernels of size w X h, where both w
* and h are odd numbers, 3 <= w <= n and 3 <= h <= n, where n is the value of the
* <tt>\ref VX_CONTEXT_CONVOLUTION_MAX_DIMENSION</tt> attribute. n is an odd
* number that should not be smaller than 9. w and h may or may not be equal to
* each other. All combinations of w and h meeting the conditions above must be
* supported. The behavior of <tt>\ref vxCreateConvolution</tt> is undefined for values
* larger than the value returned by this attribute.
*/
VX_CONTEXT_CONVOLUTION_MAX_DIMENSION = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_CONTEXT) + 0x8,
/*! \brief The maximum window dimension of the OpticalFlowPyrLK kernel. The value of this attribute shall be equal to or greater than '9'.
* \see <tt>\ref VX_KERNEL_OPTICAL_FLOW_PYR_LK</tt>. Read-only. Use a <tt>\ref vx_size</tt> parameter.
*/
VX_CONTEXT_OPTICAL_FLOW_MAX_WINDOW_DIMENSION = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_CONTEXT) + 0x9,
/*! \brief The border mode for immediate mode functions.
* \details Graph mode functions are unaffected by this attribute. Read-write. Use a pointer to a <tt>\ref vx_border_t</tt> structure as parameter.
* \note The assumed default value for immediate mode functions is <tt>\ref VX_BORDER_UNDEFINED</tt>.
*/
VX_CONTEXT_IMMEDIATE_BORDER = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_CONTEXT) + 0xA,
/*! \brief Returns the table of all unique the kernels that exist in the context.
* Read-only. Use a <tt>\ref vx_kernel_info_t</tt> array.
* \pre You must call <tt>\ref vxQueryContext</tt> with <tt>\ref VX_CONTEXT_UNIQUE_KERNELS</tt>
* to compute the necessary size of the array.
*/
VX_CONTEXT_UNIQUE_KERNEL_TABLE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_CONTEXT) + 0xB,
/*! \brief The unsupported border mode policy for immediate mode functions. Read-Write.
* \details Graph mode functions are unaffected by this attribute. Use a <tt>\ref vx_enum</tt> as parameter. Will contain a <tt>\ref vx_border_policy_e</tt>.
* \note The assumed default value for immediate mode functions is <tt>\ref VX_BORDER_POLICY_DEFAULT_TO_UNDEFINED</tt>. Users should refer to the documentation of their implementation to determine what border modes are supported by each kernel.
*/
VX_CONTEXT_IMMEDIATE_BORDER_POLICY = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_CONTEXT) + 0xC,
/*! \brief The dimension of the largest nonlinear filter supported. See <tt>\ref vxNonLinearFilterNode</tt>.
* \details The implementation must support all dimensions (height or width, not necessarily the same)
* up to the value of this attribute. The lowest value that must be supported for this attribute is 9.
* Read-only. Use a <tt>\ref vx_size</tt> parameter.
*/
VX_CONTEXT_NONLINEAR_MAX_DIMENSION = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_CONTEXT) + 0xd,
/*! \brief tensor Data maximal number of dimensions supported by the implementation. */
VX_CONTEXT_MAX_TENSOR_DIMS = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_CONTEXT) + 0xE,
};
/*! \brief The kernel attributes list
* \ingroup group_kernel
*/
enum vx_kernel_attribute_e {
/*! \brief Queries a kernel for the number of parameters the kernel
* supports. Read-only. Use a <tt>\ref vx_uint32</tt> parameter.
*/
VX_KERNEL_PARAMETERS = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_KERNEL) + 0x0,
/*! \brief Queries the name of the kernel. Not settable.
* Read-only. Use a <tt>\ref vx_char</tt>[<tt>\ref VX_MAX_KERNEL_NAME</tt>] array (not a <tt>\ref vx_array</tt>).
*/
VX_KERNEL_NAME = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_KERNEL) + 0x1,
/*! \brief Queries the enum of the kernel. Not settable.
* Read-only. Use a <tt>\ref vx_enum</tt> parameter.
*/
VX_KERNEL_ENUM = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_KERNEL) + 0x2,
/*! \brief The local data area allocated with each kernel when it becomes a
* node. Read-write. Can be written only before user-kernel finalization.
* Use a <tt>\ref vx_size</tt> parameter.
* \note If not set it will default to zero.
*/
VX_KERNEL_LOCAL_DATA_SIZE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_KERNEL) + 0x3,
};
/*! \brief The node attributes list.
* \ingroup group_node
*/
enum vx_node_attribute_e {
/*! \brief Queries the status of node execution. Read-only. Use a <tt>\ref vx_status</tt> parameter. */
VX_NODE_STATUS = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_NODE) + 0x0,
/*! \brief Queries the performance of the node execution.
* The accuracy of timing information is platform dependent and also depends on the graph
* optimizations. Read-only.
* \note Performance tracking must have been enabled. See <tt>\ref vx_directive_e</tt>.
*/
VX_NODE_PERFORMANCE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_NODE) + 0x1,
/*! \brief Gets or sets the border mode of the node.
* Read-write. Use a <tt>\ref vx_border_t</tt> structure with a default value of VX_BORDER_UNDEFINED.
*/
VX_NODE_BORDER = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_NODE) + 0x2,
/*! \brief Indicates the size of the kernel local memory area.
* Read-only. Can be written only at user-node (de)initialization if VX_KERNEL_LOCAL_DATA_SIZE==0.
* Use a <tt>\ref vx_size</tt> parameter.
*/
VX_NODE_LOCAL_DATA_SIZE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_NODE) + 0x3,
/*! \brief Indicates the pointer kernel local memory area.
* Read-Write. Can be written only at user-node (de)initialization if VX_KERNEL_LOCAL_DATA_SIZE==0.
* Use a void * parameter.
*/
VX_NODE_LOCAL_DATA_PTR = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_NODE) + 0x4,
/*! \brief Indicates the number of node parameters, including optional parameters that are not passed.
* Read-only. Use a <tt>\ref vx_uint32</tt> parameter.
*/
VX_NODE_PARAMETERS = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_NODE) + 0x5,
/*! \brief Indicates whether the node is replicated. Read-only.
* Use a <tt>\ref vx_bool</tt> parameter.
*/
VX_NODE_IS_REPLICATED = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_NODE) + 0x6,
/*! \brief Indicates the replicated parameters. Read-only.
* Use a <tt>\ref vx_bool</tt>* parameter.
*/
VX_NODE_REPLICATE_FLAGS = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_NODE) + 0x7,
/*! \brief Indicates the behavior with respect to the valid rectangle. Read-only.
* Use a <tt>\ref vx_bool</tt> parameter.
*/
VX_NODE_VALID_RECT_RESET = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_NODE) + 0x8,
};
/*! \brief The parameter attributes list
* \ingroup group_parameter
*/
enum vx_parameter_attribute_e {
/*! \brief Queries a parameter for its index value on the kernel with which it is associated. Read-only. Use a <tt>\ref vx_uint32</tt> parameter. */
VX_PARAMETER_INDEX = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_PARAMETER) + 0x0,
/*! \brief Queries a parameter for its direction value on the kernel with which it is associated. Read-only. Use a <tt>\ref vx_enum</tt> parameter. */
VX_PARAMETER_DIRECTION = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_PARAMETER) + 0x1,
/*! \brief Queries a parameter for its type, \ref vx_type_e is returned. Read-only. The size of the parameter is implied for plain data objects. For opaque data objects like images and arrays a query to their attributes has to be called to determine the size. */
VX_PARAMETER_TYPE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_PARAMETER) + 0x2,
/*! \brief Queries a parameter for its state. A value in <tt>\ref vx_parameter_state_e</tt> is returned. Read-only. Use a <tt>\ref vx_enum</tt> parameter. */
VX_PARAMETER_STATE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_PARAMETER) + 0x3,
/*! \brief Use to extract the reference contained in the parameter. Read-only. Use a <tt>\ref vx_reference</tt> parameter. */
VX_PARAMETER_REF = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_PARAMETER) + 0x4,
/*! \brief Use to extract the meta format contained in the parameter. Read-only. Use a <tt>\ref vx_meta_format</tt> parameter. */
VX_PARAMETER_META_FORMAT = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_PARAMETER) + 0x5,
};
/*! \brief The image attributes list.
* \ingroup group_image
*/
enum vx_image_attribute_e {
/*! \brief Queries an image for its width. Read-only. Use a <tt>\ref vx_uint32</tt> parameter. */
VX_IMAGE_WIDTH = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_IMAGE) + 0x0,
/*! \brief Queries an image for its height. Read-only. Use a <tt>\ref vx_uint32</tt> parameter. */
VX_IMAGE_HEIGHT = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_IMAGE) + 0x1,
/*! \brief Queries an image for its format. Read-only. Use a <tt>\ref vx_df_image</tt> parameter. */
VX_IMAGE_FORMAT = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_IMAGE) + 0x2,
/*! \brief Queries an image for its number of planes. Read-only. Use a <tt>\ref vx_size</tt> parameter. */
VX_IMAGE_PLANES = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_IMAGE) + 0x3,
/*! \brief Queries an image for its color space (see <tt>\ref vx_color_space_e</tt>). Read-write. Use a <tt>\ref vx_enum</tt> parameter. */
VX_IMAGE_SPACE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_IMAGE) + 0x4,
/*! \brief Queries an image for its channel range (see <tt>\ref vx_channel_range_e</tt>). Read-only. Use a <tt>\ref vx_enum</tt> parameter. */
VX_IMAGE_RANGE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_IMAGE) + 0x5,
/*! \brief Queries memory type if created using vxCreateImageFromHandle. If vx_image was not created using
vxCreateImageFromHandle, VX_MEMORY_TYPE_NONE is returned. Use a <tt>\ref vx_memory_type_e</tt> parameter. */
VX_IMAGE_MEMORY_TYPE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_IMAGE) + 0x7,
/*! \brief Queries if an image is uniform. Read-only. Use a <tt>\ref vx_bool</tt> parameter */
VX_IMAGE_IS_UNIFORM = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_IMAGE) + 0x8,
/*! \brief Queries the image uniform value if any. Read-only. Use a <tt>\ref vx_pixel_value_t</tt> parameter. */
VX_IMAGE_UNIFORM_VALUE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_IMAGE) + 0x9,
};
/*! \brief The scalar attributes list.
* \ingroup group_scalar
*/
enum vx_scalar_attribute_e {
/*! \brief Queries the type of atomic that is contained in the scalar. Read-only. Use a <tt>\ref vx_enum</tt> parameter.*/
VX_SCALAR_TYPE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_SCALAR) + 0x0,
};
/*! \brief A type of operation in which both operands are scalars.
* \see group_scalar
* \ingroup group_scalar
*/
enum vx_scalar_operation_e {
/*! \brief logical and. */
VX_SCALAR_OP_AND = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_SCALAR_OPERATION) + 0x0,
/*! \brief logical or. */
VX_SCALAR_OP_OR = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_SCALAR_OPERATION) + 0x1,
/*! \brief logical exclusive or. */
VX_SCALAR_OP_XOR = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_SCALAR_OPERATION) + 0x2,
/*! \brief logical nand. */
VX_SCALAR_OP_NAND = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_SCALAR_OPERATION) + 0x3,
/*! \brief comparison (equal). */
VX_SCALAR_OP_EQUAL = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_SCALAR_OPERATION) + 0x4,
/*! \brief comparison (not equal). */
VX_SCALAR_OP_NOTEQUAL = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_SCALAR_OPERATION) + 0x5,
/*! \brief comparison (less than). */
VX_SCALAR_OP_LESS = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_SCALAR_OPERATION) + 0x6,
/*! \brief comparison (less than or equal to). */