还是这个解码库
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)
离线