Originally committed as revision 715 to svn://svn.ffmpeg.org/ffmpeg/trunk
| ... | ... |
@@ -23,7 +23,7 @@ |
| 23 | 23 |
|
| 24 | 24 |
extern UINT8 zigzag_end[64]; |
| 25 | 25 |
|
| 26 |
-static void dct_unquantize_h263_mvi(MpegEncContext *s, DCTELEM *block, |
|
| 26 |
+static void dct_unquantize_h263_axp(MpegEncContext *s, DCTELEM *block, |
|
| 27 | 27 |
int n, int qscale) |
| 28 | 28 |
{
|
| 29 | 29 |
int i, n_coeffs; |
| ... | ... |
@@ -32,8 +32,6 @@ static void dct_unquantize_h263_mvi(MpegEncContext *s, DCTELEM *block, |
| 32 | 32 |
DCTELEM *orig_block = block; |
| 33 | 33 |
DCTELEM block0; |
| 34 | 34 |
|
| 35 |
- ASM_ACCEPT_MVI; |
|
| 36 |
- |
|
| 37 | 35 |
if (s->mb_intra) {
|
| 38 | 36 |
if (!s->h263_aic) {
|
| 39 | 37 |
if (n < 4) |
| ... | ... |
@@ -58,8 +56,17 @@ static void dct_unquantize_h263_mvi(MpegEncContext *s, DCTELEM *block, |
| 58 | 58 |
if (levels == 0) |
| 59 | 59 |
continue; |
| 60 | 60 |
|
| 61 |
+#ifdef __alpha_max__ |
|
| 62 |
+ /* I don't think the speed difference justifies runtime |
|
| 63 |
+ detection. */ |
|
| 64 |
+ ASM_ACCEPT_MVI; |
|
| 61 | 65 |
negmask = maxsw4(levels, -1); /* negative -> ffff (-1) */ |
| 62 | 66 |
negmask = minsw4(negmask, 0); /* positive -> 0000 (0) */ |
| 67 |
+#else |
|
| 68 |
+ negmask = cmpbge(WORD_VEC(0x7fff), levels); |
|
| 69 |
+ negmask &= (negmask >> 1) | (1 << 7); |
|
| 70 |
+ negmask = zap(-1, negmask); |
|
| 71 |
+#endif |
|
| 63 | 72 |
|
| 64 | 73 |
zeros = cmpbge(0, levels); |
| 65 | 74 |
zeros &= zeros >> 1; |
| ... | ... |
@@ -86,7 +93,5 @@ static void dct_unquantize_h263_mvi(MpegEncContext *s, DCTELEM *block, |
| 86 | 86 |
|
| 87 | 87 |
void MPV_common_init_axp(MpegEncContext *s) |
| 88 | 88 |
{
|
| 89 |
- if (amask(AMASK_MVI) == 0) {
|
|
| 90 |
- s->dct_unquantize_h263 = dct_unquantize_h263_mvi; |
|
| 91 |
- } |
|
| 89 |
+ s->dct_unquantize_h263 = dct_unquantize_h263_axp; |
|
| 92 | 90 |
} |