386 |
frame.general |= XVID_HALFPEL; |
frame.general |= XVID_HALFPEL; |
387 |
// frame.general |= XVID_ME_EPZS; |
// frame.general |= XVID_ME_EPZS; |
388 |
|
|
389 |
|
frame.general |= XVID_HQACPRED; |
390 |
|
|
391 |
|
frame.bframe_threshold = 255; |
392 |
|
|
393 |
if (codec->config.motion_search > 4) |
if (codec->config.motion_search > 4) |
394 |
frame.general |= XVID_INTER4V; |
frame.general |= XVID_INTER4V; |
395 |
|
|
413 |
if (codec->config.reduced_resolution) |
if (codec->config.reduced_resolution) |
414 |
frame.general |= XVID_REDUCED; |
frame.general |= XVID_REDUCED; |
415 |
|
|
416 |
|
if (codec->config.chroma_opt) |
417 |
|
frame.general |= XVID_CHROMAOPT; |
418 |
// added by koepi for credits greyscale |
// added by koepi for credits greyscale |
419 |
|
|
420 |
check_greyscale_mode(&codec->config, &frame, codec->framenum); |
check_greyscale_mode(&codec->config, &frame, codec->framenum); |
463 |
|
|
464 |
frame.motion |= pmvfast_presets[codec->config.motion_search]; |
frame.motion |= pmvfast_presets[codec->config.motion_search]; |
465 |
|
|
466 |
|
switch (codec->config.vhq_mode) |
467 |
|
{ |
468 |
|
case VHQ_MODE_DECISION : |
469 |
|
frame.general |= XVID_MODEDECISION_BITS; |
470 |
|
break; |
471 |
|
|
472 |
|
case VHQ_LIMITED_SEARCH : |
473 |
|
frame.general |= XVID_MODEDECISION_BITS; |
474 |
|
frame.motion |= HALFPELREFINE16_BITS; |
475 |
|
frame.motion |= QUARTERPELREFINE16_BITS; |
476 |
|
break; |
477 |
|
|
478 |
|
case VHQ_MEDIUM_SEARCH : |
479 |
|
frame.general |= XVID_MODEDECISION_BITS; |
480 |
|
frame.motion |= HALFPELREFINE16_BITS; |
481 |
|
frame.motion |= HALFPELREFINE8_BITS; |
482 |
|
frame.motion |= QUARTERPELREFINE16_BITS; |
483 |
|
frame.motion |= QUARTERPELREFINE8_BITS; |
484 |
|
frame.motion |= CHECKPREDICTION_BITS; |
485 |
|
break; |
486 |
|
|
487 |
|
case VHQ_WIDE_SEARCH : |
488 |
|
frame.general |= XVID_MODEDECISION_BITS; |
489 |
|
frame.motion |= HALFPELREFINE16_BITS; |
490 |
|
frame.motion |= HALFPELREFINE8_BITS; |
491 |
|
frame.motion |= QUARTERPELREFINE16_BITS; |
492 |
|
frame.motion |= QUARTERPELREFINE8_BITS; |
493 |
|
frame.motion |= CHECKPREDICTION_BITS; |
494 |
|
frame.motion |= EXTSEARCH_BITS; |
495 |
|
break; |
496 |
|
|
497 |
|
default : |
498 |
|
break; |
499 |
|
} |
500 |
|
|
501 |
frame.image = icc->lpInput; |
frame.image = icc->lpInput; |
502 |
frame.stride = (((icc->lpbiInput->biWidth * icc->lpbiInput->biBitCount) + 31) & ~31) >> 3; |
frame.stride = (((icc->lpbiInput->biWidth * icc->lpbiInput->biBitCount) + 31) & ~31) >> 3; |
503 |
|
|
607 |
{ |
{ |
608 |
*icc->lpdwFlags = 0; |
*icc->lpdwFlags = 0; |
609 |
} |
} |
610 |
|
if (frame.length == 0) { frame.length = 1; *((unsigned char*)frame.bitstream) = 0x7f; } |
611 |
|
|
612 |
outhdr->biSizeImage = frame.length; |
outhdr->biSizeImage = frame.length; |
613 |
|
|