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 :
303 def get_vx_enum_name(df_format) :
304 if df_format == DfImage.P12
or df_format == DfImage.NV12_P12
or df_format == DfImage.RGB565
or df_format == DfImage.BGRX :
305 return "TIVX_DF_IMAGE_" + df_format.name
307 return "VX_DF_IMAGE_" + df_format.name
309 def get_vx_name(df_format) :
310 if df_format == DfImage.P12
or df_format == DfImage.NV12_P12
or df_format == DfImage.RGB565
or df_format == DfImage.BGRX :
311 return "tivx_df_image_e" 313 return "vx_df_image_e" 315 def get_df_enum_from_string(full_df_name) :
316 index = full_df_name.find(
"VX_DF_IMAGE_")
318 newstr = full_df_name.replace(
"VX_DF_IMAGE_",
"")
319 if newstr
in DfImage.__members__ :
320 return DfImage[newstr]
322 newstr = full_df_name.replace(
"TIVX_DF_IMAGE_",
"")
323 if newstr
in DfImage.__members__ :
324 return DfImage[newstr]
325 return DfImage.INVALID
327 def get_num_planes(df_format) :
328 if df_format == DfImage.NV12
or df_format == DfImage.NV21
or df_format == DfImage.NV12_P12 :
330 if df_format == DfImage.IYUV
or df_format == DfImage.YUV4 :
367 def get_vx_enum_name(type) :
368 if type == Channel.C0 :
369 return "VX_CHANNEL_0" 370 if type == Channel.C1 :
371 return "VX_CHANNEL_1" 372 if type == Channel.C2 :
373 return "VX_CHANNEL_2" 374 if type == Channel.C3 :
375 return "VX_CHANNEL_3" 376 return "VX_CHANNEL_" + type.name
378 def get_vx_name(type) :
379 return "vx_channel_e" 396 def get_vx_enum_name(type) :
397 if type.name ==
"IPU2" :
398 return "TIVX_CPU_ID_IPU2_0" 400 return "TIVX_CPU_ID_" + type.name
470 def get_vx_enum_name(type) :
471 return "TIVX_TARGET_" + type.name
473 def get_target_folder_name(type) :
474 if target == Target.DSP1 :
476 if target == Target.DSP2 :
478 if target == Target.EVE1 :
480 if target == Target.EVE2 :
482 if target == Target.EVE3 :
484 if target == Target.EVE4 :
486 if target == Target.A15_0 :
488 if target == Target.IPU1_0 :
490 if target == Target.IPU1_1 :
492 if target == Target.IPU2 :
494 if target == Target.VPAC_NF :
496 if target == Target.VPAC_LDC1 :
498 if target == Target.VPAC_LDC2 :
500 if target == Target.VPAC_MSC1 :
502 if target == Target.VPAC_MSC2 :
504 if target == Target.DMPAC_SDE :
506 if target == Target.DMPAC_DOF :
508 if target == Target.VPAC_VISS1 :
510 if target == Target.VDEC1 :
512 if target == Target.VDEC2 :
514 if target == Target.VENC1 :
516 if target == Target.VENC2 :
518 if target == Target.DSP_C7_1 :
520 if target == Target.A72_0 :
524 def is_j6_target(target) :
525 if target == Target.DSP1 :
527 if target == Target.DSP2 :
529 if target == Target.EVE1 :
531 if target == Target.EVE2 :
533 if target == Target.EVE3 :
535 if target == Target.EVE4 :
537 if target == Target.A15_0 :
539 if target == Target.IPU1_0 :
541 if target == Target.IPU1_1 :
543 if target == Target.IPU2 :
548 def get_cpu(target) :
549 if target == Target.DSP1 :
551 if target == Target.DSP2 :
553 if target == Target.EVE1 :
555 if target == Target.EVE2 :
557 if target == Target.EVE3 :
559 if target == Target.EVE4 :
561 if target == Target.A15_0 :
563 if target == Target.IPU1_0 :
565 if target == Target.IPU1_1 :
567 if target == Target.IPU2 :
569 if target == Target.VPAC_NF :
571 if target == Target.VPAC_LDC1 :
573 if target == Target.VPAC_LDC2 :
575 if target == Target.VPAC_MSC1 :
577 if target == Target.VPAC_MSC2 :
579 if target == Target.DMPAC_SDE :
581 if target == Target.DMPAC_DOF :
583 if target == Target.VPAC_VISS1 :
585 if target == Target.VDEC1 :
587 if target == Target.VDEC2 :
589 if target == Target.VENC1 :
591 if target == Target.VENC2 :
593 if target == Target.DSP_C7_1 :
595 if target == Target.A72_0 :
614 def get_vx_enum_name(type) :
615 return "VX_CONVERT_POLICY_" + type.name
617 def get_vx_name(type) :
618 return "vx_convert_policy_e" 635 def get_vx_enum_name(type) :
636 return "VX_ROUND_POLICY_" + type.name
638 def get_vx_name(type) :
639 return "vx_round_policy_e" 658 def get_vx_enum_name(type) :
659 return "VX_NONLINEAR_FILTER_" + type.name
661 def get_vx_name(type) :
662 return "vx_non_linear_filter_e" 683 def get_vx_enum_name(type) :
684 return "VX_PATTERN_" + type.name
686 def get_vx_name(type) :
687 return "vx_pattern_e" 706 def get_vx_enum_name(type) :
707 return "VX_INTERPOLATION_" + type.name
709 def get_vx_name(type) :
710 return "vx_interpolation_type_e" 727 def get_vx_enum_name(type) :
728 return "vx_" + type.name.lower() +
"_e" 730 def get_vx_name(type) :
748 def get_vx_enum_name(type) :
749 return "VX_NORM_" + type.name
751 def get_vx_name(type) :
771 def get_vx_enum_name(type) :
772 return "VX_" + type.name
774 def get_vx_name(type) :
775 return "vx_direction_e" 777 def get_access_type(type) :
778 if type == Direction.INPUT:
779 return "VX_READ_ONLY" 780 if type == Direction.OUTPUT:
781 return "VX_WRITE_ONLY" 782 if type == Direction.BIDIRECTIONAL:
783 return "VX_READ_WRITE" 786 def get_doxygen_name(type) :
787 if type == Direction.INPUT:
789 if type == Direction.OUTPUT:
791 if type == Direction.BIDIRECTIONAL:
811 def get_vx_enum_name(type) :
812 return "VX_PARAMETER_STATE_" + type.name
814 def get_vx_name(type) :
815 return "vx_parameter_state_e" 832 def get_vx_enum_name(type) :
833 return "VX_SCALE_PYRAMID_" + type.name
850 def get_vx_enum_name(type) :
851 return "VX_THRESHOLD_TYPE_" + type.name
853 def get_vx_name(type) :
854 return "vx_threshold_type_e" 874 def get_vx_enum_name(type) :
875 return "VX_TERM_CRITERIA_" + type.name
877 def get_vx_name(type) :
878 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)