[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 1437, Sun Apr 18 07:55:11 2004 UTC revision 1500, Fri Jul 16 19:56:13 2004 UTC
# Line 169  Line 169 
169  } named_int_t;  } named_int_t;
170    
171    
172  #define NO_AUDIO        5  #define NO_AUDIO        7
173  static const named_int_t audio_type_list[] = {  static const named_int_t audio_type_list[] = {
174          {       "MP3-CBR",              1000,   48000/1152/6                                    },          {       "MP3-CBR",              1000,   48000/1152/6                                    },
175          {       "MP3-VBR",                24,   48000/1152/6                                    },          {       "MP3-VBR",                24,   48000/1152/6                                    },
176          {       "OGG",     /*?*/1000,   48000*(0.7F/1024 + 0.3F/180)    },          {       "OGG",     /*?*/1000,   48000*(0.7F/1024 + 0.3F/180)    },
177          {       "AC3",                    64,   48000/1536/6                                    },          {       "AC3",                    64,   48000/1536/6                                    },
178          {       "DTS",                    21,   /*?*/48000/1152/6                               },          {       "DTS",                    21,   /*?*/48000/1152/6                               },
179            {       "AAC",                    21,   48000/1024/6                                    },
180            {       "HE-AAC",                 42,   48000/1024/6                                    },
181          {       "(None)",                  0,   0                                                               },          {       "(None)",                  0,   0                                                               },
182  };  };
183    
# Line 198  Line 200 
200          {"quant_type",                          &reg.quant_type,                                0},          {"quant_type",                          &reg.quant_type,                                0},
201          {"lum_masking",                         &reg.lum_masking,                               0},          {"lum_masking",                         &reg.lum_masking,                               0},
202          {"interlacing",                         &reg.interlacing,                               0},          {"interlacing",                         &reg.interlacing,                               0},
203            {"tff",                                         &reg.tff,                                               0},
204          {"qpel",                                        &reg.qpel,                                              0},          {"qpel",                                        &reg.qpel,                                              0},
205          {"gmc",                                         &reg.gmc,                                               0},          {"gmc",                                         &reg.gmc,                                               0},
206          {"reduced_resolution",          &reg.reduced_resolution,                0},          {"reduced_resolution",          &reg.reduced_resolution,                0},
# Line 839  Line 842 
842                  EnableDlgWindow(hDlg, IDC_QUANTMATRIX, custom_quant);                  EnableDlgWindow(hDlg, IDC_QUANTMATRIX, custom_quant);
843                  EnableDlgWindow(hDlg, IDC_LUMMASK, profiles[profile].flags&PROFILE_ADAPTQUANT);                  EnableDlgWindow(hDlg, IDC_LUMMASK, profiles[profile].flags&PROFILE_ADAPTQUANT);
844                  EnableDlgWindow(hDlg, IDC_INTERLACING, profiles[profile].flags&PROFILE_INTERLACE);                  EnableDlgWindow(hDlg, IDC_INTERLACING, profiles[profile].flags&PROFILE_INTERLACE);
845                    EnableDlgWindow(hDlg, IDC_TFF, IsDlgChecked(hDlg, IDC_INTERLACING));
846                  EnableDlgWindow(hDlg, IDC_QPEL, profiles[profile].flags&PROFILE_QPEL);                  EnableDlgWindow(hDlg, IDC_QPEL, profiles[profile].flags&PROFILE_QPEL);
847                  EnableDlgWindow(hDlg, IDC_GMC, profiles[profile].flags&PROFILE_GMC);                  EnableDlgWindow(hDlg, IDC_GMC, profiles[profile].flags&PROFILE_GMC);
848                  EnableDlgWindow(hDlg, IDC_REDUCED, profiles[profile].flags&PROFILE_REDUCED);                  EnableDlgWindow(hDlg, IDC_REDUCED, profiles[profile].flags&PROFILE_REDUCED);
# Line 935  Line 939 
939                          /* step 2: calculate audio_size (kbytes)*/                          /* step 2: calculate audio_size (kbytes)*/
940                          if (audio_type!=NO_AUDIO) {                          if (audio_type!=NO_AUDIO) {
941                                  if (audio_mode==0) {                                  if (audio_mode==0) {
942                                          audio_size = (duration * audio_rate) / 8;                                          audio_size = (int)( (1000.0 * duration * audio_rate) / (8.0*1024) );
943                                            SetDlgItemInt(hDlg, IDC_BITRATE_ASIZE, audio_size, TRUE);
944                                    }else{
945                                            int tmp_rate = (int)( (audio_size * 8.0 * 1024) / (1000.0 * duration) );
946                                            SetDlgItemInt(hDlg, IDC_BITRATE_ARATE, tmp_rate, TRUE);
947                                  }                                  }
948                          }else{                          }else{
949                                  audio_size = 0;                                  audio_size = 0;
# Line 975  Line 983 
983                                  overhead /= 1024;                                  overhead /= 1024;
984                                  break;                                  break;
985    
986                          case 3 :        /* OGM: inaccurate model */                          case 3 :        /* alexnoe formula */
987                                  overhead = (int)(0.0039F * (target_size - subtitle_size));                                  overhead = (int)( (target_size - subtitle_size) * (28.0/4224.0 + (1.0/255.0)) );
988                                  break;                                  break;
989    
990                          default :       /* (none) */                          default :       /* (none) */
# Line 1048  Line 1056 
1056                  SendDlgItemMessage(hDlg, IDC_QUANTTYPE, CB_SETCURSEL, config->quant_type, 0);                  SendDlgItemMessage(hDlg, IDC_QUANTTYPE, CB_SETCURSEL, config->quant_type, 0);
1057                  CheckDlg(hDlg, IDC_LUMMASK, config->lum_masking);                  CheckDlg(hDlg, IDC_LUMMASK, config->lum_masking);
1058                  CheckDlg(hDlg, IDC_INTERLACING, config->interlacing);                  CheckDlg(hDlg, IDC_INTERLACING, config->interlacing);
1059                    CheckDlg(hDlg, IDC_TFF, config->tff);
1060                  CheckDlg(hDlg, IDC_QPEL, config->qpel);                  CheckDlg(hDlg, IDC_QPEL, config->qpel);
1061                  CheckDlg(hDlg, IDC_GMC, config->gmc);                  CheckDlg(hDlg, IDC_GMC, config->gmc);
1062                  CheckDlg(hDlg, IDC_REDUCED, config->reduced_resolution);                  CheckDlg(hDlg, IDC_REDUCED, config->reduced_resolution);
# Line 1194  Line 1203 
1203                  config->quant_type = SendDlgItemMessage(hDlg, IDC_QUANTTYPE, CB_GETCURSEL, 0, 0);                  config->quant_type = SendDlgItemMessage(hDlg, IDC_QUANTTYPE, CB_GETCURSEL, 0, 0);
1204                  config->lum_masking = IsDlgChecked(hDlg, IDC_LUMMASK);                  config->lum_masking = IsDlgChecked(hDlg, IDC_LUMMASK);
1205                  config->interlacing = IsDlgChecked(hDlg, IDC_INTERLACING);                  config->interlacing = IsDlgChecked(hDlg, IDC_INTERLACING);
1206                    config->tff = IsDlgChecked(hDlg, IDC_TFF);
1207                  config->qpel = IsDlgChecked(hDlg, IDC_QPEL);                  config->qpel = IsDlgChecked(hDlg, IDC_QPEL);
1208                  config->gmc = IsDlgChecked(hDlg, IDC_GMC);                  config->gmc = IsDlgChecked(hDlg, IDC_GMC);
1209                  config->reduced_resolution = IsDlgChecked(hDlg, IDC_REDUCED);                  config->reduced_resolution = IsDlgChecked(hDlg, IDC_REDUCED);
# Line 1396  Line 1406 
1406                  {                  {
1407                          switch (LOWORD(wParam))                          switch (LOWORD(wParam))
1408                          {                          {
1409                            case IDC_INTERLACING :
1410                          case IDC_BVOP :                          case IDC_BVOP :
1411                          case IDC_ZONE_MODE_WEIGHT :                          case IDC_ZONE_MODE_WEIGHT :
1412                          case IDC_ZONE_MODE_QUANT :                          case IDC_ZONE_MODE_QUANT :
# Line 1420  Line 1431 
1431    
1432                                  ofn.hwndOwner = hDlg;                                  ofn.hwndOwner = hDlg;
1433                                  if (LOWORD(wParam)==IDC_BITRATE_SSELECT) {                                  if (LOWORD(wParam)==IDC_BITRATE_SSELECT) {
1434                                          ofn.lpstrFilter = "Subtitle files (*.sub, *.ssa)\0*.sub;*.ssa\0All files (*.*)\0*.*\0\0";                                          ofn.lpstrFilter = "Subtitle files (*.sub, *.ssa, *.txt, *.dat)\0*.sub;*.ssa;*.txt;*.dat\0All files (*.*)\0*.*\0\0";
1435                                  }else{                                  }else{
1436                                          ofn.lpstrFilter = "Audio files (*.mp3, *.ac3)\0*.mp3; *.ac3\0All files (*.*)\0*.*\0\0";                                          ofn.lpstrFilter = "Audio files (*.mp3, *.ac3, *.aac, *.ogg, *.wav)\0*.mp3; *.ac3; *.aac; *.ogg; *.wav\0All files (*.*)\0*.*\0\0";
1437                                  }                                  }
1438    
1439                                  ofn.lpstrFile = filename;                                  ofn.lpstrFile = filename;
# Line 2012  Line 2023 
2023    
2024                          case IDC_DEFAULTS :                          case IDC_DEFAULTS :
2025                                  config_reg_default(config);                                  config_reg_default(config);
2026                                    SendDlgItemMessage(hDlg, IDC_PROFILE, CB_SETCURSEL, config->profile, 0);
2027                                    SendDlgItemMessage(hDlg, IDC_MODE, CB_SETCURSEL, config->mode, 0);
2028                                  main_mode(hDlg, config);                                  main_mode(hDlg, config);
2029                                  main_upload(hDlg, config);                                  main_upload(hDlg, config);
2030                                  break;                                  break;

Legend:
Removed from v.1437  
changed lines
  Added in v.1500

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