~ubuntu-branches/ubuntu/hardy/avidemux/hardy

« back to all changes in this revision

Viewing changes to avidemux/ADM_userInterfaces/ADM_commonUI/DIA_flyEq2.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Matvey Kozhev
  • Date: 2007-12-18 13:53:04 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20071218135304-cdqec2lg2bglyz15
Tags: 1:2.4~preview3-0.0ubuntu1
* Upload to Ubuntu. (LP: #163287, LP: #126572)
* debian/changelog: re-added Ubuntu releases.
* debian/control:
  - Require debhelper >= 5.0.51 (for dh_icons) and imagemagick.
  - Build-depend on libsdl1.2-dev instead of libsdl-dev.
  - Build against newer libx264-dev. (LP: #138854)
  - Removed libamrnb-dev, not in Ubuntu yet.
* debian/rules:
  - Install all icon sizes, using convert (upstream installs none).
  - Added missing calls to dh_installmenu, dh_installman, dh_icons and
    dh_desktop.
* debian/menu, debian/avidemux-qt.menu:
  - Corrected package and executable names.
* debian/avidemux-common.install: Install icons.
* debian/avidemux.common.manpages: Install man/avidemux.1.
* debian/links, debian/avidemux-cli.links, debian/avidemux-gtk.links:
  - Link manpages to avidemux.1.gz.
* debian/install, debian/avidemux-qt.install, debian/avidemux-gtk.desktop,
  debian/avidemux-qt.desktop: Install desktop files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
                          ADM_guiContrast.cpp  -  description
 
3
                             -------------------
 
4
    begin                : Mon Sep 23 2002
 
5
    copyright            : (C) 2002 by mean
 
6
    email                : fixounet@free.fr
 
7
 ***************************************************************************/
 
8
 
 
9
/***************************************************************************
 
10
 *                                                                         *
 
11
 *   This program is free software; you can redistribute it and/or modify  *
 
12
 *   it under the terms of the GNU General Public License as published by  *
 
13
 *   the Free Software Foundation; either version 2 of the License, or     *
 
14
 *   (at your option) any later version.                                   *
 
15
 *                                                                         *
 
16
 ***************************************************************************/
 
17
#include "config.h"
 
18
#include <string.h>
 
19
#include <stdio.h>
 
20
#include <math.h>
 
21
#include "default.h"
 
22
#include "ADM_colorspace/ADM_rgb.h"
 
23
 
 
24
#include "ADM_image.h"
 
25
#include "ADM_video/ADM_genvideo.hxx"
 
26
#include "ADM_videoFilter/ADM_vidContrast.h"
 
27
#include "DIA_flyDialog.h"
 
28
#include "DIA_flyEq2.h"
 
29
#include "ADM_osSupport/ADM_cpuCap.h"
 
30
/************* COMMON PART *********************/
 
31
uint8_t  flyEq2::update(void)
 
32
{
 
33
    download();
 
34
    process();
 
35
    copyYuvFinalToRgb();
 
36
    display();
 
37
    return 1;
 
38
}
 
39
 
 
40
uint8_t flyEq2::process(void)
 
41
 
 
42
{
 
43
        Eq2Settings mySettings;
 
44
 
 
45
#if 0
 
46
        printf("Contrast   :%f\n",param.contrast);
 
47
        printf("brightness :%f\n",param.brightness);
 
48
        printf("saturation :%f\n",param.saturation);
 
49
        
 
50
        printf("gamma_weight :%f\n",param.gamma_weight);
 
51
        printf("gamma :%f\n",param.gamma);
 
52
        
 
53
        
 
54
        
 
55
        printf("rgamma :%f\n",param.rgamma);
 
56
        printf("bgamma :%f\n",param.bgamma);
 
57
        printf("ggamma :%f\n",param.ggamma);
 
58
        printf("******************\n");
 
59
#endif  
 
60
        
 
61
                update_lut(&mySettings,&param);
 
62
                
 
63
typedef void lutMeType(oneSetting *par, unsigned char *dst, unsigned char *src, unsigned int w, unsigned int h);
 
64
 
 
65
                        lutMeType *lutMe=apply_lut;
 
66
                        
 
67
 
 
68
#if (defined( ARCH_X86)  || defined(ARCH_X86_64))
 
69
                if(CpuCaps::hasMMX())
 
70
                {
 
71
                                lutMe=affine_1d_MMX;
 
72
                }
 
73
#endif  
 
74
                lutMe(&(mySettings.param[0]),YPLANE(_yuvBufferOut),YPLANE(_yuvBuffer),_w,_h);
 
75
                lutMe(&(mySettings.param[2]),UPLANE(_yuvBufferOut),UPLANE(_yuvBuffer),_w>>1,_h>>1);
 
76
                lutMe(&(mySettings.param[1]),VPLANE(_yuvBufferOut),VPLANE(_yuvBuffer),_w>>1,_h>>1);       
 
77
 
 
78
                        
 
79
                        #if 1
 
80
                _yuvBuffer->copyLeftSideTo(_yuvBufferOut);
 
81
#endif
 
82
                return 1;
 
83
}
 
84
 
 
85
/************* COMMON PART *********************/