Commit da87276e authored by michael's avatar michael

Do not recalculate constant part of is_complex for every MB.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@16172 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent a69bc55a
...@@ -2610,9 +2610,7 @@ static void hl_decode_mb(H264Context *h){ ...@@ -2610,9 +2610,7 @@ static void hl_decode_mb(H264Context *h){
MpegEncContext * const s = &h->s; MpegEncContext * const s = &h->s;
const int mb_xy= h->mb_xy; const int mb_xy= h->mb_xy;
const int mb_type= s->current_picture.mb_type[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 || int is_complex = h->is_complex || IS_INTRA_PCM(mb_type) || s->qscale == 0;
(ENABLE_GRAY && (s->flags&CODEC_FLAG_GRAY)) || (ENABLE_H264_ENCODER && s->encoding) || ENABLE_SMALL ||
s->qscale == 0;
if(ENABLE_H264_ENCODER && !s->decode) if(ENABLE_H264_ENCODER && !s->decode)
return; return;
...@@ -6573,6 +6571,9 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg){ ...@@ -6573,6 +6571,9 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg){
s->mb_skip_run= -1; 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 ) { if( h->pps.cabac ) {
int i; int i;
......
...@@ -491,6 +491,8 @@ typedef struct H264Context{ ...@@ -491,6 +491,8 @@ typedef struct H264Context{
* pic_struct in picture timing SEI message * pic_struct in picture timing SEI message
*/ */
SEI_PicStructType sei_pic_struct; SEI_PicStructType sei_pic_struct;
int is_complex;
}H264Context; }H264Context;
#endif /* AVCODEC_H264_H */ #endif /* AVCODEC_H264_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment