forked from rgiduthuri/openvx_tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvx_types.h
More file actions
1449 lines (1321 loc) · 69.4 KB
/
vx_types.h
File metadata and controls
1449 lines (1321 loc) · 69.4 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-2015 The Khronos Group Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and/or associated documentation files (the
* "Materials"), to deal in the Materials without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Materials, and to
* permit persons to whom the Materials are furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Materials.
*
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
*/
#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>
#include <string.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
*/
#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;
#if defined(EXPERIMENTAL_PLATFORM_SUPPORTS_16_FLOAT)
/*! \brief A 16-bit float value.
* \ingroup group_basic_features
*/
typedef hfloat vx_float16;
#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 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 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.
* \ingroup group_basic_features
*/
typedef enum _vx_bool_e {
/*! \brief The "false" value. */
vx_false_e = 0,
/*! \brief The "true" value. */
vx_true_e,
} vx_bool;
/*!
* \brief This object is used by output validation functions to specify the meta data
* of the expected output data object. If the output object is an image,
* the vx_meta_format object can additionally store the valid region delta rectangle.
* \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>. */
#if defined(EXPERIMENTAL_PLATFORM_SUPPORTS_16_FLOAT)
VX_TYPE_FLOAT16 = 0x00F,/*!< \brief A <tt>\ref vx_float16</tt>. */
#endif
VX_TYPE_BOOL = 0x010,/*!< \brief A <tt>\ref vx_bool</tt>. */
/* add new scalar types here */
VX_TYPE_SCALAR_MAX, /*!< \brief A floating value for comparison between OpenVX scalars and OpenVX structs. */
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_USER_STRUCT_START = 0x100,
/*!< \brief A floating value for user-defined struct base index.*/
VX_TYPE_STRUCT_MAX = VX_TYPE_USER_STRUCT_START - 1,
/*!< \brief A floating value for comparison between OpenVX
structs and user structs. */
VX_TYPE_VENDOR_STRUCT_START = 0x400,
/*!< \brief A floating value for vendor-defined struct base index.*/
VX_TYPE_USER_STRUCT_END = VX_TYPE_VENDOR_STRUCT_START - 1,
/*!< \brief A floating value for comparison between user structs and
vendor structs. */
VX_TYPE_VENDOR_STRUCT_END = 0x7FF,
/*!< \brief A floating value for comparison between vendor
structs and OpenVX 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>. */
/* \todo add new object types here */
VX_TYPE_VENDOR_OBJECT_START = 0xC00,/*!< \brief A floating value for vendor defined object base index. */
VX_TYPE_OBJECT_MAX = VX_TYPE_VENDOR_OBJECT_START - 1,/*!< \brief A value used for bound checking the OpenVX object types. */
VX_TYPE_VENDOR_OBJECT_END = 0xFFF,/*!< \brief A value used for bound checking of vendor objects */
};
/*! \brief The enumeration of all status codes.
* \see vx_status.
* \ingroup group_basic_features
*/
enum vx_status_e {
VX_STATUS_MIN = -25,/*!< \brief Indicates the lower bound of status codes in VX. Used for bounds checks only. */
/* add new codes here */
VX_ERROR_REFERENCE_NONZERO = -24,/*!< \brief Indicates that an operation did not complete due to a reference count being non-zero. */
VX_ERROR_MULTIPLE_WRITERS = -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 = -22,/*!< \brief Indicates that the graph is stopped due to an error or a callback that abandoned execution. */
VX_ERROR_GRAPH_SCHEDULED = -21,/*!< \brief Indicates that the supplied graph already has been scheduled and may be currently executing. */
VX_ERROR_INVALID_SCOPE = -20,/*!< \brief Indicates that the supplied parameter is from another scope and cannot be used in the current scope. */
VX_ERROR_INVALID_NODE = -19,/*!< \brief Indicates that the supplied node could not be created.*/
VX_ERROR_INVALID_GRAPH = -18,/*!< \brief Indicates that the supplied graph has invalid connections (cycles). */
VX_ERROR_INVALID_TYPE = -17,/*!< \brief Indicates that the supplied type parameter is incorrect. */
VX_ERROR_INVALID_VALUE = -16,/*!< \brief Indicates that the supplied parameter has an incorrect value. */
VX_ERROR_INVALID_DIMENSION = -15,/*!< \brief Indicates that the supplied parameter is too big or too small in dimension. */
VX_ERROR_INVALID_FORMAT = -14,/*!< \brief Indicates that the supplied parameter is in an invalid format. */
VX_ERROR_INVALID_LINK = -13,/*!< \brief Indicates that the link is not possible as specified. The parameters are incompatible. */
VX_ERROR_INVALID_REFERENCE = -12,/*!< \brief Indicates that the reference provided is not valid. */
VX_ERROR_INVALID_MODULE = -11,/*!< \brief This is returned from <tt>\ref vxLoadKernels</tt> when the module does not contain the entry point. */
VX_ERROR_INVALID_PARAMETERS = -10,/*!< \brief Indicates that the supplied parameter information does not match the kernel contract. */
VX_ERROR_OPTIMIZED_AWAY = -9,/*!< \brief Indicates that the object refered to has been optimized out of existence. */
VX_ERROR_NO_MEMORY = -8,/*!< \brief Indicates that an internal or implicit allocation failed. Typically catastrophic. After detection, deconstruct the context. \see vxVerifyGraph. */
VX_ERROR_NO_RESOURCES = -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 = -6,/*!< \brief Indicates that the attempt to link two parameters together failed due to type incompatibilty. */
VX_ERROR_NOT_ALLOCATED = -5,/*!< \brief Indicates to the system that the parameter must be allocated by the system. */
VX_ERROR_NOT_SUFFICIENT = -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 = -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. */
VX_ERROR_NOT_IMPLEMENTED = -2,/*!< \brief Indicates that the requested kernel is missing. \see vx_kernel_e vxGetKernelByName. */
VX_FAILURE = -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 (0xFFF00000)
/*! \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 (0x000FFF00)
/*! \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 (0x000FF000)
/*! \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 (0x00000FFF)
/*! \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 (0x000000FF)
/*! \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 (0x000FF000)
/*! \brief A generic enumeration list can have values between \f$ [0,2^{12}-1] \f$ (inclusive).
* \ingroup group_basic_features
*/
#define VX_ENUM_MASK (0x00000FFF)
/*! \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)
#if defined(_LITTLE_ENDIAN_) || (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) || defined(_WIN32)
#define VX_DF_IMAGE(a,b,c,d) ((a) | (b << 8) | (c << 16) | (d << 24))
#define VX_ATTRIBUTE_BASE(vendor, object) (((vendor) << 20) | (object << 8))
#define VX_KERNEL_BASE(vendor, lib) (((vendor) << 20) | (lib << 12))
#define VX_ENUM_BASE(vendor, id) (((vendor) << 20) | (id << 12))
#elif defined(_BIG_ENDIAN_) || (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
#define VX_DF_IMAGE(a,b,c,d) ((d) | (c << 8) | (b << 16) | (a << 24))
#define VX_ATTRIBUTE_BASE(vendor, object) ((vendor) | (object << 12))
#define VX_KERNEL_BASE(vendor, lib) ((vendor) | (lib << 12))
#define VX_ENUM_BASE(vendor, id) ((vendor) | (id << 12))
#else
#error "Endian-ness must be defined!"
#endif
/*! \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
*/
/*! \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
*/
/*! \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
*/
/*! \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
*/
/*! \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_MODE = 0x0C, /*!< \brief Border Mode List. */
VX_ENUM_COMPARISON = 0x0D, /*!< \brief Comparison Values. */
VX_ENUM_IMPORT_MEM = 0x0E, /*!< \brief The memory import 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. */
};
/*! \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 The parameter is both an input and output. */
VX_BIDIRECTIONAL = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_DIRECTION) + 0x2,
};
/*! \brief These enumerations are given to the \c vxHint API to enable/disable platform
* optimizations and/or features. Hints are optional and usually are vendor-specific.
* \see <tt>vxHint</tt>
* \ingroup group_hint
*/
enum vx_hint_e {
/*! \brief Indicates to the implementation that the user wants to disable
* any parallelization techniques. Implementations may not be parallelized,
* so this is a hint only.
*/
VX_HINT_SERIALIZE = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_HINT) + 0x0,
};
/*! \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 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-lane 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 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 reference attributes list.
* \ingroup group_reference
*/
enum vx_reference_attribute_e {
/*! \brief Returns the reference count of the object. Use a <tt>\ref vx_uint32</tt> parameter. */
VX_REF_ATTRIBUTE_COUNT = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_REFERENCE) + 0x0,
/*! \brief Returns the <tt>\ref vx_type_e</tt> of the reference. Use a <tt>\ref vx_enum</tt> parameter. */
VX_REF_ATTRIBUTE_TYPE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_REFERENCE) + 0x1,
};
/*! \brief A list of context attributes.
* \ingroup group_context
*/
enum vx_context_attribute_e {
/*! \brief Queries the unique vendor ID. Use a <tt>\ref vx_uint16</tt>. */
VX_CONTEXT_ATTRIBUTE_VENDOR_ID = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_CONTEXT) + 0x0,
/*! \brief Queries the OpenVX Version Number. Use a <tt>\ref vx_uint16</tt> */
VX_CONTEXT_ATTRIBUTE_VERSION = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_CONTEXT) + 0x1,
/*! \brief Queries the context for the number of \e unique kernels. Use a <tt>\ref vx_uint32</tt> parameter. */
VX_CONTEXT_ATTRIBUTE_UNIQUE_KERNELS = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_CONTEXT) + 0x2,
/*! \brief Queries the context for the number of active modules. Use a <tt>\ref vx_uint32</tt> parameter. */
VX_CONTEXT_ATTRIBUTE_MODULES = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_CONTEXT) + 0x3,
/*! \brief Queries the context for the number of active references. Use a <tt>\ref vx_uint32</tt> parameter. */
VX_CONTEXT_ATTRIBUTE_REFERENCES = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_CONTEXT) + 0x4,
/*! \brief Queries the context for it's implementation name. Use a <tt>\ref vx_char</tt>[<tt>\ref VX_MAX_IMPLEMENTATION_NAME</tt>] array */
VX_CONTEXT_ATTRIBUTE_IMPLEMENTATION = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_CONTEXT) + 0x5,
/*! \brief Queries the number of bytes in the extensions string. Use a <tt>\ref vx_size</tt> parameter. */
VX_CONTEXT_ATTRIBUTE_EXTENSIONS_SIZE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_CONTEXT) + 0x6,
/*! \brief Retrieves the extensions string. This is a space-separated string of extension names. Use a <tt>\ref vx_char</tt> pointer allocated to the size returned from <tt>\ref VX_CONTEXT_ATTRIBUTE_EXTENSIONS_SIZE</tt>. */
VX_CONTEXT_ATTRIBUTE_EXTENSIONS = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_CONTEXT) + 0x7,
/*! \brief The maximum width or height of a convolution matrix.
* 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_ATTRIBUTE_CONVOLUTION_MAXIMUM_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_ATTRIBUTE_CONVOLUTION_MAXIMUM_DIMENSION = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_CONTEXT) + 0x8,
/*! \brief The maximum window dimension of the OpticalFlowPyrLK kernel.
* \see <tt>\ref VX_KERNEL_OPTICAL_FLOW_PYR_LK</tt>. Use a <tt>\ref vx_size</tt> parameter.
*/
VX_CONTEXT_ATTRIBUTE_OPTICAL_FLOW_WINDOW_MAXIMUM_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. Use a pointer to a <tt>\ref vx_border_mode_t</tt> structure as parameter.
* \note The assumed default value for immediate mode functions is <tt>\ref VX_BORDER_MODE_UNDEFINED</tt>.
*/
VX_CONTEXT_ATTRIBUTE_IMMEDIATE_BORDER_MODE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_CONTEXT) + 0xA,
/*! \brief Returns the table of all unique the kernels that exist in the context.
* Use a <tt>\ref vx_kernel_info_t</tt> array.
* \pre You must call <tt>\ref vxQueryContext</tt> with <tt>\ref VX_CONTEXT_ATTRIBUTE_UNIQUE_KERNELS</tt>
* to compute the necessary size of the array.
*/
VX_CONTEXT_ATTRIBUTE_UNIQUE_KERNEL_TABLE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_CONTEXT) + 0xB,
};
/*! \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. Use a <tt>\ref vx_uint32</tt> parameter.
*/
VX_KERNEL_ATTRIBUTE_PARAMETERS = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_KERNEL) + 0x0,
/*! \brief Queries the name of the kernel. Not settable.
* Use a <tt>\ref vx_char</tt>[<tt>\ref VX_MAX_KERNEL_NAME</tt>] array (not a <tt>\ref vx_array</tt>).
*/
VX_KERNEL_ATTRIBUTE_NAME = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_KERNEL) + 0x1,
/*! \brief Queries the enum of the kernel. Not settable.
* Use a <tt>\ref vx_enum</tt> parameter.
*/
VX_KERNEL_ATTRIBUTE_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. Use a <tt>\ref vx_size</tt> parameter.
* \note If not set it will default to zero.
*/
VX_KERNEL_ATTRIBUTE_LOCAL_DATA_SIZE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_KERNEL) + 0x3,
/*! \brief The local data pointer allocated with each kernel when it becomes
* a node. Use a void pointer parameter.
* Use a <tt>\ref vx_size</tt> parameter.
*/
VX_KERNEL_ATTRIBUTE_LOCAL_DATA_PTR = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_KERNEL) + 0x4,
};
/*! \brief The node attributes list.
* \ingroup group_node
*/
enum vx_node_attribute_e {
/*! \brief Queries the status of node execution. Use a <tt>\ref vx_status</tt> parameter. */
VX_NODE_ATTRIBUTE_STATUS = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_NODE) + 0x0,
/*! \brief Queries the performance of the node execution. Use a <tt>\ref vx_perf_t</tt> parameter. */
VX_NODE_ATTRIBUTE_PERFORMANCE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_NODE) + 0x1,
/*! \brief Gets or sets the border mode of the node.
* Use a <tt>\ref vx_border_mode_t</tt> structure.
*/
VX_NODE_ATTRIBUTE_BORDER_MODE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_NODE) + 0x2,
/*! \brief Indicates the size of the kernel local memory area.
* Use a <tt>\ref vx_size</tt> parameter.
*/
VX_NODE_ATTRIBUTE_LOCAL_DATA_SIZE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_NODE) + 0x3,
/*! \brief Indicates the pointer kernel local memory area.
* Use a void * parameter.
*/
VX_NODE_ATTRIBUTE_LOCAL_DATA_PTR = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_NODE) + 0x4,
};
/*! \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. Use a <tt>\ref vx_uint32</tt> parameter. */
VX_PARAMETER_ATTRIBUTE_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. Use a <tt>\ref vx_enum</tt> parameter. */
VX_PARAMETER_ATTRIBUTE_DIRECTION = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_PARAMETER) + 0x1,
/*! \brief Queries a parameter for its type, \ref vx_type_e is returned. 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_ATTRIBUTE_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. Use a <tt>\ref vx_enum</tt> parameter. */
VX_PARAMETER_ATTRIBUTE_STATE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_PARAMETER) + 0x3,
/*! \brief Use to extract the reference contained in the parameter. Use a <tt>\ref vx_reference</tt> parameter. */
VX_PARAMETER_ATTRIBUTE_REF = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_PARAMETER) + 0x4,
};
/*! \brief The image attributes list.
* \ingroup group_image
*/
enum vx_image_attribute_e {
/*! \brief Queries an image for its height. Use a <tt>\ref vx_uint32</tt> parameter. */
VX_IMAGE_ATTRIBUTE_WIDTH = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_IMAGE) + 0x0,
/*! \brief Queries an image for its width. Use a <tt>\ref vx_uint32</tt> parameter. */
VX_IMAGE_ATTRIBUTE_HEIGHT = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_IMAGE) + 0x1,
/*! \brief Queries an image for its format. Use a <tt>\ref vx_df_image</tt> parameter. */
VX_IMAGE_ATTRIBUTE_FORMAT = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_IMAGE) + 0x2,
/*! \brief Queries an image for its number of planes. Use a <tt>\ref vx_size</tt> parameter. */
VX_IMAGE_ATTRIBUTE_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>). Use a <tt>\ref vx_enum</tt> parameter. */
VX_IMAGE_ATTRIBUTE_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>). Use a <tt>\ref vx_enum</tt> parameter. */
VX_IMAGE_ATTRIBUTE_RANGE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_IMAGE) + 0x5,
/*! \brief Queries an image for its total number of bytes. Use a <tt>\ref vx_size</tt> parameter. */
VX_IMAGE_ATTRIBUTE_SIZE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_IMAGE) + 0x6,
};
/*! \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. Use a <tt>\ref vx_enum</tt> parameter.*/
VX_SCALAR_ATTRIBUTE_TYPE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_SCALAR) + 0x0,
};
/*! \brief The graph attributes list.
* \ingroup group_graph
*/
enum vx_graph_attribute_e {
/*! \brief Returns the number of nodes in a graph. Use a <tt>\ref vx_uint32</tt> parameter.*/
VX_GRAPH_ATTRIBUTE_NUMNODES = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_GRAPH) + 0x0,
/*! \brief Returns the overall status of the graph. Use a <tt>\ref vx_status</tt> parameter.*/
VX_GRAPH_ATTRIBUTE_STATUS = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_GRAPH) + 0x1,
/*! \brief Returns the overall performance of the graph. Use a <tt>\ref vx_perf_t</tt> parameter. */
VX_GRAPH_ATTRIBUTE_PERFORMANCE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_GRAPH) + 0x2,
/*! \brief Returns the number of explicitly declared parameters on the graph. Use a <tt>\ref vx_uint32</tt> parameter. */
VX_GRAPH_ATTRIBUTE_NUMPARAMETERS = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_GRAPH) + 0x3,
};
/*! \brief The Look-Up Table (LUT) attribute list.
* \ingroup group_lut
*/
enum vx_lut_attribute_e {
/*! \brief Indicates the value type of the LUT. Use a <tt>\ref vx_enum</tt>. */
VX_LUT_ATTRIBUTE_TYPE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS,VX_TYPE_LUT) + 0x0,
/*! \brief Indicates the number of elements in the LUT. Use a <tt>\ref vx_size</tt>. */
VX_LUT_ATTRIBUTE_COUNT = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS,VX_TYPE_LUT) + 0x1,
/*! \brief Indicates the total size of the LUT in bytes. Uses a <tt>\ref vx_size</tt>. */
VX_LUT_ATTRIBUTE_SIZE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS,VX_TYPE_LUT) + 0x2,
};
/*! \brief The distribution attribute list.
* \ingroup group_distribution
*/
enum vx_distribution_attribute_e {
/*! \brief Indicates the number of dimensions in the distribution. Use a <tt>\ref vx_size</tt> parameter. */
VX_DISTRIBUTION_ATTRIBUTE_DIMENSIONS = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_DISTRIBUTION) + 0x0,
/*! \brief Indicates the start of the values to use (inclusive). Use a <tt>\ref vx_int32</tt> parameter. */
VX_DISTRIBUTION_ATTRIBUTE_OFFSET = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_DISTRIBUTION) + 0x1,
/*! \brief Indicates end value to use as the range. Use a <tt>\ref vx_uint32</tt> parameter. */
VX_DISTRIBUTION_ATTRIBUTE_RANGE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_DISTRIBUTION) + 0x2,
/*! \brief Indicates the number of bins. Use a <tt>\ref vx_size</tt> parameter. */
VX_DISTRIBUTION_ATTRIBUTE_BINS = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_DISTRIBUTION) + 0x3,
/*! \brief Indicates the range of a bin. Use a <tt>\ref vx_uint32</tt> parameter. */
VX_DISTRIBUTION_ATTRIBUTE_WINDOW = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_DISTRIBUTION) + 0x4,
/*! \brief Indicates the total size of the distribution in bytes. Use a <tt>\ref vx_size</tt> parameter. */
VX_DISTRIBUTION_ATTRIBUTE_SIZE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_DISTRIBUTION) + 0x5,
};
/*! \brief The Threshold types.
* \ingroup group_threshold
*/
enum vx_threshold_type_e {
/*! \brief A threshold with only 1 value. */
VX_THRESHOLD_TYPE_BINARY = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_THRESHOLD_TYPE) + 0x0,
/*! \brief A threshold with 2 values (upper/lower). Use with Canny Edge Detection. */
VX_THRESHOLD_TYPE_RANGE = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_THRESHOLD_TYPE) + 0x1,
};
/*! \brief The threshold attributes.
* \ingroup group_threshold
*/
enum vx_threshold_attribute_e {
/*! \brief The value type of the threshold. Use a <tt>\ref vx_enum</tt> parameter. Will contain a <tt>\ref vx_threshold_type_e</tt>. */
VX_THRESHOLD_ATTRIBUTE_TYPE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_THRESHOLD) + 0x0,
/*! \brief The value of the single threshold. Use a <tt>\ref vx_int32</tt> parameter. */
VX_THRESHOLD_ATTRIBUTE_THRESHOLD_VALUE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_THRESHOLD) + 0x1,
/*! \brief The value of the lower threshold. Use a <tt>\ref vx_int32</tt> parameter. */
VX_THRESHOLD_ATTRIBUTE_THRESHOLD_LOWER = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_THRESHOLD) + 0x2,
/*! \brief The value of the higher threshold. Use a <tt>\ref vx_int32</tt> parameter. */
VX_THRESHOLD_ATTRIBUTE_THRESHOLD_UPPER = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_THRESHOLD) + 0x3,
/*! \brief The value of the TRUE threshold. Use a <tt>\ref vx_int32</tt> parameter. */
VX_THRESHOLD_ATTRIBUTE_TRUE_VALUE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_THRESHOLD) + 0x4,
/*! \brief The value of the FALSE threshold. Use a <tt>\ref vx_int32</tt> parameter. */
VX_THRESHOLD_ATTRIBUTE_FALSE_VALUE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_THRESHOLD) + 0x5,
/*! \brief The data type of the threshold's value. Use a <tt>\ref vx_enum</tt> parameter. Will contain a <tt>\ref vx_type_e</tt>.*/
VX_THRESHOLD_ATTRIBUTE_DATA_TYPE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_THRESHOLD) + 0x6,
};
/*! \brief The matrix attributes.
* \ingroup group_matrix
*/
enum vx_matrix_attribute_e {
/*! \brief The value type of the matrix. Use a <tt>\ref vx_enum</tt> parameter. */
VX_MATRIX_ATTRIBUTE_TYPE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_MATRIX) + 0x0,
/*! \brief The M dimension of the matrix. Use a <tt>\ref vx_size</tt> parameter. */
VX_MATRIX_ATTRIBUTE_ROWS = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_MATRIX) + 0x1,
/*! \brief The N dimension of the matrix. Use a <tt>\ref vx_size</tt> parameter. */
VX_MATRIX_ATTRIBUTE_COLUMNS = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_MATRIX) + 0x2,
/*! \brief The total size of the matrix in bytes. Use a <tt>\ref vx_size</tt> parameter. */
VX_MATRIX_ATTRIBUTE_SIZE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_MATRIX) + 0x3,
};
/*! \brief The convolution attributes.
* \ingroup group_convolution
*/
enum vx_convolution_attribute_e {
/*! \brief The number of rows of the convolution matrix. Use a <tt>\ref vx_size</tt> parameter. */
VX_CONVOLUTION_ATTRIBUTE_ROWS = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_CONVOLUTION) + 0x0,
/*! \brief The number of columns of the convolution matrix. Use a <tt>\ref vx_size</tt> parameter. */
VX_CONVOLUTION_ATTRIBUTE_COLUMNS = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_CONVOLUTION) + 0x1,
/*! \brief The scale of the convolution matrix. Use a <tt>\ref vx_uint32</tt> parameter.
* \if OPENVX_STRICT_1_0
* \note For 1.0, only powers of 2 are supported up to 2^31.
* \endif
*/
VX_CONVOLUTION_ATTRIBUTE_SCALE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_CONVOLUTION) + 0x2,
/*! \brief The total size of the convolution matrix in bytes. Use a <tt>\ref vx_size</tt> parameter. */
VX_CONVOLUTION_ATTRIBUTE_SIZE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_CONVOLUTION) + 0x3,
};
/*! \brief The pyramid object attributes.
* \ingroup group_pyramid
*/
enum vx_pyramid_attribute_e {
/*! \brief The number of levels of the pyramid. Use a <tt>\ref vx_size</tt> parameter. */
VX_PYRAMID_ATTRIBUTE_LEVELS = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_PYRAMID) + 0x0,
/*! \brief The scale factor between each level of the pyramid. Use a <tt>\ref vx_float32</tt> parameter. */
VX_PYRAMID_ATTRIBUTE_SCALE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_PYRAMID) + 0x1,
/*! \brief The width of the 0th image in pixels. Use a <tt>\ref vx_uint32</tt> parameter. */
VX_PYRAMID_ATTRIBUTE_WIDTH = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_PYRAMID) + 0x2,
/*! \brief The height of the 0th image in pixels. Use a <tt>\ref vx_uint32</tt> parameter. */
VX_PYRAMID_ATTRIBUTE_HEIGHT = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_PYRAMID) + 0x3,
/*! \brief The <tt>\ref vx_df_image_e</tt> format of the image. Use a <tt>\ref vx_df_image</tt> parameter. */
VX_PYRAMID_ATTRIBUTE_FORMAT = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_PYRAMID) + 0x4,
};
/*! \brief The remap object attributes.
* \ingroup group_remap
*/
enum vx_remap_attribute_e {
/*! \brief The source width. Use a <tt>\ref vx_uint32</tt> parameter. */
VX_REMAP_ATTRIBUTE_SOURCE_WIDTH = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_REMAP) + 0x0,
/*! \brief The source height. Use a <tt>\ref vx_uint32</tt> parameter. */
VX_REMAP_ATTRIBUTE_SOURCE_HEIGHT = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_REMAP) + 0x1,
/*! \brief The destination width. Use a <tt>\ref vx_uint32</tt> parameter. */
VX_REMAP_ATTRIBUTE_DESTINATION_WIDTH = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_REMAP) + 0x2,
/*! \brief The destination height. Use a <tt>\ref vx_uint32</tt> parameter. */
VX_REMAP_ATTRIBUTE_DESTINATION_HEIGHT = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_REMAP) + 0x3,
};
/*! \brief The array object attributes.
* \ingroup group_array
*/
enum vx_array_attribute_e {
/*! \brief The type of the Array items. Use a <tt>\ref vx_enum</tt> parameter. */
VX_ARRAY_ATTRIBUTE_ITEMTYPE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_ARRAY) + 0x0,
/*! \brief The number of items in the Array. Use a <tt>\ref vx_size</tt> parameter. */
VX_ARRAY_ATTRIBUTE_NUMITEMS = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_ARRAY) + 0x1,
/*! \brief The maximal number of items that the Array can hold. Use a <tt>\ref vx_size</tt> parameter. */
VX_ARRAY_ATTRIBUTE_CAPACITY = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_ARRAY) + 0x2,
/*! \brief Queries an array item size. Use a <tt>\ref vx_size</tt> parameter. */
VX_ARRAY_ATTRIBUTE_ITEMSIZE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_ARRAY) + 0x3,
};
/*! \brief The meta format object attributes.
* \ingroup group_user_kernels
*/
enum vx_meta_format_attribute_e {
/*! \brief Configures a delta rectangle during kernel output parameter validation. Use a <tt>\ref vx_delta_rectangle_t</tt>. */
VX_META_FORMAT_ATTRIBUTE_DELTA_RECTANGLE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_META_FORMAT) + 0x0,
};
/*! \brief The channel enumerations for channel extractions.
* \see vxChannelExtractNode
* \see vxuChannelExtract
* \see VX_KERNEL_CHANNEL_EXTRACT
* \ingroup group_basic_features
*/
enum vx_channel_e {
/*! \brief Used by formats with unknown channel types. */
VX_CHANNEL_0 = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_CHANNEL) + 0x0,
/*! \brief Used by formats with unknown channel types. */
VX_CHANNEL_1 = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_CHANNEL) + 0x1,
/*! \brief Used by formats with unknown channel types. */
VX_CHANNEL_2 = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_CHANNEL) + 0x2,
/*! \brief Used by formats with unknown channel types. */
VX_CHANNEL_3 = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_CHANNEL) + 0x3,
/*! \brief Use to extract the RED channel, no matter the byte or packing order. */
VX_CHANNEL_R = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_CHANNEL) + 0x10,