mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-24 00:02:52 +00:00
avutil: change GET_UTF8 to not use av_log2()
This removes an inter-library dependency on ff_log2_tab causing linking errors in some configurations. Signed-off-by: Mans Rullgard <mans@mansr.com>
This commit is contained in:
parent
e8769b37fe
commit
7ba0c1b390
@ -252,16 +252,17 @@ static av_always_inline av_const int av_popcount64_c(uint64_t x)
|
||||
#define GET_UTF8(val, GET_BYTE, ERROR)\
|
||||
val= GET_BYTE;\
|
||||
{\
|
||||
int ones= 7 - av_log2(val ^ 255);\
|
||||
if(ones==1)\
|
||||
uint32_t top = (val & 128) >> 1;\
|
||||
if ((val & 0xc0) == 0x80)\
|
||||
ERROR\
|
||||
val&= 127>>ones;\
|
||||
while(--ones > 0){\
|
||||
while (val & top) {\
|
||||
int tmp= GET_BYTE - 128;\
|
||||
if(tmp>>6)\
|
||||
ERROR\
|
||||
val= (val<<6) + tmp;\
|
||||
top <<= 5;\
|
||||
}\
|
||||
val &= (top << 1) - 1;\
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user