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 |
if (codec->config.motion_search > 4) |
if (codec->config.motion_search > 4) |
392 |
frame.general |= XVID_INTER4V; |
frame.general |= XVID_INTER4V; |
393 |
|
|
406 |
frame.general |= XVID_GMC; |
frame.general |= XVID_GMC; |
407 |
|
|
408 |
if (codec->config.chromame) |
if (codec->config.chromame) |
409 |
frame.motion |= PMV_CHROMA16; |
frame.motion |= PMV_CHROMA16 + PMV_CHROMA8; |
410 |
|
|
411 |
if (codec->config.reduced_resolution) |
if (codec->config.reduced_resolution) |
412 |
frame.general |= XVID_REDUCED; |
frame.general |= XVID_REDUCED; |
413 |
|
|
414 |
|
if (codec->config.chroma_opt) |
415 |
|
frame.general |= XVID_CHROMAOPT; |
416 |
// added by koepi for credits greyscale |
// added by koepi for credits greyscale |
417 |
|
|
418 |
check_greyscale_mode(&codec->config, &frame, codec->framenum); |
check_greyscale_mode(&codec->config, &frame, codec->framenum); |
461 |
|
|
462 |
frame.motion |= pmvfast_presets[codec->config.motion_search]; |
frame.motion |= pmvfast_presets[codec->config.motion_search]; |
463 |
|
|
464 |
|
switch (codec->config.vhq_mode) |
465 |
|
{ |
466 |
|
case VHQ_MODE_DECISION : |
467 |
|
frame.general |= XVID_MODEDECISION_BITS; |
468 |
|
break; |
469 |
|
|
470 |
|
case VHQ_LIMITED_SEARCH : |
471 |
|
frame.general |= XVID_MODEDECISION_BITS; |
472 |
|
frame.motion |= HALFPELREFINE16_BITS; |
473 |
|
frame.motion |= QUARTERPELREFINE16_BITS; |
474 |
|
break; |
475 |
|
|
476 |
|
case VHQ_MEDIUM_SEARCH : |
477 |
|
frame.general |= XVID_MODEDECISION_BITS; |
478 |
|
frame.motion |= HALFPELREFINE16_BITS; |
479 |
|
frame.motion |= HALFPELREFINE8_BITS; |
480 |
|
frame.motion |= QUARTERPELREFINE16_BITS; |
481 |
|
frame.motion |= QUARTERPELREFINE8_BITS; |
482 |
|
frame.motion |= CHECKPREDICTION_BITS; |
483 |
|
break; |
484 |
|
|
485 |
|
case VHQ_WIDE_SEARCH : |
486 |
|
frame.general |= XVID_MODEDECISION_BITS; |
487 |
|
frame.motion |= HALFPELREFINE16_BITS; |
488 |
|
frame.motion |= HALFPELREFINE8_BITS; |
489 |
|
frame.motion |= QUARTERPELREFINE16_BITS; |
490 |
|
frame.motion |= QUARTERPELREFINE8_BITS; |
491 |
|
frame.motion |= CHECKPREDICTION_BITS; |
492 |
|
frame.motion |= EXTSEARCH_BITS; |
493 |
|
break; |
494 |
|
|
495 |
|
default : |
496 |
|
break; |
497 |
|
} |
498 |
|
|
499 |
frame.image = icc->lpInput; |
frame.image = icc->lpInput; |
500 |
frame.stride = (((icc->lpbiInput->biWidth * icc->lpbiInput->biBitCount) + 31) & ~31) >> 3; |
frame.stride = (((icc->lpbiInput->biWidth * icc->lpbiInput->biBitCount) + 31) & ~31) >> 3; |
501 |
|
|
700 |
} |
} |
701 |
/* --- yv12 --- */ |
/* --- yv12 --- */ |
702 |
|
|
703 |
result = decompress_query(codec, lpbiInput, lpbiOutput); |
result = decompress_query(codec, lpbiInput, NULL); |
704 |
if (result != ICERR_OK) |
if (result != ICERR_OK) |
705 |
{ |
{ |
706 |
return result; |
return result; |
707 |
} |
} |
708 |
|
|
|
memcpy(outhdr, inhdr, sizeof(BITMAPINFOHEADER)); |
|
709 |
outhdr->biSize = sizeof(BITMAPINFOHEADER); |
outhdr->biSize = sizeof(BITMAPINFOHEADER); |
710 |
outhdr->biCompression = FOURCC_YUY2; |
outhdr->biWidth = inhdr->biWidth; |
711 |
|
outhdr->biHeight = inhdr->biHeight; |
712 |
|
outhdr->biPlanes = 1; |
713 |
|
outhdr->biBitCount = 24; |
714 |
|
outhdr->biCompression = BI_RGB; /* sonic foundry vegas video v3 only supports BI_RGB */ |
715 |
outhdr->biSizeImage = outhdr->biWidth * outhdr->biHeight * outhdr->biBitCount; |
outhdr->biSizeImage = outhdr->biWidth * outhdr->biHeight * outhdr->biBitCount; |
716 |
outhdr->biXPelsPerMeter = 0; |
outhdr->biXPelsPerMeter = 0; |
717 |
outhdr->biYPelsPerMeter = 0; |
outhdr->biYPelsPerMeter = 0; |