Mercurial > libavcodec.hg
changeset 8353:add1a0d65370 libavcodec
Do not recalculate constant part of is_complex for every MB.
author | michael |
---|---|
date | Tue, 16 Dec 2008 20:26:22 +0000 |
parents | 82790b28b6e0 |
children | 5e6f65181881 |
files | h264.c h264.h |
diffstat | 2 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/h264.c Tue Dec 16 20:09:09 2008 +0000 +++ b/h264.c Tue Dec 16 20:26:22 2008 +0000 @@ -2610,9 +2610,7 @@ MpegEncContext * const s = &h->s; const int mb_xy= h->mb_xy; const int mb_type= s->current_picture.mb_type[mb_xy]; - int is_complex = FRAME_MBAFF || MB_FIELD || IS_INTRA_PCM(mb_type) || s->codec_id != CODEC_ID_H264 || - (ENABLE_GRAY && (s->flags&CODEC_FLAG_GRAY)) || (ENABLE_H264_ENCODER && s->encoding) || ENABLE_SMALL || - s->qscale == 0; + int is_complex = h->is_complex || IS_INTRA_PCM(mb_type) || s->qscale == 0; if(ENABLE_H264_ENCODER && !s->decode) return; @@ -6573,6 +6571,9 @@ s->mb_skip_run= -1; + h->is_complex = FRAME_MBAFF || s->picture_structure != PICT_FRAME || s->codec_id != CODEC_ID_H264 || + (ENABLE_GRAY && (s->flags&CODEC_FLAG_GRAY)) || (ENABLE_H264_ENCODER && s->encoding) || ENABLE_SMALL; + if( h->pps.cabac ) { int i;