Skip to content

Orientation tracking parameter aspects

The orientation tracking parameter specified as hDecoderConfig->orientation_tracking suffers from several formal aspects:

  1. It should not be initialized in init_decoder_config() but rather in IVAS_DEC_Configure().
  2. It seems that its data type could be OTR_TRACKING_T rather than int16_t.
  3. Also,
/* Orientation tracking types */
#define IVAS_ORIENT_TRK_NONE                    0
#define IVAS_ORIENT_TRK_REF                     1
#define IVAS_ORIENT_TRK_AVG                     2
#define IVAS_ORIENT_TRK_REF_VEC                 3
#define IVAS_ORIENT_TRK_REF_VEC_LEV             4

typedef enum
{
    OTR_TRACKING_NONE = IVAS_ORIENT_TRK_NONE,
    OTR_TRACKING_REF_ORIENT = IVAS_ORIENT_TRK_REF, /* track orientation relative to external reference orientation (default: no rotation) */
    OTR_TRACKING_AVG_ORIENT = IVAS_ORIENT_TRK_AVG  /* track orientation relative to average orientation */
    ,
    OTR_TRACKING_REF_VEC = IVAS_ORIENT_TRK_REF_VEC, /* track orientation relative to external reference vector */
    OTR_TRACKING_REF_VEC_LEV = IVAS_ORIENT_TRK_REF_VEC_LEV  /* track orientation relative to level component of external reference vector */
} OTR_TRACKING_T;

seems to be redundant - the same set is defined twice.
4) I would also suggest to rename it to orientation_tracking_type to better reflect its role.