157 USER_DATA_OBJECT = 41
165 def __lt__(self, other):
166 if self.__class__
is other.__class__:
167 return self.
value < other.value
168 return NotImplemented
170 def __gt__(self, other):
171 if self.__class__
is other.__class__:
172 return self.
value > other.value
173 return NotImplemented
175 def __eq__(self, other):
176 if self.__class__
is other.__class__:
177 return self.
value == other.value
178 return NotImplemented
180 def get_vx_enum_name(type) :
181 if type == Type.NULL :
183 elif type == Type.RAW_IMAGE :
184 return "TIVX_TYPE_" + type.name
186 return "VX_TYPE_" + type.name
188 def get_vx_name(type) :
189 if type == Type.RAW_IMAGE :
190 return "tivx_" + type.name.lower()
192 return "vx_" + type.name.lower()
194 def is_scalar_type(type) :
195 if type > Type.INVALID
and type < Type.REFERENCE :
197 if type == Type.SCALAR :
201 def is_array_type(type) :
202 if type > Type.INVALID
and type < Type.REFERENCE :
204 if type == Type.RECTANGLE :
206 if type == Type.KEYPOINT :
208 if type == Type.COORDINATES2D :
210 if type == Type.COORDINATES3D :
214 def get_obj_desc_name(type):
215 if Type.is_scalar_type(type) :
217 return "tivx_obj_desc_" + type.name.lower() +
"_t" 219 def get_scalar_obj_desc_data_name(type) :
220 if Type.is_scalar_type(type) :
221 if type
is Type.CHAR :
223 if type
is Type.INT8 :
225 if type
is Type.UINT8 :
227 if type
is Type.INT16:
229 if type
is Type.UINT16:
231 if type
is Type.INT32:
233 if type
is Type.UINT32:
235 if type
is Type.INT64:
237 if type
is Type.UINT64:
239 if type
is Type.FLOAT32:
241 if type
is Type.FLOAT64:
243 if type
is Type.ENUM :
245 if type
is Type.SIZE :
247 if type
is Type.DF_IMAGE:
249 if type
is Type.BOOL :
299 def get_vx_enum_name(df_format) :
300 if df_format == DfImage.P12
or df_format == DfImage.NV12_P12 :
301 return "TIVX_DF_IMAGE_" + df_format.name
303 return "VX_DF_IMAGE_" + df_format.name
305 def get_vx_name(df_format) :
306 if df_format == DfImage.P12
or df_format == DfImage.NV12_P12 :
307 return "tivx_df_image_e" 309 return "vx_df_image_e" 311 def get_df_enum_from_string(full_df_name) :
312 index = full_df_name.find(
"VX_DF_IMAGE_")
314 newstr = full_df_name.replace(
"VX_DF_IMAGE_",
"")
315 if newstr
in DfImage.__members__ :
316 return DfImage[newstr]
318 newstr = full_df_name.replace(
"TIVX_DF_IMAGE_",
"")
319 if newstr
in DfImage.__members__ :
320 return DfImage[newstr]
321 return DfImage.INVALID
323 def get_num_planes(df_format) :
324 if df_format == DfImage.NV12
or df_format == DfImage.NV21
or df_format == DfImage.NV12_P12 :
326 if df_format == DfImage.IYUV
or df_format == DfImage.YUV4 :
363 def get_vx_enum_name(type) :
364 if type == Channel.C0 :
365 return "VX_CHANNEL_0" 366 if type == Channel.C1 :
367 return "VX_CHANNEL_1" 368 if type == Channel.C2 :
369 return "VX_CHANNEL_2" 370 if type == Channel.C3 :
371 return "VX_CHANNEL_3" 372 return "VX_CHANNEL_" + type.name
374 def get_vx_name(type) :
375 return "vx_channel_e" 392 def get_vx_enum_name(type) :
393 if type.name ==
"IPU2" :
394 return "TIVX_CPU_ID_IPU2_0" 396 return "TIVX_CPU_ID_" + type.name
466 def get_vx_enum_name(type) :
467 return "TIVX_TARGET_" + type.name
469 def get_target_folder_name(type) :
470 if target == Target.DSP1 :
472 if target == Target.DSP2 :
474 if target == Target.EVE1 :
476 if target == Target.EVE2 :
478 if target == Target.EVE3 :
480 if target == Target.EVE4 :
482 if target == Target.A15_0 :
484 if target == Target.IPU1_0 :
486 if target == Target.IPU1_1 :
488 if target == Target.IPU2 :
490 if target == Target.VPAC_NF :
492 if target == Target.VPAC_LDC1 :
494 if target == Target.VPAC_LDC2 :
496 if target == Target.VPAC_MSC1 :
498 if target == Target.VPAC_MSC2 :
500 if target == Target.DMPAC_SDE :
502 if target == Target.DMPAC_DOF :
504 if target == Target.VPAC_VISS1 :
506 if target == Target.VDEC1 :
508 if target == Target.VDEC2 :
510 if target == Target.VENC1 :
512 if target == Target.VENC2 :
514 if target == Target.DSP_C7_1 :
516 if target == Target.A72_0 :
520 def is_j6_target(target) :
521 if target == Target.DSP1 :
523 if target == Target.DSP2 :
525 if target == Target.EVE1 :
527 if target == Target.EVE2 :
529 if target == Target.EVE3 :
531 if target == Target.EVE4 :
533 if target == Target.A15_0 :
535 if target == Target.IPU1_0 :
537 if target == Target.IPU1_1 :
539 if target == Target.IPU2 :
544 def get_cpu(target) :
545 if target == Target.DSP1 :
547 if target == Target.DSP2 :
549 if target == Target.EVE1 :
551 if target == Target.EVE2 :
553 if target == Target.EVE3 :
555 if target == Target.EVE4 :
557 if target == Target.A15_0 :
559 if target == Target.IPU1_0 :
561 if target == Target.IPU1_1 :
563 if target == Target.IPU2 :
565 if target == Target.VPAC_NF :
567 if target == Target.VPAC_LDC1 :
569 if target == Target.VPAC_LDC2 :
571 if target == Target.VPAC_MSC1 :
573 if target == Target.VPAC_MSC2 :
575 if target == Target.DMPAC_SDE :
577 if target == Target.DMPAC_DOF :
579 if target == Target.VPAC_VISS1 :
581 if target == Target.VDEC1 :
583 if target == Target.VDEC2 :
585 if target == Target.VENC1 :
587 if target == Target.VENC2 :
589 if target == Target.DSP_C7_1 :
591 if target == Target.A72_0 :
610 def get_vx_enum_name(type) :
611 return "VX_CONVERT_POLICY_" + type.name
613 def get_vx_name(type) :
614 return "vx_convert_policy_e" 631 def get_vx_enum_name(type) :
632 return "VX_ROUND_POLICY_" + type.name
634 def get_vx_name(type) :
635 return "vx_round_policy_e" 654 def get_vx_enum_name(type) :
655 return "VX_NONLINEAR_FILTER_" + type.name
657 def get_vx_name(type) :
658 return "vx_non_linear_filter_e" 679 def get_vx_enum_name(type) :
680 return "VX_PATTERN_" + type.name
682 def get_vx_name(type) :
683 return "vx_pattern_e" 702 def get_vx_enum_name(type) :
703 return "VX_INTERPOLATION_" + type.name
705 def get_vx_name(type) :
706 return "vx_interpolation_type_e" 723 def get_vx_enum_name(type) :
724 return "vx_" + type.name.lower() +
"_e" 726 def get_vx_name(type) :
744 def get_vx_enum_name(type) :
745 return "VX_NORM_" + type.name
747 def get_vx_name(type) :
767 def get_vx_enum_name(type) :
768 return "VX_" + type.name
770 def get_vx_name(type) :
771 return "vx_direction_e" 773 def get_access_type(type) :
774 if type == Direction.INPUT:
775 return "VX_READ_ONLY" 776 if type == Direction.OUTPUT:
777 return "VX_WRITE_ONLY" 778 if type == Direction.BIDIRECTIONAL:
779 return "VX_READ_WRITE" 782 def get_doxygen_name(type) :
783 if type == Direction.INPUT:
785 if type == Direction.OUTPUT:
787 if type == Direction.BIDIRECTIONAL:
807 def get_vx_enum_name(type) :
808 return "VX_PARAMETER_STATE_" + type.name
810 def get_vx_name(type) :
811 return "vx_parameter_state_e" 828 def get_vx_enum_name(type) :
829 return "VX_SCALE_PYRAMID_" + type.name
846 def get_vx_enum_name(type) :
847 return "VX_THRESHOLD_TYPE_" + type.name
849 def get_vx_name(type) :
850 return "vx_threshold_type_e" 870 def get_vx_enum_name(type) :
871 return "VX_TERM_CRITERIA_" + type.name
873 def get_vx_name(type) :
874 return "vx_termination_criteria_e" Image channel (OpenVX equivalent = vx_channel_e)
Parameter state (OpenVX equivalent = vx_parameter_state_e)
Interpolation type (OpenVX equivalent = vx_interpolation_type_e)
Target on which to execute a node (TIOVX equivalent = TIVX_TARGET_xxxx)
Image data format (OpenVX equivalent = vx_df_image_e)
Termination Criteria (OpenVX equivalent = vx_termination_criteria_e)
Threshold Type (OpenVX equivalent = vx_threshold_type_e)
Boolean type (OpenVX equivalent = vx_bool)
Pyramid Scale (OpenVX equivalent = VX_SCALE_PYRAMID_xxx)
Normalization type (OpenVX equivalent = vx_norm_type_e)
Non linear filter type (OpenVX equivalent = vx_non_linear_filter_e)
Object/Data type (OpenVX equivalent = vx_type_e)
Conversion Policy (OpenVX equivalent = vx_convert_policy_e)
Parameter direction (OpenVX equivalent = vx_direction_e)
Round Policy (OpenVX equivalent = vx_round_policy_e)
Matrix Patterns (OpenVX equivalent = vx_pattern_e)