summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-12-21 15:58:42 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-12-21 15:58:42 +0000
commitc212fb0cb1900ab92c00de948fb25f00c93639bb (patch)
treecb0c0c3538a4629035aaf59d2da650bb61b3d04f
parent897c1703d0fe52dbb0f024ba46facee505f6fccc (diff)
Only execute clear_blocks() when needed.
+0.3% speedup for both aladin & cathedral. Originally committed as revision 16252 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/h264.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 202ff91f92..2c065c79de 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -2595,6 +2595,9 @@ static av_always_inline void hl_decode_mb_internal(H264Context *h, int simple){
}
}
}
+ if(h->cbp || IS_INTRA(mb_type))
+ s->dsp.clear_blocks(h->mb);
+
if(h->deblocking_filter) {
backup_mb_border(h, dest_y, dest_cb, dest_cr, linesize, uvlinesize, simple);
fill_caches(h, mb_type, 1); //FIXME don't fill stuff which isn't used by filter_mb
@@ -4262,8 +4265,6 @@ static int decode_mb_cavlc(H264Context *h){
mb_xy = h->mb_xy = s->mb_x + s->mb_y*s->mb_stride;
- s->dsp.clear_blocks(h->mb); //FIXME avoid if already clear (move after skip handlong?
-
tprintf(s->avctx, "pic:%d mb:%d/%d\n", h->frame_num, s->mb_x, s->mb_y);
cbp = 0; /* avoid warning. FIXME: find a solution without slowing
down the code */
@@ -5340,8 +5341,6 @@ static int decode_mb_cabac(H264Context *h) {
mb_xy = h->mb_xy = s->mb_x + s->mb_y*s->mb_stride;
- s->dsp.clear_blocks(h->mb); //FIXME avoid if already clear (move after skip handlong?)
-
tprintf(s->avctx, "pic:%d mb:%d/%d\n", h->frame_num, s->mb_x, s->mb_y);
if( h->slice_type_nos != FF_I_TYPE ) {
int skip;