# HG changeset patch # User michael # Date 1264357088 0 # Node ID 2179ea01df622110c3f8bcea063df94d24943edb # Parent 3932fd1a1c253df24e43d500be66188cff488c44 Simplify suffix_length computation, same speed. diff -r 3932fd1a1c25 -r 2179ea01df62 h264_cavlc.c --- a/h264_cavlc.c Sun Jan 24 18:17:01 2010 +0000 +++ b/h264_cavlc.c Sun Jan 24 18:18:08 2010 +0000 @@ -443,9 +443,7 @@ }else{ level_code += ((level_code>>31)|1) & -(trailing_ones < 3); - suffix_length = 1; - if(level_code + 3U > 6U) - suffix_length++; + suffix_length = 1 + (level_code + 3U > 6U); level[trailing_ones]= level_code; }