Mercurial > libavcodec.hg
comparison h264.h @ 11286:db94c9bc5694 libavcodec
Reorder intra4x4_pred_mode so that we can read/write 4 values at once.
3-7 cpu cycles faster
author | michael |
---|---|
date | Thu, 25 Feb 2010 14:26:12 +0000 |
parents | 613370892df2 |
children | c8fea332d5d9 |
comparison
equal
deleted
inserted
replaced
11285:613370892df2 | 11286:db94c9bc5694 |
---|---|
884 if(!(topright_type & type_mask)) | 884 if(!(topright_type & type_mask)) |
885 h->topright_samples_available&= 0xFBFF; | 885 h->topright_samples_available&= 0xFBFF; |
886 | 886 |
887 if(IS_INTRA4x4(mb_type)){ | 887 if(IS_INTRA4x4(mb_type)){ |
888 if(IS_INTRA4x4(top_type)){ | 888 if(IS_INTRA4x4(top_type)){ |
889 int8_t *mode= h->intra4x4_pred_mode + h->mb2br_xy[top_xy]; | 889 AV_COPY32(h->intra4x4_pred_mode_cache+4+8*0, h->intra4x4_pred_mode + h->mb2br_xy[top_xy]); |
890 h->intra4x4_pred_mode_cache[4+8*0]= mode[4]; | |
891 h->intra4x4_pred_mode_cache[5+8*0]= mode[5]; | |
892 h->intra4x4_pred_mode_cache[6+8*0]= mode[6]; | |
893 h->intra4x4_pred_mode_cache[7+8*0]= mode[3]; | |
894 }else{ | 890 }else{ |
895 int pred; | 891 int pred; |
896 if(!(top_type & type_mask)) | 892 if(!(top_type & type_mask)) |
897 pred= -1; | 893 pred= -1; |
898 else{ | 894 else{ |
904 h->intra4x4_pred_mode_cache[7+8*0]= pred; | 900 h->intra4x4_pred_mode_cache[7+8*0]= pred; |
905 } | 901 } |
906 for(i=0; i<2; i++){ | 902 for(i=0; i<2; i++){ |
907 if(IS_INTRA4x4(left_type[i])){ | 903 if(IS_INTRA4x4(left_type[i])){ |
908 int8_t *mode= h->intra4x4_pred_mode + h->mb2br_xy[left_xy[i]]; | 904 int8_t *mode= h->intra4x4_pred_mode + h->mb2br_xy[left_xy[i]]; |
909 h->intra4x4_pred_mode_cache[3+8*1 + 2*8*i]= mode[left_block[0+2*i]]; | 905 h->intra4x4_pred_mode_cache[3+8*1 + 2*8*i]= mode[6-left_block[0+2*i]]; |
910 h->intra4x4_pred_mode_cache[3+8*2 + 2*8*i]= mode[left_block[1+2*i]]; | 906 h->intra4x4_pred_mode_cache[3+8*2 + 2*8*i]= mode[6-left_block[1+2*i]]; |
911 }else{ | 907 }else{ |
912 int pred; | 908 int pred; |
913 if(!(left_type[i] & type_mask)) | 909 if(!(left_type[i] & type_mask)) |
914 pred= -1; | 910 pred= -1; |
915 else{ | 911 else{ |