This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: why do you use an int32 to store a boolean value? - multicam app

Part Number: TDA4VM


Hi, in the multicam app I can see you are using an int32 to store boolean values:

typedef struct {

    SensorObj     sensorObj;
    CaptureObj    captureObj;
    VISSObj       vissObj;
    AEWBObj       aewbObj;
    LDCObj        ldcObj;
    ImgMosaicObj  imgMosaicObj;
    DisplayObj    displayObj;

    vx_char output_file_path[APP_MAX_FILE_PATH];

    /* OpenVX references */
    vx_context context;
    vx_graph   graph;

    vx_int32 en_out_img_write;
    vx_int32 test_mode;

    vx_uint32 is_interactive;

    vx_uint32 num_frames_to_run;

    vx_uint32 num_frames_to_write;
    vx_uint32 num_frames_to_skip;

    tivx_task task;
    vx_uint32 stop_task;
    vx_uint32 stop_task_done;

    app_perf_point_t total_perf;
    app_perf_point_t fileio_perf;
    app_perf_point_t draw_perf;

    int32_t enable_ldc;
    int32_t enable_viss;
    int32_t enable_aewb;
    int32_t enable_mosaic;

    int32_t pipeline;

    int32_t enqueueCnt;
    int32_t dequeueCnt;

    int32_t write_file;

    vx_uint32 enable_configure_hwa_freq;
    vx_uint32 hwa_freq_config;

} AppObj;


if((1 == obj->enable_viss) && (status == VX_SUCCESS))
{
    status = app_init_viss(obj->context, &obj->vissObj, &obj->sensorObj, "viss_obj");
    APP_PRINTF("VISS init done!\n");
}

Is there any reason for this?, why not use a bool or uint8 data type?

thanks