451 |
frame.motion = pmvfast_presets[codec->config.motion_search]; |
frame.motion = pmvfast_presets[codec->config.motion_search]; |
452 |
|
|
453 |
frame.image = icc->lpInput; |
frame.image = icc->lpInput; |
454 |
|
// dev-api-3 |
455 |
|
frame.stride = (((icc->lpbiInput->biWidth * icc->lpbiInput->biBitCount) + 31) & ~31) >> 3; |
456 |
|
|
457 |
if ((frame.colorspace = get_colorspace(inhdr)) == XVID_CSP_NULL) |
if ((frame.colorspace = get_colorspace(inhdr)) == XVID_CSP_NULL) |
458 |
return ICERR_BADFORMAT; |
return ICERR_BADFORMAT; |
610 |
{ |
{ |
611 |
return ICERR_ERROR; |
return ICERR_ERROR; |
612 |
} |
} |
613 |
|
/* --- yv12 --- */ |
614 |
|
if (inhdr->biCompression == FOURCC_YV12) { |
615 |
|
return ICERR_OK; |
616 |
|
} |
617 |
|
/* --- yv12 --- */ |
618 |
|
|
619 |
if (inhdr->biCompression != FOURCC_XVID && inhdr->biCompression != FOURCC_DIVX) |
if (inhdr->biCompression != FOURCC_XVID && inhdr->biCompression != FOURCC_DIVX) |
620 |
{ |
{ |
648 |
return sizeof(BITMAPINFOHEADER); |
return sizeof(BITMAPINFOHEADER); |
649 |
} |
} |
650 |
|
|
651 |
|
/* --- yv12 --- */ |
652 |
|
|
653 |
|
if (lpbiInput->bmiHeader.biCompression == FOURCC_YV12) { |
654 |
|
memcpy(outhdr, inhdr, sizeof(BITMAPINFOHEADER)); |
655 |
|
return ICERR_OK; |
656 |
|
} |
657 |
|
/* --- yv12 --- */ |
658 |
|
|
659 |
result = decompress_query(codec, lpbiInput, lpbiOutput); |
result = decompress_query(codec, lpbiInput, lpbiOutput); |
660 |
if (result != ICERR_OK) |
if (result != ICERR_OK) |
661 |
{ |
{ |
727 |
frame.length = icd->lpbiInput->biSizeImage; |
frame.length = icd->lpbiInput->biSizeImage; |
728 |
|
|
729 |
frame.image = icd->lpOutput; |
frame.image = icd->lpOutput; |
730 |
frame.stride = icd->lpbiOutput->biWidth; |
//frame.stride = icd->lpbiOutput->biWidth; |
731 |
|
// dev-api-3: |
732 |
|
frame.stride = (((icd->lpbiOutput->biWidth * icd->lpbiOutput->biBitCount) + 31) & ~31) >> 3; |
733 |
|
|
734 |
|
/* --- yv12 --- */ |
735 |
|
if (icd->lpbiInput->biCompression == FOURCC_YV12) { |
736 |
|
DEBUGFOURCC("output", icd->lpbiOutput->biCompression); |
737 |
|
if (icd->lpbiOutput->biCompression == FOURCC_YV12) { |
738 |
|
memcpy(frame.image,codec->dhandle,icd->lpbiInput->biSizeImage); |
739 |
|
} |
740 |
|
return ICERR_OK; |
741 |
|
} |
742 |
|
/* --- yv12 --- */ |
743 |
|
|
744 |
|
|
745 |
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))) |
746 |
{ |
{ |