summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2002-10-31 12:11:53 +0000
committerMichael Niedermayer <michaelni@gmx.at>2002-10-31 12:11:53 +0000
commit6bb925f47dbcb073ee505ed71231c6662aec5ed1 (patch)
tree632a125acfd279103dbda2a230f4fb889908d60e /libavcodec/mpegvideo.c
parent0aa7875a730d98f912820e7032d1fc323e1432bb (diff)
dont call emms_c() for each MB
Originally committed as revision 1127 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r--libavcodec/mpegvideo.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 5571148b71..ad8e5b59b5 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1819,7 +1819,7 @@ void MPV_decode_mb(MpegEncContext *s, DCTELEM block[6][64])
/* if previous was skipped too, then nothing to do !
skip only during decoding as we might trash the buffers during encoding a bit */
if (*mbskip_ptr >= s->ip_buffer_count && !s->encoding)
- goto the_end;
+ return;
} else {
*mbskip_ptr = 0; /* not skipped */
}
@@ -1866,7 +1866,7 @@ void MPV_decode_mb(MpegEncContext *s, DCTELEM block[6][64])
}
/* skip dequant / idct if we are really late ;) */
- if(s->hurry_up>1) goto the_end;
+ if(s->hurry_up>1) return;
/* add dct residue */
if(s->encoding || !( s->mpeg2 || s->h263_msmpeg4 || s->codec_id==CODEC_ID_MPEG1VIDEO
@@ -1916,8 +1916,6 @@ void MPV_decode_mb(MpegEncContext *s, DCTELEM block[6][64])
}
}
}
- the_end:
- emms_c(); //FIXME remove
}
static inline void dct_single_coeff_elimination(MpegEncContext *s, int n, int threshold)
@@ -2574,7 +2572,6 @@ static void encode_picture(MpegEncContext *s, int picture_number)
// s->mb_type[mb_y*s->mb_width + mb_x]=MB_TYPE_INTER;
}
}
- emms_c();
}else /* if(s->pict_type == I_TYPE) */{
/* I-Frame */
//FIXME do we need to zero them?
@@ -2601,6 +2598,8 @@ static void encode_picture(MpegEncContext *s, int picture_number)
}
}
}
+ emms_c();
+
if(s->scene_change_score > 0 && s->pict_type == P_TYPE){
s->pict_type= I_TYPE;
memset(s->mb_type , MB_TYPE_INTRA, sizeof(UINT8)*s->mb_width*s->mb_height);