849 |
return ICERR_OK; |
return ICERR_OK; |
850 |
} |
} |
851 |
|
|
852 |
|
#define REG_GET_N(X, Y, Z) { int size=sizeof(int);if(RegQueryValueEx(hKey, X, 0, 0, (LPBYTE)&Y, &size) != ERROR_SUCCESS) {Y=Z;} } |
853 |
|
|
854 |
LRESULT decompress_begin(CODEC * codec, BITMAPINFO * lpbiInput, BITMAPINFO * lpbiOutput) |
LRESULT decompress_begin(CODEC * codec, BITMAPINFO * lpbiInput, BITMAPINFO * lpbiOutput) |
855 |
{ |
{ |
856 |
xvid_gbl_init_t init; |
xvid_gbl_init_t init; |
857 |
xvid_dec_create_t create; |
xvid_dec_create_t create; |
858 |
|
HKEY hKey; |
859 |
|
|
860 |
if (init_dll() != 0) return ICERR_ERROR; |
if (init_dll() != 0) return ICERR_ERROR; |
861 |
|
|
886 |
|
|
887 |
codec->dhandle = create.handle; |
codec->dhandle = create.handle; |
888 |
|
|
889 |
|
RegOpenKeyEx(XVID_REG_KEY, XVID_REG_PARENT "\\" XVID_REG_CHILD, 0, KEY_READ, &hKey); |
890 |
|
|
891 |
|
REG_GET_N("Deblock_Y", pp_dy, 0) |
892 |
|
REG_GET_N("Deblock_UV", pp_duv, 0) |
893 |
|
REG_GET_N("Dering", pp_dr, 0) |
894 |
|
REG_GET_N("FilmEffect", pp_fe, 0) |
895 |
|
|
896 |
|
RegCloseKey(hKey); |
897 |
|
|
898 |
return ICERR_OK; |
return ICERR_OK; |
899 |
} |
} |
900 |
|
|
985 |
frame.output.csp = XVID_CSP_NULL; |
frame.output.csp = XVID_CSP_NULL; |
986 |
} |
} |
987 |
|
|
988 |
|
if (pp_dy)frame.general |= XVID_DEBLOCKY; |
989 |
|
if (pp_duv) frame.general |= XVID_DEBLOCKUV; |
990 |
|
/* if (pp_dr) frame.general |= XVID_DERING; */ |
991 |
|
if (pp_fe) frame.general |= XVID_FILMEFFECT; |
992 |
|
|
993 |
switch (xvid_decore_func(codec->dhandle, XVID_DEC_DECODE, &frame, NULL)) |
switch (xvid_decore_func(codec->dhandle, XVID_DEC_DECODE, &frame, NULL)) |
994 |
{ |
{ |
995 |
case XVID_ERR_FAIL : |
case XVID_ERR_FAIL : |