diff options
author | Falk Hüffner <mellum@users.sourceforge.net> | 2002-07-03 23:30:32 +0000 |
---|---|---|
committer | Falk Hüffner <mellum@users.sourceforge.net> | 2002-07-03 23:30:32 +0000 |
commit | 2dbe7ec87ca78bed69fc28d798a2efb0fec77f9a (patch) | |
tree | b927819fcb89878ddfa86a1e25048b8a052824d4 /libavcodec/alpha | |
parent | e0580f8c688f0dcb87f2bf71b08f477ba583e8dd (diff) | |
download | ffmpeg-streaming-2dbe7ec87ca78bed69fc28d798a2efb0fec77f9a.zip ffmpeg-streaming-2dbe7ec87ca78bed69fc28d798a2efb0fec77f9a.tar.gz |
Make dct_unquantize_h263 work on systems without MVI extension.
Originally committed as revision 715 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/alpha')
-rw-r--r-- | libavcodec/alpha/mpegvideo_alpha.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/libavcodec/alpha/mpegvideo_alpha.c b/libavcodec/alpha/mpegvideo_alpha.c index 443857e..0be3270 100644 --- a/libavcodec/alpha/mpegvideo_alpha.c +++ b/libavcodec/alpha/mpegvideo_alpha.c @@ -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 @@ static void dct_unquantize_h263_mvi(MpegEncContext *s, DCTELEM *block, DCTELEM *orig_block = block; DCTELEM block0; - ASM_ACCEPT_MVI; - if (s->mb_intra) { if (!s->h263_aic) { if (n < 4) @@ -58,8 +56,17 @@ static void dct_unquantize_h263_mvi(MpegEncContext *s, DCTELEM *block, 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 @@ static void dct_unquantize_h263_mvi(MpegEncContext *s, DCTELEM *block, 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; } |