www.pudn.com > camera.rar > sensor.cpp


// 
// Copyright (c) Microsoft Corporation.  All rights reserved. 
// 
// 
// Use of this sample source code is subject to the terms of the Microsoft 
// license agreement under which you licensed this sample source code. If 
// you did not accept the terms of the license agreement, you are not 
// authorized to use this sample source code. For the terms of the license, 
// please see the license agreement between you and Microsoft or, if applicable, 
// see the LICENSE.RTF on your install media or the root of your tools installation. 
// THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 
// 
// 
// (C) Copyright 2006 Marvell International Ltd. 
// All Rights Reserved 
// 
/**************************************************** 
    (C) Copyright 2006 Marvell International Ltd. 
    All Rights Reserved 
*****************************************************/ 
 
#include  
#include  
 
#include "Cs.h" 
#include "Csmedia.h" 
 
#include "CameraPDDProps.h" 
#include "dstruct.h" 
#include "dbgsettings.h" 
#include  
#include "CameraDriver.h" 
#include "PinDriver.h" 
#include "sensor.h" 
#include "Camera_SOC.h" 
 
void Sensor::init_camera_cfg(camera_cfg_t* cfg, BOOL is_still) 
{ 
    format_t *qci_format = &cfg->qci_format; 
 
    qci_format->is_still = is_still; 
    cfg->ippi_rpp_spec = 0; 
 
    if (qci_format->format == PXA_CAMERA_IMAGE_FORMAT_RAW10) 
    { 
        float default_coe[9] = { 1, 0, 0, 
                                 0, 1, 0, 
                                 0, 0, 1 }; 
 
        float *coe = default_coe; 
        if (cfg->color_cfg) 
        {             
            DEBUGMSG( ZONE_IOCTL, ( _T("CAM: using sensor specific coe\r\n")) ); 
            coe = cfg->color_cfg->color_correct_coe; 
        }             
    } 
}