还是这个解码库
https://github.com/EmperG/lindenis-v536-package
jpeg硬解码研究了好久没搞起来,想跑一下.264解码但是cedarx编译不起来,提示没有cdxlist.i也不知道咋搞,希望有大神能研究下跑起来
使用主线5.2,按照这个教程成功安装了cedar,dev出现了cedar和ion设备,下面的cedarx也装一下,这样就不用拷so库了
https://github.com/aodzip/cedar/
编译链要用这个:
https://pan.baidu.com/s/1-WXlwxLoQNzKGDdIJ5JDpw
buildroot里的cedarc要改一下
主要看lindenis-v536-package里面的
tina_multimedia和tina_multimedia_demo两个文件夹,
先编译tina_multimedia/cedarc,按照里面的readme说明编译,平台选arm-none-linux-gnueabi,注意编译的时候统一编译链,configure和make都带上CC=/...你的编译链路径
jpeg和.264硬编码的demo在/tina_multimedia_demo/encodertest/src,修改makefile文件如下:
Target = demo
SourceIncludePath := -I/work/tina_multimedia/libcedarx/libcore/base/include -I/work/tina_multimedia/libcedarc/include -L/work/libcedarc/lib -L/work/tina_multimedia/libcedarc/library/arm-none-linux-gnueabi
CompileFlags = $(CFLAGS) $(SourceIncludePath)
LoadFlags += -lvencoder -lMemAdapter -lpthread -ldl -lm
CC=/work/arm-2014.05/bin/arm-none-linux-gnueabi-gcc
LDFLAGS= -Wl,-rpath-link /work/tina_multimedia/libcedarc/library/arm-none-linux-gnueabi -Wl,-rpath-link /work/tina_multimedia/libcedarc/base/.libs
$(Target): encodertest.c
$(CC) -o $@ $^ $(CompileFlags) $(LDFLAGS) $(LoadFlags)
路径名字对应改就行,其中/work/libcedarc/lib路径是编译tina_multimedia时的输出安装路径
然后make就生成程序了,直接拷到板子就能运行(前面buildroot已经安装了库所以不用拷)
测试程序,支持jpg和.264编码,前面的1表示编码成jpg,后面的1表示1帧
./demo 1 YUV420 800 480 800 480 1 ./123.yuv /root
debug : cedarc <VeSetSpeed:1559>: *** set ve freq to 300 Mhz ***
debug : cedarc <VeInitialize:1198>: ve init ok
debug : ionAlloc <__GetIonMemOpsS:985>:*** get __GetIonMemOpsS ***
debug : ionAlloc <ion_alloc_open:134>:begin ion_alloc_open
debug : cedarc <VeSetSpeed:1559>: *** set ve freq to 300 Mhz ***
debug : cedarc <VeInitialize:1198>: ve init ok
debug : ionAlloc <ion_alloc_open:175>:** phy offset = 40000000
debug : cedarc <VeRelease:1253>: ve release ok
debug : ionAlloc <__GetIonMemOpsS:985>:*** get __GetIonMemOpsS ***
debug : ionAlloc <ion_alloc_open:134>:begin ion_alloc_open
debug : cedarc <VideoEncInit:195>: (f:VideoEncInit, l:195)
debug : cedarc <VideoEncInit:210>: (f:VideoEncInit, l:210)
debug : cedarc <BitStreamCreate:102>: BitStreamCreate OK
encode frame 0 use time is 5263us...
the average encode time is 5263us...
debug : cedarc <VeRelease:1253>: ve release ok
output file is saved:/root
编码结果,5ms一帧,还是挺快的。
这里提供个YUV420文件供测试:
https://whycan.com/files/members/5219/yuv.rar
到此f1c200/100 的硬编码基本论证了,就剩解码了
继续研究lindenis-v536-package这个库ING......
离线
解码我确定是可以的(裸机)。感谢楼主分享的编码经验
离线
解码我确定是可以的(裸机)。感谢楼主分享的编码经验
对,官方tina,裸机代码都可以,但是tina linux我们这些diy的拿不到啊:(主线linux能跑就方便多了
最近编辑记录 f1c100_ (2020-10-17 01:13:24)
离线
支持一下大神!
谢谢分享!
一直想搞这个C100,但是却一直抽不出时间...看到楼主编解码的帖子...心又痒痒了
离线
f1c200/100 支持H264硬编码??规格书上没写啊
离线
支持一下,留下记录,后面好找
离线
好东西
离线
https://github.com/aodzip/libcedarc
这个应该是来源:
https://github.com/EmperG/lindenis-v536-package/tree/master/allwinner/tina_multimedia/libcedarc
这里有调用demo:
https://github.com/EmperG/lindenis-v536-package/tree/master/allwinner/tina_multimedia
https://github.com/EmperG/lindenis-v536-package/tree/master/allwinner/tina_multimedia_demo
https://github.com/king0769/Zeta_Linux_Samples/blob/master/demo_DecodingH264Frame/main.cpp
离线
https://github.com/aodzip/libcedarc
这个应该是来源:
https://github.com/EmperG/lindenis-v536-package/tree/master/allwinner/tina_multimedia/libcedarc
这里有调用demo:
https://github.com/EmperG/lindenis-v536-package/tree/master/allwinner/tina_multimediahttps://github.com/EmperG/lindenis-v536-package/tree/master/allwinner/tina_multimedia_demo
https://github.com/king0769/Zeta_Linux_Samples/blob/master/demo_DecodingH264Frame/main.cpp
离线
f1c200/100 支持H264硬编码??规格书上没写啊
对啊,我也想问问这个
f1c100、200s 不是只支持 jpeg 硬编码吗?什么时候支持 h.264 硬编码了(还是我文档没读懂?)
离线
mp4 可以达到哪个帧率?
离线
微凉VeiLiang 说:解码我确定是可以的(裸机)。感谢楼主分享的编码经验
对,官方tina,裸机代码都可以,但是tina linux我们这些diy的拿不到啊:(主线linux能跑就方便多了
你知道如何在裸机中进行h264解码吗?
离线
LoadFlags += -lvencoder -lMemAdapter -lpthread -ldl -lm
MemAdapter这个只有64位的库,编译不过去,32位的库在哪里可以找到?
离线
make[4]: Entering directory '/opt/a133/tina/out/mr813-a3/compile_dir/target/libcedarx/libcedarx'
Making install in libcore
make[5]: Entering directory '/opt/a133/tina/out/mr813-a3/compile_dir/target/libcedarx/libcedarx/libcore'
Making install in base
make[6]: Entering directory '/opt/a133/tina/out/mr813-a3/compile_dir/target/libcedarx/libcedarx/libcore/base'
CC libcdx_base_la-AwPool.lo
In file included from ./AwPool.c:13:0:
./include/CdxList.h:153:21: fatal error: CdxList.i: No such file or directory
#include <CdxList.i>
^
compilation terminated.
Makefile:551: recipe for target 'libcdx_base_la-AwPool.lo' failed
make[6]: *** [libcdx_base_la-AwPool.lo] Error 1
make[6]: Leaving directory '/opt/a133/tina/out/mr813-a3/compile_dir/target/libcedarx/libcedarx/libcore/base'
Makefile:353: recipe for target 'install-recursive' failed
make[5]: *** [install-recursive] Error 1
make[5]: Leaving directory '/opt/a133/tina/out/mr813-a3/compile_dir/target/libcedarx/libcedarx/libcore'
Makefile:398: recipe for target 'install-recursive' failed
make[4]: *** [install-recursive] Error 1
make[4]: Leaving directory '/opt/a133/tina/out/mr813-a3/compile_dir/target/libcedarx/libcedarx'
Makefile:724: recipe for target '/opt/a133/tina/out/mr813-a3/compile_dir/target/libcedarx/.built' failed
make[3]: *** [/opt/a133/tina/out/mr813-a3/compile_dir/target/libcedarx/.built] Error 2
make[3]: Leaving directory '/opt/a133/tina/package/allwinner/tina_multimedia'
package/Makefile:192: recipe for target 'package/allwinner/tina_multimedia/compile' failed
make[2]: *** [package/allwinner/tina_multimedia/compile] Error 2
make[2]: Leaving directory '/opt/a133/tina'
package/Makefile:189: recipe for target '/opt/a133/tina/out/mr813-a3/staging_dir/target/stamp/.package_compile' failed
make[1]: *** [/opt/a133/tina/out/mr813-a3/staging_dir/target/stamp/.package_compile] Error 2
make[1]: Leaving directory '/opt/a133/tina'
/opt/a133/tina/build/toplevel.mk:304: recipe for target 'world' failed
make: *** [world] Error 2
#### make failed to build some targets (22 seconds) ####
./include/CdxList.h:153:21: fatal error: CdxList.i: No such file or directory
#include <CdxList.i>
这个错误 。。。
离线
故意删掉一个文件?
离线
cp /opt/D1/tina_d1_open/package/allwinner/tina_multimedia/libcedarx/libcore/base/include/CdxList.i package/allwinner/tina_multimedia/libcedarx/libcore/base/include/
去D1 SDK 里面借一个用用。
离线
cp /opt/D1/tina_d1_open/package/allwinner/tina_multimedia/libcedarx/libcore/base/include/CdxList.i package/allwinner/tina_multimedia/libcedarx/libcore/base/include/
去D1 SDK 里面借一个用用。
这个能用吗?全志的bsp都会报这个错。。。。
离线
不错,可以玩玩视频录制了
离线