X264简介-Android上的使用(三)

在Android上使用X264库时遇到了编译错误,主要涉及到函数log2f和log2未定义。编译警告显示在多个源文件中,如encoder.c、analyse.c和ratecontrol.c等,提示log2f和log2函数的隐式声明。解决方法是将源码osdep.h中的#if!HAVE_LOG2F替换为#if1。

X264简介-Android上的使用(三)

一、X264 .a文件的log2f错误:

libx264.a(encoder-8.o):encoder.c:function validate_parameters: error: undefined reference to 'log2f'

libx264.a(encoder-8.o):encoder.c:function x264_8_encoder_reconfig: error: undefined reference to 'log2f'

libx264.a(ratecontrol-10.o):ratecontrol.c:function x264_10_ratecontrol_new: error: undefined reference to 'log2'

根据Linux上编译时的警告信息:


encoder/encoder.c: In function 'validate_parameters':
encoder/encoder.c:870:9: warning: implicit declaration of function 'log2f' [-Wimplicit-function-declaration]
float qp_i = qp_p - 6*log2f( h->param.rc.f_ip_factor );
^
encoder/encoder.c:870:31: warning: incompatible implicit declaration of built-in function 'log2f' [enabled by default]
float qp_i = qp_p - 6*log2f( h->param.rc.f_ip_factor );

analyse.c:188:9: warning: implicit declaration of functio
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值