23 |
* |
* |
24 |
* History: |
* History: |
25 |
* |
* |
26 |
|
* 12.07.2002 num_threads |
27 |
* 23.06.2002 XVID_CPU_CHKONLY; loading speed up |
* 23.06.2002 XVID_CPU_CHKONLY; loading speed up |
28 |
* 25.04.2002 ICDECOMPRESS_PREROLL |
* 25.04.2002 ICDECOMPRESS_PREROLL |
29 |
* 17.04.2002 re-enabled lumi masking for 1st pass |
* 17.04.2002 re-enabled lumi masking for 1st pass |
295 |
param.max_quantizer = codec->config.max_pquant; |
param.max_quantizer = codec->config.max_pquant; |
296 |
param.max_key_interval = codec->config.max_key_interval; |
param.max_key_interval = codec->config.max_key_interval; |
297 |
|
|
298 |
|
#ifdef _SMP |
299 |
|
param.num_threads = codec->config.num_threads; |
300 |
|
#endif |
301 |
|
|
302 |
#ifdef BFRAMES |
#ifdef BFRAMES |
303 |
param.global = 0; |
param.global = 0; |
304 |
if (codec->config.packed) param.global |= XVID_GLOBAL_PACKED; |
if (codec->config.packed) param.global |= XVID_GLOBAL_PACKED; |
306 |
if (codec->config.debug) param.global |= XVID_GLOBAL_DEBUG; |
if (codec->config.debug) param.global |= XVID_GLOBAL_DEBUG; |
307 |
param.max_bframes = codec->config.max_bframes; |
param.max_bframes = codec->config.max_bframes; |
308 |
param.bquant_ratio = codec->config.bquant_ratio; |
param.bquant_ratio = codec->config.bquant_ratio; |
309 |
|
param.frame_drop_ratio = codec->config.frame_drop_ratio; |
310 |
#endif |
#endif |
311 |
|
|
312 |
switch(xvid_encore(0, XVID_ENC_CREATE, ¶m, NULL)) |
switch(xvid_encore(0, XVID_ENC_CREATE, ¶m, NULL)) |
394 |
|
|
395 |
if (codec->config.interlacing) |
if (codec->config.interlacing) |
396 |
frame.general |= XVID_INTERLACING; |
frame.general |= XVID_INTERLACING; |
397 |
|
|
398 |
|
// added by koepi for gruel's greyscale_mode |
399 |
|
if (codec->config.greyscale) |
400 |
|
frame.general |= XVID_GREYSCALE; |
401 |
|
|
402 |
|
// end of koepi's addition |
403 |
|
|
404 |
// fix 1pass modes/hinted MV by koepi |
// fix 1pass modes/hinted MV by koepi |
405 |
if (codec->config.hinted_me && (codec->config.mode == DLG_MODE_CBR || codec->config.mode == DLG_MODE_VBR_QUAL || codec->config.mode == DLG_MODE_VBR_QUANT)) |
if (codec->config.hinted_me && (codec->config.mode == DLG_MODE_CBR || codec->config.mode == DLG_MODE_VBR_QUAL || codec->config.mode == DLG_MODE_VBR_QUANT)) |
406 |
{ |
{ |
523 |
frame.intra = 0; |
frame.intra = 0; |
524 |
} |
} |
525 |
|
|
526 |
OutputDebugString(" "); |
#ifdef BFRAMES |
527 |
|
frame.bquant = 0; |
528 |
|
#endif |
529 |
|
|
530 |
|
// OutputDebugString(" "); |
531 |
switch (xvid_encore(codec->ehandle, XVID_ENC_ENCODE, &frame, &stats)) |
switch (xvid_encore(codec->ehandle, XVID_ENC_ENCODE, &frame, &stats)) |
532 |
{ |
{ |
533 |
case XVID_ERR_FAIL : |
case XVID_ERR_FAIL : |