Commit 36efa9ff authored by michael's avatar michael

Optimize get_dct8x8_allowed().

30 cpu cycles faster in pentium dual.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@16248 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 7c6db9cf
...@@ -4039,13 +4039,10 @@ static inline int get_level_prefix(GetBitContext *gb){ ...@@ -4039,13 +4039,10 @@ static inline int get_level_prefix(GetBitContext *gb){
} }
static inline int get_dct8x8_allowed(H264Context *h){ static inline int get_dct8x8_allowed(H264Context *h){
int i; if(h->sps.direct_8x8_inference_flag)
for(i=0; i<4; i++){ return !(*(uint64_t*)h->sub_mb_type & ((MB_TYPE_16x8|MB_TYPE_8x16|MB_TYPE_8x8 )*0x0001000100010001ULL));
if(!IS_SUB_8X8(h->sub_mb_type[i]) else
|| (!h->sps.direct_8x8_inference_flag && IS_DIRECT(h->sub_mb_type[i]))) return !(*(uint64_t*)h->sub_mb_type & ((MB_TYPE_16x8|MB_TYPE_8x16|MB_TYPE_8x8|MB_TYPE_DIRECT2)*0x0001000100010001ULL));
return 0;
}
return 1;
} }
/** /**
......
...@@ -339,7 +339,7 @@ typedef struct H264Context{ ...@@ -339,7 +339,7 @@ typedef struct H264Context{
int mb_field_decoding_flag; int mb_field_decoding_flag;
int mb_mbaff; ///< mb_aff_frame && mb_field_decoding_flag int mb_mbaff; ///< mb_aff_frame && mb_field_decoding_flag
unsigned int sub_mb_type[4]; uint16_t sub_mb_type[4];
//POC stuff //POC stuff
int poc_lsb; int poc_lsb;
......
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