[FFmpeg-soc] [soc]: r3009 - mxf/mxfenc.c

spyfeng subversion at mplayerhq.hu
Mon Aug 4 14:11:34 CEST 2008


Author: spyfeng
Date: Mon Aug  4 14:11:34 2008
New Revision: 3009

Log:
simplify klv_encode_ber_length()


Modified:
   mxf/mxfenc.c

Modified: mxf/mxfenc.c
==============================================================================
--- mxf/mxfenc.c	(original)
+++ mxf/mxfenc.c	Mon Aug  4 14:11:34 2008
@@ -280,10 +280,7 @@ static int klv_encode_ber_length(ByteIOC
         return 1;
     }
 
-    while (tmp) {
-        tmp >>= 8;
-        size ++;
-    }
+    size = (av_log2(tmp) >> 3) + 1;
 
     // long form
     put_byte(pb, 0x80 + size);



More information about the FFmpeg-soc mailing list