[svn] / trunk / xvidcore / vfw / src / config.c Repository:
ViewVC logotype

Diff of /trunk/xvidcore/vfw/src/config.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1649, Sun Oct 16 00:00:04 2005 UTC revision 1910, Thu Dec 2 06:46:07 2010 UTC
# Line 3  Line 3 
3   *      XVID VFW FRONTEND   *      XVID VFW FRONTEND
4   *      config   *      config
5   *   *
6     *      Copyright(C) Peter Ross <pross@xvid.org>
7     *
8   *      This program is free software; you can redistribute it and/or modify   *      This program is free software; you can redistribute it and/or modify
9   *      it under the terms of the GNU General Public License as published by   *      it under the terms of the GNU General Public License as published by
10   *      the Free Software Foundation; either version 2 of the License, or   *      the Free Software Foundation; either version 2 of the License, or
# Line 17  Line 19 
19   *      along with this program; if not, write to the Free Software   *      along with this program; if not, write to the Free Software
20   *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.   *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21   *   *
22   *************************************************************************/   * $Id: config.c,v 1.41 2010-12-02 06:46:07 Isibaar Exp $
   
 /**************************************************************************  
  *  
  *      History:  
  *  
  *      15.06.2002      added bframes options  
  *      21.04.2002      fixed custom matrix support, tried to get dll size down  
  *      17.04.2002      re-enabled lumi masking in 1st pass  
  *      15.04.2002      updated cbr support  
  *      07.04.2002      min keyframe interval checkbox  
  *                              2-pass max bitrate and overflow customization  
  *      04.04.2002      interlacing support  
  *                              hinted ME support  
  *      24.03.2002      daniel smith <danielsmith@astroboymail.com>  
  *                              added Foxer's new CBR engine  
  *                              - cbr_buffer is being used as reaction delay (quick hack)  
  *      23.03.2002      daniel smith <danielsmith@astroboymail.com>  
  *                              added load defaults button  
  *                              merged foxer's alternative 2-pass code (2-pass alt tab)  
  *                              added proper tooltips  
  *                              moved registry data into reg_ints/reg_strs arrays  
  *                              added DEBUGERR output on errors instead of returning  
  *      16.03.2002      daniel smith <danielsmith@astroboymail.com>  
  *                              rewrote/restructured most of file  
  *                              added tooltips (kind of - dirty message hook method)  
  *                              split tabs into a main dialog / advanced prop sheet  
  *                              advanced controls are now enabled/disabled by mode  
  *                              added modulated quantization, DX50 fourcc  
  *      11.03.2002  Min Chen <chenm001@163.com>  
  *                        now get Core Version use xvid_init()  
  *      05.03.2002  Min Chen <chenm001@163.com>  
  *                              Add Core version display to about box  
  *      01.12.2001      inital version; (c)2001 peter ross <pross@xvid.org>  
23   *   *
24   *************************************************************************/   *************************************************************************/
25    
   
26  #include <windows.h>  #include <windows.h>
27  #include <commctrl.h>  #include <commctrl.h>
28  #include <stdio.h>  /* sprintf */  #include <stdio.h>  /* sprintf */
29  #include <xvid.h>       /* XviD API */  #include <xvid.h>       /* Xvid API */
30    
31  #include "debug.h"  #include "debug.h"
32  #include "config.h"  #include "config.h"
# Line 104  Line 72 
72  /* MPEG-4 PROFILES/LEVELS ============================================================== */  /* MPEG-4 PROFILES/LEVELS ============================================================== */
73  /* ===================================================================================== */  /* ===================================================================================== */
74    
75  #define DXN_PROFILES  /* #define EXTRA_PROFILES */
76    
77  /* default vbv_occupancy is (64/170)*vbv_buffer_size */  /* default vbv_occupancy is (64/170)*vbv_buffer_size */
78    
# Line 115  Line 83 
83  const profile_t profiles[] =  const profile_t profiles[] =
84  {  {
85  /*  name                p@l    w    h    fps  obj Tvmv vmv    vcv    ac%   vbv        pkt     bps    vbv_peak dbf flags */  /*  name                p@l    w    h    fps  obj Tvmv vmv    vcv    ac%   vbv        pkt     bps    vbv_peak dbf flags */
86    { "Simple @ L0",      0x08,  176, 144, 15,  1,  198,   99,   1485, 100,  10*16368,  2048,   64000,        0, -1, PROFILE_S },  #ifndef EXTRA_PROFILES
87      { "Xvid Mobile",  "Xvid Mobile",  0x00,  352, 240, 30,  1,  990,  330,   9900, 100,  128*8192,    -1, 1334850,  8000000,  5, PROFILE_4MV|PROFILE_ADAPTQUANT|PROFILE_BVOP|PROFILE_PACKED|PROFILE_MPEGQUANT|PROFILE_QPEL|PROFILE_XVID },
88      { "Xvid Home",    "Xvid Home",    0x00,  720, 576, 25,  1, 4860, 1620,  40500, 100,  384*8192,    -1, 4854000,  8000000,  5, PROFILE_4MV|PROFILE_ADAPTQUANT|PROFILE_BVOP|PROFILE_PACKED|PROFILE_MPEGQUANT|PROFILE_QPEL|PROFILE_INTERLACE|PROFILE_XVID },
89      { "Xvid HD 720",  "Xvid HD 720",  0x00, 1280, 720, 30,  1,10800, 3600, 108000, 100,  768*8192,    -1, 9708400, 16000000,  5, PROFILE_4MV|PROFILE_ADAPTQUANT|PROFILE_BVOP|PROFILE_PACKED|PROFILE_MPEGQUANT|PROFILE_QPEL|PROFILE_INTERLACE|PROFILE_XVID },
90      { "Xvid HD 1080",     "Xvid HD 1080", 0x00, 1920,1080, 30,  1,24480, 8160, 244800, 100, 2047*8192,    -1,20480000, 36000000,  5, PROFILE_4MV|PROFILE_ADAPTQUANT|PROFILE_BVOP|PROFILE_PACKED|PROFILE_MPEGQUANT|PROFILE_QPEL|PROFILE_INTERLACE|PROFILE_XVID },
91    #else
92      { "Handheld",          "Handheld",              0x00,  176, 144, 15,  1,  198,   99,   1485, 100,   32*8192,    -1,  537600,   800000,  0, PROFILE_ADAPTQUANT|PROFILE_EXTRA },
93      { "Portable NTSC",     "Portable NTSC",         0x00,  352, 240, 30,  1,  990,  330,  36000, 100,  384*8192,    -1, 4854000,  8000000,  1, PROFILE_4MV|PROFILE_ADAPTQUANT|PROFILE_BVOP|PROFILE_PACKED|PROFILE_EXTRA },
94      { "Portable PAL",          "Portable PAL",      0x00,  352, 288, 25,  1, 1188,  396,  36000, 100,  384*8192,    -1, 4854000,  8000000,  1, PROFILE_4MV|PROFILE_ADAPTQUANT|PROFILE_BVOP|PROFILE_PACKED|PROFILE_EXTRA },
95      { "Home Theatre NTSC", "Home Theatre NTSC", 0x00,  720, 480, 30,  1, 4050, 1350,  40500, 100,  384*8192,    -1, 4854000,  8000000,  1, PROFILE_4MV|PROFILE_ADAPTQUANT|PROFILE_BVOP|PROFILE_PACKED|PROFILE_INTERLACE|PROFILE_EXTRA },
96      { "Home Theatre PAL",  "Home Theatre PAL",  0x00,  720, 576, 25,  1, 4860, 1620,  40500, 100,  384*8192,    -1, 4854000,  8000000,  1, PROFILE_4MV|PROFILE_ADAPTQUANT|PROFILE_BVOP|PROFILE_PACKED|PROFILE_INTERLACE|PROFILE_EXTRA },
97      { "HDTV",                  "HDTV",                      0x00, 1280, 720, 30,  1,10800, 3600, 108000, 100,  768*8192,    -1, 9708400, 16000000,  2, PROFILE_4MV|PROFILE_ADAPTQUANT|PROFILE_BVOP|PROFILE_PACKED|PROFILE_INTERLACE|PROFILE_EXTRA },
98    #endif
99    
100      { "MPEG4 Simple @ L0", "MPEG4 SP @ L0",     0x08,  176, 144, 15,  1,  198,   99,   1485, 100,  10*16368,  2048,   64000,        0, -1, PROFILE_S },
101    /* simple@l0: max f_code=1, intra_dc_vlc_threshold=0 */    /* simple@l0: max f_code=1, intra_dc_vlc_threshold=0 */
102    /* if ac preidition is used, adaptive quantization must not be used */    /* if ac preidition is used, adaptive quantization must not be used */
103    /* <=qcif must be used */    /* <=qcif must be used */
104    { "Simple @ L1",      0x01,  176, 144, 15,  4,  198,   99,   1485, 100,  10*16368,  2048,   64000,        0, -1, PROFILE_S|PROFILE_ADAPTQUANT },    { "MPEG4 Simple @ L1", "MPEG4 SP @ L1",     0x01,  176, 144, 15,  4,  198,   99,   1485, 100,  10*16368,  2048,   64000,        0, -1, PROFILE_S|PROFILE_ADAPTQUANT },
105    { "Simple @ L2",      0x02,  352, 288, 15,  4,  792,  396,   5940, 100,  40*16368,  4096,  128000,        0, -1, PROFILE_S|PROFILE_ADAPTQUANT },    { "MPEG4 Simple @ L2", "MPEG4 SP @ L2",     0x02,  352, 288, 15,  4,  792,  396,   5940, 100,  40*16368,  4096,  128000,        0, -1, PROFILE_S|PROFILE_ADAPTQUANT },
106    { "Simple @ L3",      0x03,  352, 288, 15,  4,  792,  396,  11880, 100,  40*16368,  8192,  384000,        0, -1, PROFILE_S|PROFILE_ADAPTQUANT },    { "MPEG4 Simple @ L3", "MPEG4 SP @ L3",     0x03,  352, 288, 30,  4,  792,  396,  11880, 100,  40*16368,  8192,  384000,        0, -1, PROFILE_S|PROFILE_ADAPTQUANT },
107      /* From ISO/IEC 14496-2:2004/FPDAM 2: New Levels for Simple Profile */
108      { "MPEG4 Simple @ L4a","MPEG4 SP @ L4a",    0x04,  640, 480, 30,  4, 2400, 1200,  36000, 100,  80*16368, 16384, 4000000,        0, -1, PROFILE_S|PROFILE_ADAPTQUANT },
109      { "MPEG4 Simple @ L5", "MPEG4 SP @ L5",     0x05,  720, 576, 30,  4, 3240, 1620,  40500, 100, 112*16368, 16384, 8000000,        0, -1, PROFILE_S|PROFILE_ADAPTQUANT },
110      /* From ISO/IEC 14496-2:2004/FPDAM 4: Simple profile level 6 */
111      { "MPEG4 Simple @ L6", "MPEG4 SP @ L6",     0x06, 1280, 720, 30,  4, 7200, 3600, 108000, 100, 248*16368, 16384,12000000,        0, -1, PROFILE_S|PROFILE_ADAPTQUANT },
112    
113  #if 0 /* since rrv encoding is no longer support, these profiles have little use */  #if 0 /* since rrv encoding is no longer support, these profiles have little use */
114    { "ARTS @ L1",        0x91,  176, 144, 15,  4,  198,   99,   1485, 100,  10*16368,  8192,   64000,        0, -1, PROFILE_ARTS },    { "MPEG4 ARTS @ L1", "MPEG4 ARTS @ L1",       0x91,  176, 144, 15,  4,  198,   99,   1485, 100,  10*16368,  8192,   64000,        0, -1, PROFILE_ARTS },
115    { "ARTS @ L2",        0x92,  352, 288, 15,  4,  792,  396,   5940, 100,  40*16368, 16384,  128000,        0, -1, PROFILE_ARTS },    { "MPEG4 ARTS @ L2", "MPEG4 ARTS @ L2",       0x92,  352, 288, 15,  4,  792,  396,   5940, 100,  40*16368, 16384,  128000,        0, -1, PROFILE_ARTS },
116    { "ARTS @ L3",        0x93,  352, 288, 30,  4,  792,  396,  11880, 100,  40*16368, 16384,  384000,        0, -1, PROFILE_ARTS },    { "MPEG4 ARTS @ L3", "MPEG4 ARTS @ L3",       0x93,  352, 288, 30,  4,  792,  396,  11880, 100,  40*16368, 16384,  384000,        0, -1, PROFILE_ARTS },
117    { "ARTS @ L4",        0x94,  352, 288, 30, 16,  792,  396,  11880, 100,  80*16368, 16384, 2000000,        0, -1, PROFILE_ARTS },    { "MPEG4 ARTS @ L4", "MPEG4 ARTS @ L4",       0x94,  352, 288, 30, 16,  792,  396,  11880, 100,  80*16368, 16384, 2000000,        0, -1, PROFILE_ARTS },
118  #endif  #endif
119    
120    { "AS @ L0",          0xf0,  176, 144, 30,  1,  297,   99,   2970, 100,  10*16368,  2048,  128000,        0, -1, PROFILE_AS },    { "MPEG4 Advanced Simple @ L0", "MPEG4 ASP @ L0",         0xf0,  176, 144, 30,  1,  297,   99,   2970, 100,  10*16368,  2048,  128000,        0, -1, PROFILE_AS },
121    { "AS @ L1",          0xf1,  176, 144, 30,  4,  297,   99,   2970, 100,  10*16368,  2048,  128000,        0, -1, PROFILE_AS },    { "MPEG4 Advanced Simple @ L1", "MPEG4 ASP @ L1",         0xf1,  176, 144, 30,  4,  297,   99,   2970, 100,  10*16368,  2048,  128000,        0, -1, PROFILE_AS },
122    { "AS @ L2",          0xf2,  352, 288, 15,  4, 1188,  396,   5940, 100,  40*16368,  4096,  384000,        0, -1, PROFILE_AS },    { "MPEG4 Advanced Simple @ L2", "MPEG4 ASP @ L2",         0xf2,  352, 288, 15,  4, 1188,  396,   5940, 100,  40*16368,  4096,  384000,        0, -1, PROFILE_AS },
123    { "AS @ L3",          0xf3,  352, 288, 30,  4, 1188,  396,  11880, 100,  40*16368,  4096,  768000,        0, -1, PROFILE_AS },    { "MPEG4 Advanced Simple @ L3", "MPEG4 ASP @ L3",         0xf3,  352, 288, 30,  4, 1188,  396,  11880, 100,  40*16368,  4096,  768000,        0, -1, PROFILE_AS },
124   /*  ISMA Profile 1, (ASP) @ L3b (CIF, 1.5 Mb/s) CIF(352x288), 30fps, 1.5Mbps max ??? */   /*  ISMA Profile 1, (ASP) @ L3b (CIF, 1.5 Mb/s) CIF(352x288), 30fps, 1.5Mbps max ??? */
125    { "AS @ L4",          0xf4,  352, 576, 30,  4, 2376,  792,  23760,  50,  80*16368,  8192, 3000000,        0, -1, PROFILE_AS },    { "MPEG4 Advanced Simple @ L4", "MPEG4 ASP @ L4",         0xf4,  352, 576, 30,  4, 2376,  792,  23760,  50,  80*16368,  8192, 3000000,        0, -1, PROFILE_AS },
126    { "AS @ L5",          0xf5,  720, 576, 30,  4, 4860, 1620,  48600,  25, 112*16368, 16384, 8000000,        0, -1, PROFILE_AS },    { "MPEG4 Advanced Simple @ L5", "MPEG4 ASP @ L5",         0xf5,  720, 576, 30,  4, 4860, 1620,  48600,  25, 112*16368, 16384, 8000000,        0, -1, PROFILE_AS },
   
 #ifdef DXN_PROFILES  
 //      information provided by DivXNetworks, USA.  
 //  "DivX Certified Profile Compatibility v1.1", February 2005  
   { "DXN Handheld",     0x00,  176, 144, 15,  1,  198,   99,   1485, 100,   32*8192,    -1,  537600,   800000,  0, PROFILE_ADAPTQUANT|PROFILE_DXN },  
   { "DXN Portable NTSC",0x00,  352, 240, 30,  1,  990,  330,  36000, 100,  384*8192,    -1, 4854000,  8000000,  1, PROFILE_4MV|PROFILE_ADAPTQUANT|PROFILE_BVOP|PROFILE_DXN },  
   { "DXN Portable PAL", 0x00,  352, 288, 25,  1, 1188,  396,  36000, 100,  384*8192,    -1, 4854000,  8000000,  1, PROFILE_4MV|PROFILE_ADAPTQUANT|PROFILE_BVOP|PROFILE_DXN },  
   { "DXN HT NTSC",      0x00,  720, 480, 30,  1, 4050, 1350,  40500, 100,  384*8192,    -1, 4854000,  8000000,  1, PROFILE_4MV|PROFILE_ADAPTQUANT|PROFILE_BVOP|PROFILE_INTERLACE|PROFILE_DXN },  
   { "DXN HT PAL",       0x00,  720, 576, 25,  1, 4860, 1620,  40500, 100,  384*8192,    -1, 4854000,  8000000,  1, PROFILE_4MV|PROFILE_ADAPTQUANT|PROFILE_BVOP|PROFILE_INTERLACE|PROFILE_DXN },  
   { "DXN HDTV",         0x00, 1280, 720, 30,  1,10800, 3600, 108000, 100,  768*8192,    -1, 9708400, 16000000,  2, PROFILE_4MV|PROFILE_ADAPTQUANT|PROFILE_BVOP|PROFILE_INTERLACE|PROFILE_DXN },  
 #endif  
127    
128    { "(unrestricted)",   0x00,    0,   0,  0,  0,    0,    0,      0, 100,   0*16368,    -1,       0,        0, -1, 0xffffffff & ~PROFILE_DXN },    { "(unrestricted)", "(unrestricted)",  0x00,    0,   0,  0,  0,    0,    0,      0, 100,   0*16368,    -1,       0,        0, -1, 0xffffffff & ~(PROFILE_EXTRA | PROFILE_PACKED)},
129  };  };
130    
131    
# Line 293  Line 269 
269          {"vop_debug",                           &reg.vop_debug,                                 0},          {"vop_debug",                           &reg.vop_debug,                                 0},
270          {"display_status",                      &reg.display_status,                    1},          {"display_status",                      &reg.display_status,                    1},
271    
272            /* smp */
273            {"num_threads",                         &reg.num_threads,                               0},
274    
275          /* decoder, shared with dshow */          /* decoder, shared with dshow */
276          {"Brightness",                          &pp_brightness,                                 0},          {"Brightness",                          &pp_brightness,                                 0},
277          {"Deblock_Y",                           &pp_dy,                                                 0},          {"Deblock_Y",                           &pp_dy,                                                 0},
# Line 304  Line 283 
283  };  };
284    
285  static const REG_STR reg_strs[] = {  static const REG_STR reg_strs[] = {
286          {"profile",                                     reg.profile_name,                               "(unrestricted)"},          {"profile",                                     reg.profile_name,                               "Xvid Home"},
287    {"quality",         reg.quality_name,       QUALITY_GENERAL_STRING},    {"quality",         reg.quality_name,       QUALITY_GENERAL_STRING},
288          {"stats",                                       reg.stats,                                              CONFIG_2PASS_FILE},          {"stats",                                       reg.stats,                                              CONFIG_2PASS_FILE},
289  };  };
# Line 373  Line 352 
352          }          }
353    
354          reg.cpu = info.cpu_flags;          reg.cpu = info.cpu_flags;
         reg.num_threads = info.num_threads;  
355    
356          RegOpenKeyEx(XVID_REG_KEY, XVID_REG_PARENT "\\" XVID_REG_CHILD, 0, KEY_READ, &hKey);          RegOpenKeyEx(XVID_REG_KEY, XVID_REG_PARENT "\\" XVID_REG_CHILD, 0, KEY_READ, &hKey);
357    
# Line 396  Line 374 
374    /* find profile table index */    /* find profile table index */
375          reg.profile = 0;          reg.profile = 0;
376          for (i=0; i<sizeof(profiles)/sizeof(profile_t); i++) {          for (i=0; i<sizeof(profiles)/sizeof(profile_t); i++) {
377                  if (lstrcmpi(profiles[i].name, reg.profile_name) == 0) {                  char perm1[255] = {"Xvid "}, perm2[255] = {"MPEG4 "};
378                    if (lstrcmpi(profiles[i].name, reg.profile_name) == 0 ||
379                            lstrcmpi(profiles[i].name, lstrcat(perm1, reg.profile_name)) == 0 ||
380                            lstrcmpi(profiles[i].name, lstrcat(perm2, reg.profile_name)) == 0) { /* legacy names */
381                          reg.profile = i;                          reg.profile = i;
382                  }                  }
383          }          }
# Line 498  Line 479 
479  }  }
480    
481    
482  /* clear XviD registry key, load defaults */  /* clear Xvid registry key, load defaults */
483    
484  static void config_reg_default(CONFIG * config)  static void config_reg_default(CONFIG * config)
485  {  {
# Line 541  Line 522 
522  #define UINT_BUF_SZ     20  #define UINT_BUF_SZ     20
523  static int config_get_cbuint(HWND hDlg, UINT item, int def)  static int config_get_cbuint(HWND hDlg, UINT item, int def)
524  {  {
525          int sel = SendMessage(GetDlgItem(hDlg, item), CB_GETCURSEL, 0, 0);          LRESULT sel = SendMessage(GetDlgItem(hDlg, item), CB_GETCURSEL, 0, 0);
526          char buf[UINT_BUF_SZ];          char buf[UINT_BUF_SZ];
527    
528          if (sel<0) {          if (sel<0) {
# Line 698  Line 679 
679    
680  /* quantization matrix dialog proc */  /* quantization matrix dialog proc */
681    
682  static BOOL CALLBACK quantmatrix_proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)  static INT_PTR CALLBACK quantmatrix_proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
683  {  {
684          CONFIG* config = (CONFIG*)GetWindowLong(hDlg, GWL_USERDATA);          CONFIG* config = (CONFIG*)GetWindowLongPtr(hDlg, GWLP_USERDATA);
685    
686          switch (uMsg)          switch (uMsg)
687          {          {
688          case WM_INITDIALOG :          case WM_INITDIALOG :
689                  SetWindowLong(hDlg, GWL_USERDATA, lParam);                  SetWindowLongPtr(hDlg, GWLP_USERDATA, lParam);
690                  config = (CONFIG*)lParam;                  config = (CONFIG*)lParam;
691                  quant_upload(hDlg, config);                  quant_upload(hDlg, config);
692    
# Line 767  Line 748 
748                  SendDlgItemMessage(hDlg, IDC_QUANTTYPE, CB_ADDSTRING, 0, (LPARAM)"H.263");                  SendDlgItemMessage(hDlg, IDC_QUANTTYPE, CB_ADDSTRING, 0, (LPARAM)"H.263");
749                  SendDlgItemMessage(hDlg, IDC_QUANTTYPE, CB_ADDSTRING, 0, (LPARAM)"MPEG");                  SendDlgItemMessage(hDlg, IDC_QUANTTYPE, CB_ADDSTRING, 0, (LPARAM)"MPEG");
750                  SendDlgItemMessage(hDlg, IDC_QUANTTYPE, CB_ADDSTRING, 0, (LPARAM)"MPEG-Custom");                  SendDlgItemMessage(hDlg, IDC_QUANTTYPE, CB_ADDSTRING, 0, (LPARAM)"MPEG-Custom");
751    
752                    SendDlgItemMessage(hDlg, IDC_LUMMASK, CB_ADDSTRING, 0, (LPARAM)"Off");
753                    SendDlgItemMessage(hDlg, IDC_LUMMASK, CB_ADDSTRING, 0, (LPARAM)"Luminance-Masking");
754                    SendDlgItemMessage(hDlg, IDC_LUMMASK, CB_ADDSTRING, 0, (LPARAM)"Variance-Masking");
755                  break;                  break;
756    
757          case IDD_AR:          case IDD_AR:
# Line 837  Line 822 
822                  break;                  break;
823    
824          case IDD_ENC :          case IDD_ENC :
                 /* force threads disabled */  
                 EnableWindow(GetDlgItem(hDlg, IDC_NUMTHREADS_STATIC), FALSE);  
                 EnableWindow(GetDlgItem(hDlg, IDC_NUMTHREADS), FALSE);  
   
825                  SendDlgItemMessage(hDlg, IDC_FOURCC, CB_ADDSTRING, 0, (LPARAM)"XVID");                  SendDlgItemMessage(hDlg, IDC_FOURCC, CB_ADDSTRING, 0, (LPARAM)"XVID");
826                  SendDlgItemMessage(hDlg, IDC_FOURCC, CB_ADDSTRING, 0, (LPARAM)"DIVX");                  SendDlgItemMessage(hDlg, IDC_FOURCC, CB_ADDSTRING, 0, (LPARAM)"DIVX");
827                  SendDlgItemMessage(hDlg, IDC_FOURCC, CB_ADDSTRING, 0, (LPARAM)"DX50");                  SendDlgItemMessage(hDlg, IDC_FOURCC, CB_ADDSTRING, 0, (LPARAM)"DX50");
# Line 887  Line 868 
868                  EnableDlgWindow(hDlg, IDC_MAXBFRAMES_S,  bvops);                  EnableDlgWindow(hDlg, IDC_MAXBFRAMES_S,  bvops);
869                  EnableDlgWindow(hDlg, IDC_BQUANTRATIO_S,        bvops);                  EnableDlgWindow(hDlg, IDC_BQUANTRATIO_S,        bvops);
870                  EnableDlgWindow(hDlg, IDC_BQUANTOFFSET_S,   bvops);                  EnableDlgWindow(hDlg, IDC_BQUANTOFFSET_S,   bvops);
871                  EnableDlgWindow(hDlg, IDC_PACKED,                  bvops && !(profiles[profile].flags & PROFILE_DXN));                  EnableDlgWindow(hDlg, IDC_PACKED,                  bvops && !(profiles[profile].flags & PROFILE_PACKED));
872    
873                    switch(profile) {
874                    case 0:
875                            {
876                                    HICON profile_icon = LoadImage(g_hInst, MAKEINTRESOURCE(IDI_MOBILE), IMAGE_ICON, 0, 0, 0);
877                                    SendDlgItemMessage(hDlg, IDC_PROFILE_LOGO, STM_SETIMAGE, IMAGE_ICON, (LPARAM)profile_icon);
878                            }
879                            break;
880                    case 1:
881                            {
882                                    HICON profile_icon = LoadImage(g_hInst, MAKEINTRESOURCE(IDI_HOME), IMAGE_ICON, 0, 0, 0);
883                                    SendDlgItemMessage(hDlg, IDC_PROFILE_LOGO, STM_SETIMAGE, IMAGE_ICON, (LPARAM)profile_icon);
884                            }
885                            break;
886                    case 2:
887                            {
888                                    HICON profile_icon = LoadImage(g_hInst, MAKEINTRESOURCE(IDI_HD720), IMAGE_ICON, 0, 0, 0);
889                                    SendDlgItemMessage(hDlg, IDC_PROFILE_LOGO, STM_SETIMAGE, IMAGE_ICON, (LPARAM)profile_icon);
890                            }
891                            break;
892                    case 3:
893                            {
894                                    HICON profile_icon = LoadImage(g_hInst, MAKEINTRESOURCE(IDI_HD1080), IMAGE_ICON, 0, 0, 0);
895                                    SendDlgItemMessage(hDlg, IDC_PROFILE_LOGO, STM_SETIMAGE, IMAGE_ICON, (LPARAM)profile_icon);
896                            }
897                            break;
898                    default:
899                            SendDlgItemMessage(hDlg, IDC_PROFILE_LOGO, STM_SETIMAGE, IMAGE_ICON, (LPARAM)NULL);
900                            break;
901                    }
902                    if (profile < 4)
903                            ShowWindow(GetDlgItem(hDlg, IDC_PROFILE_LABEL), SW_HIDE);
904                    else
905                            ShowWindow(GetDlgItem(hDlg, IDC_PROFILE_LABEL), SW_SHOW);
906                  break;                  break;
907    
908          case IDD_AR:          case IDD_AR:
# Line 955  Line 970 
970        EnableDlgWindow(hDlg, IDC_LEVEL_PEAKRATE_S, en_pr);        EnableDlgWindow(hDlg, IDC_LEVEL_PEAKRATE_S, en_pr);
971        EnableDlgWindow(hDlg, IDC_LEVEL_PEAKRATE,   en_pr);        EnableDlgWindow(hDlg, IDC_LEVEL_PEAKRATE,   en_pr);
972      }      }
973    
974                    switch(profile) {
975                    case 0:
976                            {
977                                    HICON profile_icon = LoadImage(g_hInst, MAKEINTRESOURCE(IDI_MOBILE), IMAGE_ICON, 0, 0, 0);
978                                    SendDlgItemMessage(hDlg, IDC_PROFILE_LOGO, STM_SETIMAGE, IMAGE_ICON, (LPARAM)profile_icon);
979                            }
980                            break;
981                    case 1:
982                            {
983                                    HICON profile_icon = LoadImage(g_hInst, MAKEINTRESOURCE(IDI_HOME), IMAGE_ICON, 0, 0, 0);
984                                    SendDlgItemMessage(hDlg, IDC_PROFILE_LOGO, STM_SETIMAGE, IMAGE_ICON, (LPARAM)profile_icon);
985                            }
986                            break;
987                    case 2:
988                            {
989                                    HICON profile_icon = LoadImage(g_hInst, MAKEINTRESOURCE(IDI_HD720), IMAGE_ICON, 0, 0, 0);
990                                    SendDlgItemMessage(hDlg, IDC_PROFILE_LOGO, STM_SETIMAGE, IMAGE_ICON, (LPARAM)profile_icon);
991                            }
992                            break;
993                    case 3:
994                            {
995                                    HICON profile_icon = LoadImage(g_hInst, MAKEINTRESOURCE(IDI_HD1080), IMAGE_ICON, 0, 0, 0);
996                                    SendDlgItemMessage(hDlg, IDC_PROFILE_LOGO, STM_SETIMAGE, IMAGE_ICON, (LPARAM)profile_icon);
997                            }
998                            break;
999                    default:
1000                            SendDlgItemMessage(hDlg, IDC_PROFILE_LOGO, STM_SETIMAGE, IMAGE_ICON, (LPARAM)NULL);
1001                            break;
1002                    }
1003                    if (profile < 4)
1004                            ShowWindow(GetDlgItem(hDlg, IDC_PROFILE_LABEL), SW_HIDE);
1005                    else
1006                            ShowWindow(GetDlgItem(hDlg, IDC_PROFILE_LABEL), SW_SHOW);
1007    
1008                  break;                  break;
1009    
1010          case IDD_BITRATE :          case IDD_BITRATE :
# Line 1104  Line 1154 
1154                  EnableDlgWindow(hDlg, IDC_CPU_MMXEXT,   cpu_force);                  EnableDlgWindow(hDlg, IDC_CPU_MMXEXT,   cpu_force);
1155                  EnableDlgWindow(hDlg, IDC_CPU_SSE,              cpu_force);                  EnableDlgWindow(hDlg, IDC_CPU_SSE,              cpu_force);
1156                  EnableDlgWindow(hDlg, IDC_CPU_SSE2,             cpu_force);                  EnableDlgWindow(hDlg, IDC_CPU_SSE2,             cpu_force);
1157                    EnableDlgWindow(hDlg, IDC_CPU_SSE3,             cpu_force);
1158                    EnableDlgWindow(hDlg, IDC_CPU_SSE4,     cpu_force);
1159                  EnableDlgWindow(hDlg, IDC_CPU_3DNOW,    cpu_force);                  EnableDlgWindow(hDlg, IDC_CPU_3DNOW,    cpu_force);
1160                  EnableDlgWindow(hDlg, IDC_CPU_3DNOWEXT, cpu_force);                  EnableDlgWindow(hDlg, IDC_CPU_3DNOWEXT, cpu_force);
1161                  break;                  break;
# Line 1120  Line 1172 
1172                  SendDlgItemMessage(hDlg, IDC_PROFILE_PROFILE, CB_SETCURSEL, config->profile, 0);                  SendDlgItemMessage(hDlg, IDC_PROFILE_PROFILE, CB_SETCURSEL, config->profile, 0);
1173    
1174                  SendDlgItemMessage(hDlg, IDC_QUANTTYPE, CB_SETCURSEL, config->quant_type, 0);                  SendDlgItemMessage(hDlg, IDC_QUANTTYPE, CB_SETCURSEL, config->quant_type, 0);
1175                  CheckDlg(hDlg, IDC_LUMMASK, config->lum_masking);                  SendDlgItemMessage(hDlg, IDC_LUMMASK, CB_SETCURSEL, config->lum_masking, 0);
1176                  CheckDlg(hDlg, IDC_INTERLACING, config->interlacing);                  CheckDlg(hDlg, IDC_INTERLACING, config->interlacing);
1177                  CheckDlg(hDlg, IDC_TFF, config->tff);                  CheckDlg(hDlg, IDC_TFF, config->tff);
1178                  CheckDlg(hDlg, IDC_QPEL, config->qpel);                  CheckDlg(hDlg, IDC_QPEL, config->qpel);
# Line 1255  Line 1307 
1307                  CheckDlg(hDlg, IDC_CPU_MMXEXT, (config->cpu & XVID_CPU_MMXEXT));                  CheckDlg(hDlg, IDC_CPU_MMXEXT, (config->cpu & XVID_CPU_MMXEXT));
1308                  CheckDlg(hDlg, IDC_CPU_SSE, (config->cpu & XVID_CPU_SSE));                  CheckDlg(hDlg, IDC_CPU_SSE, (config->cpu & XVID_CPU_SSE));
1309                  CheckDlg(hDlg, IDC_CPU_SSE2, (config->cpu & XVID_CPU_SSE2));                  CheckDlg(hDlg, IDC_CPU_SSE2, (config->cpu & XVID_CPU_SSE2));
1310                    CheckDlg(hDlg, IDC_CPU_SSE3, (config->cpu & XVID_CPU_SSE3));
1311                    CheckDlg(hDlg, IDC_CPU_SSE4, (config->cpu & XVID_CPU_SSE41));
1312                  CheckDlg(hDlg, IDC_CPU_3DNOW, (config->cpu & XVID_CPU_3DNOW));                  CheckDlg(hDlg, IDC_CPU_3DNOW, (config->cpu & XVID_CPU_3DNOW));
1313                  CheckDlg(hDlg, IDC_CPU_3DNOWEXT, (config->cpu & XVID_CPU_3DNOWEXT));                  CheckDlg(hDlg, IDC_CPU_3DNOWEXT, (config->cpu & XVID_CPU_3DNOWEXT));
1314    
# Line 1265  Line 1319 
1319    
1320    case IDD_ENC:    case IDD_ENC:
1321                  SetDlgItemInt(hDlg, IDC_NUMTHREADS, config->num_threads, FALSE);                  SetDlgItemInt(hDlg, IDC_NUMTHREADS, config->num_threads, FALSE);
1322                    if(profiles[config->profile].flags & PROFILE_XVID)
1323                            SendDlgItemMessage(hDlg, IDC_FOURCC, CB_SETCURSEL, 0, 0);
1324                    else
1325                  SendDlgItemMessage(hDlg, IDC_FOURCC, CB_SETCURSEL, config->fourcc_used, 0);                  SendDlgItemMessage(hDlg, IDC_FOURCC, CB_SETCURSEL, config->fourcc_used, 0);
1326                    EnableDlgWindow(hDlg, IDC_FOURCC, (!(profiles[config->profile].flags & PROFILE_XVID)));
1327                  CheckDlg(hDlg, IDC_VOPDEBUG, config->vop_debug);                  CheckDlg(hDlg, IDC_VOPDEBUG, config->vop_debug);
1328                  CheckDlg(hDlg, IDC_DISPLAY_STATUS, config->display_status);                  CheckDlg(hDlg, IDC_DISPLAY_STATUS, config->display_status);
1329                  break;                  break;
# Line 1294  Line 1352 
1352                  config->profile = SendDlgItemMessage(hDlg, IDC_PROFILE_PROFILE, CB_GETCURSEL, 0, 0);                  config->profile = SendDlgItemMessage(hDlg, IDC_PROFILE_PROFILE, CB_GETCURSEL, 0, 0);
1353    
1354                  config->quant_type = SendDlgItemMessage(hDlg, IDC_QUANTTYPE, CB_GETCURSEL, 0, 0);                  config->quant_type = SendDlgItemMessage(hDlg, IDC_QUANTTYPE, CB_GETCURSEL, 0, 0);
1355                  config->lum_masking = IsDlgChecked(hDlg, IDC_LUMMASK);                  config->lum_masking = SendDlgItemMessage(hDlg, IDC_LUMMASK, CB_GETCURSEL, 0, 0);
1356                  config->interlacing = IsDlgChecked(hDlg, IDC_INTERLACING);                  config->interlacing = IsDlgChecked(hDlg, IDC_INTERLACING);
1357                  config->tff = IsDlgChecked(hDlg, IDC_TFF);                  config->tff = IsDlgChecked(hDlg, IDC_TFF);
1358                  config->qpel = IsDlgChecked(hDlg, IDC_QPEL);                  config->qpel = IsDlgChecked(hDlg, IDC_QPEL);
# Line 1452  Line 1510 
1510                  config->cpu |= IsDlgChecked(hDlg, IDC_CPU_MMXEXT)   ? XVID_CPU_MMXEXT : 0;                  config->cpu |= IsDlgChecked(hDlg, IDC_CPU_MMXEXT)   ? XVID_CPU_MMXEXT : 0;
1511                  config->cpu |= IsDlgChecked(hDlg, IDC_CPU_SSE)    ? XVID_CPU_SSE : 0;                  config->cpu |= IsDlgChecked(hDlg, IDC_CPU_SSE)    ? XVID_CPU_SSE : 0;
1512                  config->cpu |= IsDlgChecked(hDlg, IDC_CPU_SSE2)  ? XVID_CPU_SSE2 : 0;                  config->cpu |= IsDlgChecked(hDlg, IDC_CPU_SSE2)  ? XVID_CPU_SSE2 : 0;
1513                    config->cpu |= IsDlgChecked(hDlg, IDC_CPU_SSE3)   ? XVID_CPU_SSE3 : 0;
1514                    config->cpu |= IsDlgChecked(hDlg, IDC_CPU_SSE4)     ? XVID_CPU_SSE41 : 0;
1515                  config->cpu |= IsDlgChecked(hDlg, IDC_CPU_3DNOW)        ? XVID_CPU_3DNOW : 0;                  config->cpu |= IsDlgChecked(hDlg, IDC_CPU_3DNOW)        ? XVID_CPU_3DNOW : 0;
1516                  config->cpu |= IsDlgChecked(hDlg, IDC_CPU_3DNOWEXT) ? XVID_CPU_3DNOWEXT : 0;                  config->cpu |= IsDlgChecked(hDlg, IDC_CPU_3DNOWEXT) ? XVID_CPU_3DNOWEXT : 0;
1517                  config->cpu |= IsDlgChecked(hDlg, IDC_CPU_FORCE)        ? XVID_CPU_FORCE : 0;                  config->cpu |= IsDlgChecked(hDlg, IDC_CPU_FORCE)        ? XVID_CPU_FORCE : 0;
# Line 1459  Line 1519 
1519      break;      break;
1520    
1521    case IDD_ENC :    case IDD_ENC :
1522                  config->num_threads = config_get_uint(hDlg, IDC_NUMTHREADS, config->num_threads);                  config->num_threads = min(4, config_get_uint(hDlg, IDC_NUMTHREADS, config->num_threads));
1523                    if(!(profiles[config->profile].flags & PROFILE_XVID))
1524                  config->fourcc_used = SendDlgItemMessage(hDlg, IDC_FOURCC, CB_GETCURSEL, 0, 0);                  config->fourcc_used = SendDlgItemMessage(hDlg, IDC_FOURCC, CB_GETCURSEL, 0, 0);
1525                  config->vop_debug = IsDlgChecked(hDlg, IDC_VOPDEBUG);                  config->vop_debug = IsDlgChecked(hDlg, IDC_VOPDEBUG);
1526                  config->display_status = IsDlgChecked(hDlg, IDC_DISPLAY_STATUS);                  config->display_status = IsDlgChecked(hDlg, IDC_DISPLAY_STATUS);
# Line 1480  Line 1541 
1541    
1542  /* advanced dialog proc */  /* advanced dialog proc */
1543    
1544  static BOOL CALLBACK adv_proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)  static INT_PTR CALLBACK adv_proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
1545  {  {
1546          PROPSHEETINFO *psi;          PROPSHEETINFO *psi;
1547    
1548          psi = (PROPSHEETINFO*)GetWindowLong(hDlg, GWL_USERDATA);          psi = (PROPSHEETINFO*)GetWindowLongPtr(hDlg, GWLP_USERDATA);
1549    
1550          switch (uMsg)          switch (uMsg)
1551          {          {
1552          case WM_INITDIALOG :          case WM_INITDIALOG :
1553                  psi = (PROPSHEETINFO*) ((LPPROPSHEETPAGE)lParam)->lParam;                  psi = (PROPSHEETINFO*) ((LPPROPSHEETPAGE)lParam)->lParam;
1554                  SetWindowLong(hDlg, GWL_USERDATA, (LPARAM)psi);                  SetWindowLongPtr(hDlg, GWLP_USERDATA, (LPARAM)psi);
1555    
1556                  if (g_hTooltip)                  if (g_hTooltip)
1557                          EnumChildWindows(hDlg, enum_tooltips, 0);                          EnumChildWindows(hDlg, enum_tooltips, 0);
# Line 1678  Line 1739 
1739                          DPRINTF("PSN_SET");                          DPRINTF("PSN_SET");
1740                          adv_upload(hDlg, psi->idd, psi->config);                          adv_upload(hDlg, psi->idd, psi->config);
1741                          adv_mode(hDlg, psi->idd, psi->config);                          adv_mode(hDlg, psi->idd, psi->config);
1742                          SetWindowLong(hDlg, DWL_MSGRESULT, FALSE);                          SetWindowLongPtr(hDlg, DWLP_MSGRESULT, FALSE);
1743                          break;                          break;
1744    
1745                  case PSN_KILLACTIVE :                  case PSN_KILLACTIVE :
1746                          DPRINTF("PSN_KILL");                          DPRINTF("PSN_KILL");
1747                          adv_download(hDlg, psi->idd, psi->config);                          adv_download(hDlg, psi->idd, psi->config);
1748                          SetWindowLong(hDlg, DWL_MSGRESULT, FALSE);                          SetWindowLongPtr(hDlg, DWLP_MSGRESULT, FALSE);
1749                          break;                          break;
1750    
1751                  case PSN_APPLY :                  case PSN_APPLY :
1752                          DPRINTF("PSN_APPLY");                          DPRINTF("PSN_APPLY");
1753                          psi->config->save = TRUE;                          psi->config->save = TRUE;
1754                          SetWindowLong(hDlg, DWL_MSGRESULT, FALSE);                          SetWindowLongPtr(hDlg, DWLP_MSGRESULT, FALSE);
1755                          break;                          break;
1756                  }                  }
1757                  break;                  break;
# Line 1744  Line 1805 
1805          psh.dwFlags = PSH_PROPSHEETPAGE | PSH_NOAPPLYNOW | PSH_NOCONTEXTHELP;          psh.dwFlags = PSH_PROPSHEETPAGE | PSH_NOAPPLYNOW | PSH_NOCONTEXTHELP;
1806          psh.hwndParent = hParent;          psh.hwndParent = hParent;
1807          psh.hInstance = g_hInst;          psh.hInstance = g_hInst;
1808          psh.pszCaption = (LPSTR) "XviD Configuration";          psh.pszCaption = (LPSTR) "Xvid Configuration";
1809          psh.nPages = size;          psh.nPages = size;
1810          psh.nStartPage = 0;          psh.nStartPage = 0;
1811          psh.ppsp = (LPCPROPSHEETPAGE)&psp;          psh.ppsp = (LPCPROPSHEETPAGE)&psp;
# Line 1911  Line 1972 
1972  static const int other_dlgs[] = { IDD_ENC, IDD_DEC, IDD_COMMON };  static const int other_dlgs[] = { IDD_ENC, IDD_DEC, IDD_COMMON };
1973    
1974    
1975  BOOL CALLBACK main_proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)  INT_PTR CALLBACK main_proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
1976  {  {
1977          CONFIG* config = (CONFIG*)GetWindowLong(hDlg, GWL_USERDATA);          CONFIG* config = (CONFIG*)GetWindowLongPtr(hDlg, GWLP_USERDATA);
1978          unsigned int i;          unsigned int i;
1979    
1980          switch (uMsg)          switch (uMsg)
1981          {          {
1982          case WM_INITDIALOG :          case WM_INITDIALOG :
1983                  SetWindowLong(hDlg, GWL_USERDATA, lParam);                  SetWindowLongPtr(hDlg, GWLP_USERDATA, lParam);
1984                  config = (CONFIG*)lParam;                  config = (CONFIG*)lParam;
1985    
1986                  for (i=0; i<sizeof(profiles)/sizeof(profile_t); i++)                  for (i=0; i<sizeof(profiles)/sizeof(profile_t); i++)
1987                          SendDlgItemMessage(hDlg, IDC_PROFILE, CB_ADDSTRING, 0, (LPARAM)profiles[i].name);                          SendDlgItemMessage(hDlg, IDC_PROFILE, CB_ADDSTRING, 0, (LPARAM)profiles[i].short_name);
1988    
1989                  SendDlgItemMessage(hDlg, IDC_MODE, CB_ADDSTRING, 0, (LPARAM)"Single pass");                  SendDlgItemMessage(hDlg, IDC_MODE, CB_ADDSTRING, 0, (LPARAM)"Single pass");
1990                  SendDlgItemMessage(hDlg, IDC_MODE, CB_ADDSTRING, 0, (LPARAM)"Twopass - 1st pass");                  SendDlgItemMessage(hDlg, IDC_MODE, CB_ADDSTRING, 0, (LPARAM)"Twopass - 1st pass");
# Line 1951  Line 2012 
2012                          EnumChildWindows(hDlg, enum_tooltips, 0);                          EnumChildWindows(hDlg, enum_tooltips, 0);
2013                  }                  }
2014    
2015                  SetClassLong(GetDlgItem(hDlg, IDC_BITRATE_S), GCL_HCURSOR, (LONG)LoadCursor(NULL, IDC_HAND));                  SetClassLongPtr(GetDlgItem(hDlg, IDC_BITRATE_S), GCLP_HCURSOR, (LONG_PTR)LoadCursor(NULL, IDC_HAND));
2016    
2017                  {                  {
2018                          DWORD ext_style = ListView_GetExtendedListViewStyle(GetDlgItem(hDlg,IDC_ZONES));                          DWORD ext_style = ListView_GetExtendedListViewStyle(GetDlgItem(hDlg,IDC_ZONES));
# Line 2224  Line 2285 
2285  /* LICENSE DIALOG ====================================================================== */  /* LICENSE DIALOG ====================================================================== */
2286  /* ===================================================================================== */  /* ===================================================================================== */
2287    
2288  static BOOL CALLBACK license_proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)  static INT_PTR CALLBACK license_proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
2289  {  {
2290          switch (uMsg)          switch (uMsg)
2291          {          {
# Line 2242  Line 2303 
2303                                          }                                          }
2304                                  }                                  }
2305                          }                          }
2306                          SetWindowLong(hDlg, GWL_USERDATA, (LONG)hGlobal);                          SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR)hGlobal);
2307                  }                  }
2308                  break;                  break;
2309    
2310          case WM_DESTROY :          case WM_DESTROY :
2311                  {                  {
2312                          HGLOBAL hGlobal = (HGLOBAL)GetWindowLong(hDlg, GWL_USERDATA);                          HGLOBAL hGlobal = (HGLOBAL)GetWindowLongPtr(hDlg, GWLP_USERDATA);
2313                          if (hGlobal) {                          if (hGlobal) {
2314                                  FreeResource(hGlobal);                                  FreeResource(hGlobal);
2315                          }                          }
# Line 2280  Line 2341 
2341  /* ABOUT DIALOG ======================================================================== */  /* ABOUT DIALOG ======================================================================== */
2342  /* ===================================================================================== */  /* ===================================================================================== */
2343    
2344  BOOL CALLBACK about_proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)  INT_PTR CALLBACK about_proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
2345  {  {
2346          switch (uMsg)          switch (uMsg)
2347          {          {
# Line 2293  Line 2354 
2354                          HINSTANCE m_hdll;                          HINSTANCE m_hdll;
2355    
2356                          SetDlgItemText(hDlg, IDC_BUILD, XVID_BUILD);                          SetDlgItemText(hDlg, IDC_BUILD, XVID_BUILD);
2357                          SetDlgItemText(hDlg, IDC_SPECIAL_BUILD, XVID_SPECIAL_BUILD);  #ifdef _WIN64
2358                            wsprintf(core, "(%s, 64-bit Edition)", XVID_SPECIAL_BUILD);
2359    #else
2360                            wsprintf(core, "(%s)", XVID_SPECIAL_BUILD);
2361    #endif
2362                            SetDlgItemText(hDlg, IDC_SPECIAL_BUILD, core);
2363    
2364                          memset(&info, 0, sizeof(info));                          memset(&info, 0, sizeof(info));
2365                          info.version = XVID_VERSION;                          info.version = XVID_VERSION;
# Line 2328  Line 2394 
2394                                  }                                  }
2395                          }                          }
2396    
2397                          SetClassLong(GetDlgItem(hDlg, IDC_WEBSITE), GCL_HCURSOR, (LONG)LoadCursor(NULL, IDC_HAND));                          SetClassLongPtr(GetDlgItem(hDlg, IDC_WEBSITE), GCLP_HCURSOR, (LONG_PTR)LoadCursor(NULL, IDC_HAND));
2398                          SetDlgItemText(hDlg, IDC_WEBSITE, XVID_WEBSITE);                          SetDlgItemText(hDlg, IDC_WEBSITE, XVID_WEBSITE);
2399                  }                  }
2400                  break;                  break;
# Line 2337  Line 2403 
2403                  {                  {
2404                          SetBkMode((HDC)wParam, TRANSPARENT) ;                          SetBkMode((HDC)wParam, TRANSPARENT) ;
2405                          SetTextColor((HDC)wParam, RGB(0x00,0x00,0xc0));                          SetTextColor((HDC)wParam, RGB(0x00,0x00,0xc0));
2406                          return (BOOL)GetStockObject(NULL_BRUSH);                          return (INT_PTR)GetStockObject(NULL_BRUSH);
2407                  }                  }
2408                  return 0;                  return 0;
2409    

Legend:
Removed from v.1649  
changed lines
  Added in v.1910

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4