From e6f98c83a47129481f03371022e018292193c896 Mon Sep 17 00:00:00 2001 From: Yusuke Nakamura Date: Tue, 27 Mar 2018 07:21:34 +0900 Subject: [PATCH] utils: Make lsmash_ceil_log2 static inline. --- common/utils.c | 11 ----------- common/utils.h | 16 +++++++++++----- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/common/utils.c b/common/utils.c index b701aef..e9ba236 100644 --- a/common/utils.c +++ b/common/utils.c @@ -145,17 +145,6 @@ void lsmash_ifprintf va_end( args ); } -int lsmash_ceil_log2 -( - uint64_t value -) -{ - int length = 0; - while( value > (1ULL << length) ) - ++length; - return length; -} - /* for qsort function */ int lsmash_compare_dts ( diff --git a/common/utils.h b/common/utils.h index daf8c40..b79ee36 100644 --- a/common/utils.h +++ b/common/utils.h @@ -120,11 +120,6 @@ void lsmash_ifprintf const char *format, ... ); -int lsmash_ceil_log2 -( - uint64_t value -); - static inline size_t lsmash_floor_log2 ( uint64_t value @@ -144,6 +139,17 @@ static inline size_t lsmash_floor_log2 #endif } +static inline size_t lsmash_ceil_log2 +( + uint64_t value +) +{ + size_t length = 0; + while( value > (1ULL << length) ) + ++length; + return length; +} + int lsmash_compare_dts ( const lsmash_media_ts_t *a, -- 2.11.4.GIT