summaryrefslogtreecommitdiff
path: root/libavcodec/h264.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-02-26 09:13:40 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-02-26 09:13:40 +0000
commit59b5370f0258243048708991c579570b322e3e02 (patch)
treef60be5e395189d11c8a6ca20422c62c1ec5b2b19 /libavcodec/h264.h
parent5818418758e147e5f1a70b4ecff493c601bac8e7 (diff)
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. Originally committed as revision 22073 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.h')
-rw-r--r--libavcodec/h264.h14
1 files changed, 3 insertions, 11 deletions
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index 2e77184c6d..5d615cfb63 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -947,24 +947,16 @@ static void fill_decode_caches(H264Context *h, int mb_type){
// top_cbp
if(top_type) {
h->top_cbp = h->cbp_table[top_xy];
- } else if(IS_INTRA(mb_type)) {
- h->top_cbp = 0x1CF;
} else {
- h->top_cbp = 0x00F;
+ h->top_cbp = IS_INTRA(mb_type) ? 0x1CF : 0x00F;
}
// left_cbp
if (left_type[0]) {
h->left_cbp = h->cbp_table[left_xy[0]] & 0x1f0;
- } else if(IS_INTRA(mb_type)) {
- h->left_cbp = 0x1CF;
- } else {
- h->left_cbp = 0x00F;
- }
- if (left_type[0]) {
h->left_cbp |= ((h->cbp_table[left_xy[0]]>>((left_block[0]&(~1))+1))&0x1) << 1;
- }
- if (left_type[1]) {
h->left_cbp |= ((h->cbp_table[left_xy[1]]>>((left_block[2]&(~1))+1))&0x1) << 3;
+ } else {
+ h->left_cbp = IS_INTRA(mb_type) ? 0x1CF : 0x00F;
}
}
}