[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 1914, Tue Dec 21 16:56:42 2010 UTC revision 1915, Tue Dec 21 20:23:07 2010 UTC
# Line 19  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.42 2010-12-21 16:56:42 Isibaar Exp $   * $Id: config.c,v 1.43 2010-12-21 20:23:06 Isibaar Exp $
23   *   *
24   *************************************************************************/   *************************************************************************/
25    
# Line 125  Line 125 
125    { "MPEG4 Advanced Simple @ L4", "MPEG4 ASP @ 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    { "MPEG4 Advanced Simple @ L5", "MPEG4 ASP @ 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 },
127    
128    { "(unrestricted)", "(unrestricted)",  0x00,    0,   0,  0,  0,    0,    0,      0, 100,   0*16368,    -1,       0,        0, -1, 0xffffffff & ~(PROFILE_EXTRA | PROFILE_PACKED)},    { "(unrestricted)", "(unrestricted)",  0x00,    0,   0,  0,  0,    0,    0,      0, 100,   0*16368,    -1,       0,        0, -1, 0xffffffff & ~(PROFILE_EXTRA | PROFILE_PACKED | PROFILE_XVID)},
129  };  };
130    
131    
132  const quality_t quality_table[] =  const quality_t quality_table[] =
133  {  {
134      /* name                 |  m  vhq  bf cme  tbo  kfi  fdr  | iquant pquant bquant trellis */      /* name                 |  m  vhq mtc bf cme  tbo  kfi  fdr  | iquant pquant bquant trellis */
135    { "Real-time",               1,  0,  0,  0,  0,  300,  0,     1, 31, 1, 31, 1, 31,   0   },    { "Real-time",               1,  0,  0,  0,  0,  0,  300,  0,     1, 31, 1, 31, 1, 31,   0   },
136    { QUALITY_GENERAL_STRING,    6,  1,  0,  1,  0,  300,  0,     1, 31, 1, 31, 1, 31,   1   },    { QUALITY_GENERAL_STRING,    6,  1,  0,  0,  1,  0,  300,  0,     1, 31, 1, 31, 1, 31,   1   },
137  };  };
138    
139  const int quality_table_num = sizeof(quality_table)/sizeof(quality_t);  const int quality_table_num = sizeof(quality_table)/sizeof(quality_t);
# Line 201  Line 201 
201          {"bquant_ratio",                        &reg.bquant_ratio,                              150},   /* 100-base float */          {"bquant_ratio",                        &reg.bquant_ratio,                              150},   /* 100-base float */
202          {"bquant_offset",                       &reg.bquant_offset,                             100},   /* 100-base float */          {"bquant_offset",                       &reg.bquant_offset,                             100},   /* 100-base float */
203          {"packed",                                      &reg.packed,                                    1},          {"packed",                                      &reg.packed,                                    1},
204            {"num_slices",                          &reg.num_slices,                                1},
205    
206          /* aspect ratio */          /* aspect ratio */
207          {"ar_mode",                                     &reg.ar_mode,                                   0},          {"ar_mode",                                     &reg.ar_mode,                                   0},
# Line 252  Line 253 
253          {"vhq_bframe",                          &reg.quality_user.vhq_bframe,                           0},          {"vhq_bframe",                          &reg.quality_user.vhq_bframe,                           0},
254          {"chromame",                            &reg.quality_user.chromame,                                     1},          {"chromame",                            &reg.quality_user.chromame,                                     1},
255          {"turbo",                                       &reg.quality_user.turbo,                                                0},          {"turbo",                                       &reg.quality_user.turbo,                                                0},
256          {"max_key_interval",            &reg.quality_user.max_key_interval,                     300},          {"max_key_interval",            &reg.quality_user.max_key_interval,                     250},
257          {"frame_drop_ratio",            &reg.quality_user.frame_drop_ratio,                     0},          {"frame_drop_ratio",            &reg.quality_user.frame_drop_ratio,                     0},
258    
259          /* quant */          /* quant */
# Line 269  Line 270 
270          {"debug",                                       &reg.debug,                                             0x0},          {"debug",                                       &reg.debug,                                             0x0},
271          {"vop_debug",                           &reg.vop_debug,                                 0},          {"vop_debug",                           &reg.vop_debug,                                 0},
272          {"display_status",                      &reg.display_status,                    1},          {"display_status",                      &reg.display_status,                    1},
273            {"cpu_flags",                           &reg.cpu,                                               0},
274    
275          /* smp */          /* smp */
276          {"num_threads",                         &reg.num_threads,                               0},          {"num_threads",                         &reg.num_threads,                               0},
         {"num_slices",                          &reg.num_slices,                                1},  
277    
278          /* decoder, shared with dshow */          /* decoder, shared with dshow */
279          {"Brightness",                          &pp_brightness,                                 0},          {"Brightness",                          &pp_brightness,                                 0},
# Line 353  Line 354 
354                  FreeLibrary(m_hdll);                  FreeLibrary(m_hdll);
355          }          }
356    
         reg.cpu = info.cpu_flags;  
         reg.num_threads = info.num_threads;  
   
357          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);
358    
359          /* read integer values */          /* read integer values */
# Line 420  Line 418 
418                  memcpy(&config->zones[i], &stmp, sizeof(zone_t));                  memcpy(&config->zones[i], &stmp, sizeof(zone_t));
419          }          }
420    
421          if (config->num_threads == 0)          if (!(config->cpu&XVID_CPU_FORCE)) {
422                  config->num_threads = info.num_threads; /* old autodetect */                  config->cpu = info.cpu_flags;
423                    config->num_threads = info.num_threads; /* autodetect */
424            }
425    
426          RegCloseKey(hKey);          RegCloseKey(hKey);
427  }  }

Legend:
Removed from v.1914  
changed lines
  Added in v.1915

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