# HG changeset patch # User mellum # Date 1025739032 0 # Node ID 86f73263a61cd0c49647df26265a73435ac87255 # Parent c9f724e3a7976db783e05927146edfd6d6ca437c Make dct_unquantize_h263 work on systems without MVI extension. diff -r c9f724e3a797 -r 86f73263a61c alpha/mpegvideo_alpha.c --- a/alpha/mpegvideo_alpha.c Wed Jul 03 03:01:06 2002 +0000 +++ b/alpha/mpegvideo_alpha.c Wed Jul 03 23:30:32 2002 +0000 @@ -23,7 +23,7 @@ extern UINT8 zigzag_end[64]; -static void dct_unquantize_h263_mvi(MpegEncContext *s, DCTELEM *block, +static void dct_unquantize_h263_axp(MpegEncContext *s, DCTELEM *block, int n, int qscale) { int i, n_coeffs; @@ -32,8 +32,6 @@ DCTELEM *orig_block = block; DCTELEM block0; - ASM_ACCEPT_MVI; - if (s->mb_intra) { if (!s->h263_aic) { if (n < 4) @@ -58,8 +56,17 @@ if (levels == 0) continue; +#ifdef __alpha_max__ + /* I don't think the speed difference justifies runtime + detection. */ + ASM_ACCEPT_MVI; negmask = maxsw4(levels, -1); /* negative -> ffff (-1) */ negmask = minsw4(negmask, 0); /* positive -> 0000 (0) */ +#else + negmask = cmpbge(WORD_VEC(0x7fff), levels); + negmask &= (negmask >> 1) | (1 << 7); + negmask = zap(-1, negmask); +#endif zeros = cmpbge(0, levels); zeros &= zeros >> 1; @@ -86,7 +93,5 @@ void MPV_common_init_axp(MpegEncContext *s) { - if (amask(AMASK_MVI) == 0) { - s->dct_unquantize_h263 = dct_unquantize_h263_mvi; - } + s->dct_unquantize_h263 = dct_unquantize_h263_axp; }