camerauis/cameraxui/cxengine/src/cxequalitypresetssymbian.cpp
changeset 42 feebad15db8c
parent 41 67457b2ffb33
child 46 c826656d6714
equal deleted inserted replaced
41:67457b2ffb33 42:feebad15db8c
    62 */
    62 */
    63 CxeQualityPresetsSymbian::CxeQualityPresetsSymbian(CxeSettings &settings)
    63 CxeQualityPresetsSymbian::CxeQualityPresetsSymbian(CxeSettings &settings)
    64     : mSettings(settings)
    64     : mSettings(settings)
    65 {
    65 {
    66     CX_DEBUG_ENTER_FUNCTION();
    66     CX_DEBUG_ENTER_FUNCTION();
       
    67     OstTrace0(camerax_performance, CXEQUALITYPRESETSSYMBIAN_1, "msg: e_CX_QUALITYPRESETS_NEW 1");
    67 
    68 
    68     TRAPD(err,  mIcm = CImagingConfigManager::NewL());
    69     TRAPD(err,  mIcm = CImagingConfigManager::NewL());
    69 
    70 
    70     if (err) {
    71     if (err) {
    71         CX_DEBUG(("Error during ICM initialization error code = %d", err));
    72         CX_DEBUG(("Error during ICM initialization error code = %d", err));
    72         mIcm = NULL;
    73         mIcm = NULL;
    73     }
    74     }
    74 
    75 
    75     CX_DEBUG_EXIT_FUNCTION();
    76     OstTrace0(camerax_performance, CXEQUALITYPRESETSSYMBIAN_2, "msg: e_CX_QUALITYPRESETS_NEW 0");
    76 
    77     CX_DEBUG_EXIT_FUNCTION();
    77 }
    78 }
    78 
    79 
    79 /* !
    80 /* !
    80 * CxeQualityPresetsSymbian::~CxeQualityPresetsSymbian()
    81 * CxeQualityPresetsSymbian::~CxeQualityPresetsSymbian()
    81 */
    82 */
   309 
   310 
   310     // calculate delta error for the resolution against supported aspect ratio's
   311     // calculate delta error for the resolution against supported aspect ratio's
   311     int delta16by9 = abs((width * ASPECT_RATIO_SIZE_16BY9.height()) - (height * ASPECT_RATIO_SIZE_16BY9.width()));
   312     int delta16by9 = abs((width * ASPECT_RATIO_SIZE_16BY9.height()) - (height * ASPECT_RATIO_SIZE_16BY9.width()));
   312     int delta11by9 = abs((width * ASPECT_RATIO_SIZE_11BY9.height()) - (height * ASPECT_RATIO_SIZE_11BY9.width()));
   313     int delta11by9 = abs((width * ASPECT_RATIO_SIZE_11BY9.height()) - (height * ASPECT_RATIO_SIZE_11BY9.width()));
   313     int delta4by3  = abs((width * ASPECT_RATIO_SIZE_4BY3.height()) - (height * ASPECT_RATIO_SIZE_4BY3.width()));
   314     int delta4by3  = abs((width * ASPECT_RATIO_SIZE_4BY3.height()) - (height * ASPECT_RATIO_SIZE_4BY3.width()));
   314     
   315 
   315     // get the closest aspect ratio
   316     // get the closest aspect ratio
   316     int minValue = qMin(qMin(delta16by9, delta11by9), delta4by3);
   317     int minValue = qMin(qMin(delta16by9, delta11by9), delta4by3);
   317     
   318 
   318     if (minValue == delta16by9) {
   319     if (minValue == delta16by9) {
   319         aspectRatio = Cxe::AspectRatio16to9;
   320         aspectRatio = Cxe::AspectRatio16to9;
   320     } else if (minValue == delta11by9) {
   321     } else if (minValue == delta11by9) {
   321         aspectRatio = Cxe::AspectRatio11to9;
   322         aspectRatio = Cxe::AspectRatio11to9;
   322     } else if (minValue == delta4by3) {
   323     } else if (minValue == delta4by3) {