Logo Search packages:      
Sourcecode: libdc1394-22 version File versions  Download package

dc1394error_t dc1394_avt_set_multiple_slope ( dc1394camera_t camera,
dc1394bool_t  on_off,
uint32_t  points_nb,
uint32_t  kneepoint1,
uint32_t  kneepoint2,
uint32_t  kneepoint3 
)

Set on/off, the nb of kneepoints to use and the kneepoints values

Definition at line 462 of file avt.c.

References dc1394_get_adv_control_register(), and dc1394_set_adv_control_register().

{
    dc1394error_t err;
    uint32_t curval;

    /* Retrieve current hdr parameters */
    err=dc1394_get_adv_control_register(camera,REG_CAMERA_AVT_HDR_CONTROL, &curval);
    DC1394_ERR_RTN(err,"Could not get AVT HDR control reg");

    /* Shading ON / OFF : Bit 6 */
    curval = (curval & 0xFDFFFFFFUL) | ((on_off ) << 25);

    /* Number of points : Bits 28..31 */
    curval = (curval & 0xFFFFFFF0UL) | ((points_nb & 0xFUL ));

    /* Set new hdr parameters */
    err=dc1394_set_adv_control_register(camera,REG_CAMERA_AVT_HDR_CONTROL, curval);
    DC1394_ERR_RTN(err,"Could not set AVT HDR control reg");

    /* kneepoints */
    err=dc1394_set_adv_control_register(camera,REG_CAMERA_AVT_KNEEPOINT_1, kneepoint1);
    DC1394_ERR_RTN(err,"Could not set AVT kneepoint 1");
    err=dc1394_set_adv_control_register(camera,REG_CAMERA_AVT_KNEEPOINT_2, kneepoint2);
    DC1394_ERR_RTN(err,"Could not set AVT kneepoint 2");
    err=dc1394_set_adv_control_register(camera,REG_CAMERA_AVT_KNEEPOINT_3, kneepoint3);
    DC1394_ERR_RTN(err,"Could not set AVT kneepoint 3");

    return DC1394_SUCCESS;
}


Generated by  Doxygen 1.6.0   Back to index