Mercurial > libavcodec.hg
comparison h264.c @ 8415:938824a1f42f libavcodec
Only execute clear_blocks() when needed.
+0.3% speedup for both aladin & cathedral.
author | michael |
---|---|
date | Sun, 21 Dec 2008 15:58:42 +0000 |
parents | b749b637ecfa |
children | 7f93fb360055 |
comparison
equal
deleted
inserted
replaced
8414:3030aa991ed1 | 8415:938824a1f42f |
---|---|
2593 } | 2593 } |
2594 } | 2594 } |
2595 } | 2595 } |
2596 } | 2596 } |
2597 } | 2597 } |
2598 if(h->cbp || IS_INTRA(mb_type)) | |
2599 s->dsp.clear_blocks(h->mb); | |
2600 | |
2598 if(h->deblocking_filter) { | 2601 if(h->deblocking_filter) { |
2599 backup_mb_border(h, dest_y, dest_cb, dest_cr, linesize, uvlinesize, simple); | 2602 backup_mb_border(h, dest_y, dest_cb, dest_cr, linesize, uvlinesize, simple); |
2600 fill_caches(h, mb_type, 1); //FIXME don't fill stuff which isn't used by filter_mb | 2603 fill_caches(h, mb_type, 1); //FIXME don't fill stuff which isn't used by filter_mb |
2601 h->chroma_qp[0] = get_chroma_qp(h, 0, s->current_picture.qscale_table[mb_xy]); | 2604 h->chroma_qp[0] = get_chroma_qp(h, 0, s->current_picture.qscale_table[mb_xy]); |
2602 h->chroma_qp[1] = get_chroma_qp(h, 1, s->current_picture.qscale_table[mb_xy]); | 2605 h->chroma_qp[1] = get_chroma_qp(h, 1, s->current_picture.qscale_table[mb_xy]); |
4259 int partition_count; | 4262 int partition_count; |
4260 unsigned int mb_type, cbp; | 4263 unsigned int mb_type, cbp; |
4261 int dct8x8_allowed= h->pps.transform_8x8_mode; | 4264 int dct8x8_allowed= h->pps.transform_8x8_mode; |
4262 | 4265 |
4263 mb_xy = h->mb_xy = s->mb_x + s->mb_y*s->mb_stride; | 4266 mb_xy = h->mb_xy = s->mb_x + s->mb_y*s->mb_stride; |
4264 | |
4265 s->dsp.clear_blocks(h->mb); //FIXME avoid if already clear (move after skip handlong? | |
4266 | 4267 |
4267 tprintf(s->avctx, "pic:%d mb:%d/%d\n", h->frame_num, s->mb_x, s->mb_y); | 4268 tprintf(s->avctx, "pic:%d mb:%d/%d\n", h->frame_num, s->mb_x, s->mb_y); |
4268 cbp = 0; /* avoid warning. FIXME: find a solution without slowing | 4269 cbp = 0; /* avoid warning. FIXME: find a solution without slowing |
4269 down the code */ | 4270 down the code */ |
4270 if(h->slice_type_nos != FF_I_TYPE){ | 4271 if(h->slice_type_nos != FF_I_TYPE){ |
5337 int mb_xy; | 5338 int mb_xy; |
5338 int mb_type, partition_count, cbp = 0; | 5339 int mb_type, partition_count, cbp = 0; |
5339 int dct8x8_allowed= h->pps.transform_8x8_mode; | 5340 int dct8x8_allowed= h->pps.transform_8x8_mode; |
5340 | 5341 |
5341 mb_xy = h->mb_xy = s->mb_x + s->mb_y*s->mb_stride; | 5342 mb_xy = h->mb_xy = s->mb_x + s->mb_y*s->mb_stride; |
5342 | |
5343 s->dsp.clear_blocks(h->mb); //FIXME avoid if already clear (move after skip handlong?) | |
5344 | 5343 |
5345 tprintf(s->avctx, "pic:%d mb:%d/%d\n", h->frame_num, s->mb_x, s->mb_y); | 5344 tprintf(s->avctx, "pic:%d mb:%d/%d\n", h->frame_num, s->mb_x, s->mb_y); |
5346 if( h->slice_type_nos != FF_I_TYPE ) { | 5345 if( h->slice_type_nos != FF_I_TYPE ) { |
5347 int skip; | 5346 int skip; |
5348 /* a skipped mb needs the aff flag from the following mb */ | 5347 /* a skipped mb needs the aff flag from the following mb */ |