169 |
{ |
{ |
170 |
DECODER *dec; |
DECODER *dec; |
171 |
|
|
172 |
if (XVID_MAJOR(create->version) != 1) /* v1.x.x */ |
if (XVID_VERSION_MAJOR(create->version) != 1) /* v1.x.x */ |
173 |
return XVID_ERR_VERSION; |
return XVID_ERR_VERSION; |
174 |
|
|
175 |
dec = xvid_malloc(sizeof(DECODER), CACHE_LINE); |
dec = xvid_malloc(sizeof(DECODER), CACHE_LINE); |
915 |
|
|
916 |
intra = (mb->mode == MODE_INTRA || mb->mode == MODE_INTRA_Q); |
intra = (mb->mode == MODE_INTRA || mb->mode == MODE_INTRA_Q); |
917 |
|
|
|
if (intra) { |
|
|
acpred_flag = BitstreamGetBit(bs); |
|
|
} |
|
|
|
|
918 |
if (gmc_warp && (mb->mode == MODE_INTER || mb->mode == MODE_INTER_Q)) |
if (gmc_warp && (mb->mode == MODE_INTER || mb->mode == MODE_INTER_Q)) |
|
{ |
|
919 |
mcsel = BitstreamGetBit(bs); |
mcsel = BitstreamGetBit(bs); |
920 |
} |
|
921 |
|
if (intra) |
922 |
|
acpred_flag = BitstreamGetBit(bs); |
923 |
|
|
924 |
cbpy = get_cbpy(bs, intra); |
cbpy = get_cbpy(bs, intra); |
925 |
DPRINTF(XVID_DEBUG_MB, "cbpy %i mcsel %i \n", cbpy,mcsel); |
DPRINTF(XVID_DEBUG_MB, "cbpy %i mcsel %i \n", cbpy,mcsel); |
1728 |
WARPPOINTS gmc_warp; |
WARPPOINTS gmc_warp; |
1729 |
int coding_type; |
int coding_type; |
1730 |
int success, output, seen_something; |
int success, output, seen_something; |
|
idctFuncPtr idct_save; |
|
1731 |
|
|
1732 |
if (XVID_MAJOR(frame->version) != 1 || (stats && XVID_MAJOR(stats->version) != 1)) /* v1.x.x */ |
if (XVID_VERSION_MAJOR(frame->version) != 1 || (stats && XVID_VERSION_MAJOR(stats->version) != 1)) /* v1.x.x */ |
1733 |
return XVID_ERR_VERSION; |
return XVID_ERR_VERSION; |
1734 |
|
|
1735 |
start_global_timer(); |
start_global_timer(); |
1773 |
success = 0; |
success = 0; |
1774 |
output = 0; |
output = 0; |
1775 |
seen_something = 0; |
seen_something = 0; |
|
idct_save = idct; |
|
1776 |
|
|
1777 |
repeat: |
repeat: |
1778 |
|
|
1814 |
|
|
1815 |
dec->p_bmv.x = dec->p_bmv.y = dec->p_fmv.y = dec->p_fmv.y = 0; /* init pred vector to 0 */ |
dec->p_bmv.x = dec->p_bmv.y = dec->p_fmv.y = dec->p_fmv.y = 0; /* init pred vector to 0 */ |
1816 |
|
|
|
#if defined(ARCH_IS_IA32) |
|
|
/* |
|
|
* /!\ Ugly hack /!\ |
|
|
* IA32: Prior to xvid bitstream 10, we were using Walten's mmx/xmm idct |
|
|
*/ |
|
|
if((idct == simple_idct_mmx) && (dec->bs_version < 10)) |
|
|
idct = idct_mmx; |
|
|
#endif |
|
|
|
|
1817 |
/* packed_mode: special-N_VOP treament */ |
/* packed_mode: special-N_VOP treament */ |
1818 |
if (dec->packed_mode && coding_type == N_VOP) |
if (dec->packed_mode && coding_type == N_VOP) |
1819 |
{ |
{ |
1942 |
emms(); |
emms(); |
1943 |
stop_global_timer(); |
stop_global_timer(); |
1944 |
|
|
|
idct = idct_save; |
|
|
|
|
1945 |
return BitstreamPos(&bs) / 8; /* number of bytes consumed */ |
return BitstreamPos(&bs) / 8; /* number of bytes consumed */ |
1946 |
} |
} |