401 |
frame.general |= XVID_INTERLACING; |
frame.general |= XVID_INTERLACING; |
402 |
|
|
403 |
|
|
|
|
|
404 |
// added by koepi for credits greyscale |
// added by koepi for credits greyscale |
405 |
|
|
406 |
check_greyscale_mode(&codec->config, &frame, codec->framenum); |
check_greyscale_mode(&codec->config, &frame, codec->framenum); |
450 |
frame.motion = pmvfast_presets[codec->config.motion_search]; |
frame.motion = pmvfast_presets[codec->config.motion_search]; |
451 |
|
|
452 |
frame.image = icc->lpInput; |
frame.image = icc->lpInput; |
453 |
|
// dev-api-3 frame.stride = (((icc->lpbiInput->biWidth * icc->lpbiInput->biBitCount) + 31) & ~31) >> 3; |
454 |
|
|
455 |
if ((frame.colorspace = get_colorspace(inhdr)) == XVID_CSP_NULL) |
if ((frame.colorspace = get_colorspace(inhdr)) == XVID_CSP_NULL) |
456 |
return ICERR_BADFORMAT; |
return ICERR_BADFORMAT; |
608 |
{ |
{ |
609 |
return ICERR_ERROR; |
return ICERR_ERROR; |
610 |
} |
} |
611 |
|
/* --- yv12 --- */ |
612 |
|
if (inhdr->biCompression == FOURCC_YV12) { |
613 |
|
return ICERR_OK; |
614 |
|
} |
615 |
|
/* --- yv12 --- */ |
616 |
|
|
617 |
if (inhdr->biCompression != FOURCC_XVID && inhdr->biCompression != FOURCC_DIVX) |
if (inhdr->biCompression != FOURCC_XVID && inhdr->biCompression != FOURCC_DIVX) |
618 |
{ |
{ |
646 |
return sizeof(BITMAPINFOHEADER); |
return sizeof(BITMAPINFOHEADER); |
647 |
} |
} |
648 |
|
|
649 |
|
/* --- yv12 --- */ |
650 |
|
|
651 |
|
if (lpbiInput->bmiHeader.biCompression == FOURCC_YV12) { |
652 |
|
memcpy(outhdr, inhdr, sizeof(BITMAPINFOHEADER)); |
653 |
|
return ICERR_OK; |
654 |
|
} |
655 |
|
/* --- yv12 --- */ |
656 |
|
|
657 |
result = decompress_query(codec, lpbiInput, lpbiOutput); |
result = decompress_query(codec, lpbiInput, lpbiOutput); |
658 |
if (result != ICERR_OK) |
if (result != ICERR_OK) |
659 |
{ |
{ |
726 |
|
|
727 |
frame.image = icd->lpOutput; |
frame.image = icd->lpOutput; |
728 |
frame.stride = icd->lpbiOutput->biWidth; |
frame.stride = icd->lpbiOutput->biWidth; |
729 |
|
// dev-api-3: frame.stride = (((icd->lpbiOutput->biWidth * icd->lpbiOutput->biBitCount) + 31) & ~31) >> 3; |
730 |
|
|
731 |
|
/* --- yv12 --- */ |
732 |
|
if (icd->lpbiInput->biCompression == FOURCC_YV12) { |
733 |
|
DEBUGFOURCC("output", icd->lpbiOutput->biCompression); |
734 |
|
if (icd->lpbiOutput->biCompression == FOURCC_YV12) { |
735 |
|
memcpy(frame.image,codec->dhandle,icd->lpbiInput->biSizeImage); |
736 |
|
} |
737 |
|
return ICERR_OK; |
738 |
|
} |
739 |
|
/* --- yv12 --- */ |
740 |
|
|
741 |
|
|
742 |
if (~((icd->dwFlags & ICDECOMPRESS_HURRYUP) | (icd->dwFlags & ICDECOMPRESS_UPDATE) | (icd->dwFlags & ICDECOMPRESS_PREROLL))) |
if (~((icd->dwFlags & ICDECOMPRESS_HURRYUP) | (icd->dwFlags & ICDECOMPRESS_UPDATE) | (icd->dwFlags & ICDECOMPRESS_PREROLL))) |
743 |
{ |
{ |