summaryrefslogtreecommitdiff
path: root/libavcodec/i386
diff options
context:
space:
mode:
authorJuanjo <pulento@users.sourceforge.net>2002-05-02 04:39:45 +0000
committerJuanjo <pulento@users.sourceforge.net>2002-05-02 04:39:45 +0000
commitef5b1b5a7ee2d4bce47382e74fe4c88d207c641a (patch)
treef732b2cf29ab34f4115e94d82a6a21aabfe73066 /libavcodec/i386
parent95c79a24e5429c510a7e17e84fc02b452060578c (diff)
- Advanced Intra Coding (AIC) support for H.263+ encoder, just DC by now.
- Bug fix H.263+ AIC tables. - Warning fixes. Originally committed as revision 431 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/i386')
-rw-r--r--libavcodec/i386/mpegvideo_mmx.c12
-rw-r--r--libavcodec/i386/mpegvideo_mmx_template.c5
-rw-r--r--libavcodec/i386/simple_idct_mmx.c6
3 files changed, 14 insertions, 9 deletions
diff --git a/libavcodec/i386/mpegvideo_mmx.c b/libavcodec/i386/mpegvideo_mmx.c
index ebb5f36773..882272988a 100644
--- a/libavcodec/i386/mpegvideo_mmx.c
+++ b/libavcodec/i386/mpegvideo_mmx.c
@@ -557,12 +557,12 @@ void MPV_common_init_mmx(MpegEncContext *s)
s->dct_unquantize_mpeg1 = dct_unquantize_mpeg1_mmx;
s->dct_unquantize_mpeg2 = dct_unquantize_mpeg2_mmx;
- draw_edges = draw_edges_mmx;
+ draw_edges = draw_edges_mmx;
- if(mm_flags & MM_MMXEXT){
- dct_quantize= dct_quantize_MMX2;
- }else{
- dct_quantize= dct_quantize_MMX;
- }
+ if(mm_flags & MM_MMXEXT){
+ dct_quantize= dct_quantize_MMX2;
+ } else {
+ dct_quantize= dct_quantize_MMX;
+ }
}
}
diff --git a/libavcodec/i386/mpegvideo_mmx_template.c b/libavcodec/i386/mpegvideo_mmx_template.c
index 3f9f9d78ee..ae72bcaa67 100644
--- a/libavcodec/i386/mpegvideo_mmx_template.c
+++ b/libavcodec/i386/mpegvideo_mmx_template.c
@@ -48,6 +48,7 @@ static int RENAME(dct_quantize)(MpegEncContext *s,
else
q = s->c_dc_scale;
/* note: block[0] is assumed to be positive */
+ if (!s->h263_aic) {
#if 1
asm volatile (
"xorl %%edx, %%edx \n\t"
@@ -65,6 +66,10 @@ static int RENAME(dct_quantize)(MpegEncContext *s,
: "%edx"
);
#endif
+ } else
+ /* For AIC we skip quant/dequant of INTRADC */
+ level = block[0];
+
block[0]=0; //avoid fake overflow
// temp_block[0] = (block[0] + (q >> 1)) / q;
last_non_zero_p1 = 1;
diff --git a/libavcodec/i386/simple_idct_mmx.c b/libavcodec/i386/simple_idct_mmx.c
index 163097d4a9..32e3508f34 100644
--- a/libavcodec/i386/simple_idct_mmx.c
+++ b/libavcodec/i386/simple_idct_mmx.c
@@ -32,8 +32,8 @@
#define ROW_SHIFT 11
#define COL_SHIFT 20 // 6
-static uint64_t __attribute__((aligned(8))) wm1010= 0xFFFF0000FFFF0000ULL;
-static uint64_t __attribute__((aligned(8))) d40000= 0x0000000000040000ULL;
+static const uint64_t __attribute__((aligned(8))) wm1010= 0xFFFF0000FFFF0000ULL;
+static const uint64_t __attribute__((aligned(8))) d40000= 0x0000000000040000ULL;
static int16_t __attribute__((aligned(8))) temp[64];
static int16_t __attribute__((aligned(8))) coeffs[]= {
1<<(ROW_SHIFT-1), 0, 1<<(ROW_SHIFT-1), 0,
@@ -63,12 +63,12 @@ static int16_t __attribute__((aligned(8))) coeffs[]= {
C3, -C1, C3, -C1
};
+#if 0
static void unused_var_killer(){
int a= wm1010 + d40000;
temp[0]=a;
}
-#if 0
static void inline idctCol (int16_t * col, int16_t *input)
{
#undef C0