comparison h264.h @ 11300:1f512abdf680 libavcodec

Simplify code to set cbp_* this seems 1 cpu cycle slower even though we practically just remove code. Speed loss seems caused by the merge of if(left_type), iam commiting this anyway as i cant imagine this to be anything but compiler messup.
author michael
date Fri, 26 Feb 2010 09:13:40 +0000
parents b79f22337b6f
children 5843fc07bda0
comparison
equal deleted inserted replaced
11299:14535f3deafb 11300:1f512abdf680
945 945
946 if( CABAC ) { 946 if( CABAC ) {
947 // top_cbp 947 // top_cbp
948 if(top_type) { 948 if(top_type) {
949 h->top_cbp = h->cbp_table[top_xy]; 949 h->top_cbp = h->cbp_table[top_xy];
950 } else if(IS_INTRA(mb_type)) {
951 h->top_cbp = 0x1CF;
952 } else { 950 } else {
953 h->top_cbp = 0x00F; 951 h->top_cbp = IS_INTRA(mb_type) ? 0x1CF : 0x00F;
954 } 952 }
955 // left_cbp 953 // left_cbp
956 if (left_type[0]) { 954 if (left_type[0]) {
957 h->left_cbp = h->cbp_table[left_xy[0]] & 0x1f0; 955 h->left_cbp = h->cbp_table[left_xy[0]] & 0x1f0;
958 } else if(IS_INTRA(mb_type)) { 956 h->left_cbp |= ((h->cbp_table[left_xy[0]]>>((left_block[0]&(~1))+1))&0x1) << 1;
959 h->left_cbp = 0x1CF; 957 h->left_cbp |= ((h->cbp_table[left_xy[1]]>>((left_block[2]&(~1))+1))&0x1) << 3;
960 } else { 958 } else {
961 h->left_cbp = 0x00F; 959 h->left_cbp = IS_INTRA(mb_type) ? 0x1CF : 0x00F;
962 }
963 if (left_type[0]) {
964 h->left_cbp |= ((h->cbp_table[left_xy[0]]>>((left_block[0]&(~1))+1))&0x1) << 1;
965 }
966 if (left_type[1]) {
967 h->left_cbp |= ((h->cbp_table[left_xy[1]]>>((left_block[2]&(~1))+1))&0x1) << 3;
968 } 960 }
969 } 961 }
970 } 962 }
971 963
972 #if 1 964 #if 1