飞凌全志T113-i开发板视频编码测试

前言

本文测试OK113i-S开发板-视频编解码的功能

OK113i-S开发板是支持视频的编解码的,下面是官方介绍的编解码功能

T113-i 是一种为多媒体解码平台设计的高级应用处理器。T113-i 集成了64位玄铁C906 RISC-V CPU,
双核 Cortex - A7 CPU 和 HiFi4 DSP,提供高效的计算能力。
 主要特性
支持 H.265、H.264、MPEG-1/2/4、JPEG 等全格式解码。独立的编码器可以用 JPEG 或 MJPEG 来进行编
码。
 T113-i 集成了 H.265/H.264 4K 解码和 SmartColor2.0 后处理,提供完美的视频娱乐体验。

下面我们来测试一下音视频的编码解码功能。

编解码代码

在系统的代码中,下面是程序的位置

----------------
视频
/sdk/platform/framework/auto/cmd_demo/decoderTest 
/sdk/platform/framework/auto/sdk_demo/decoderTest
/sdk/platform/framework/auto/sdk_demo/encoderTest
/sdk/platform/framework/auto/sdk_demo/fltest_streamPlayer

------------------
音频
/sdk/platform/framework/auto/cmd_demo/audplayer
/sdk/platform/framework/auto/qt_demo/fltest_qt_musicplayer
/sdk/platform/framework/auto/sdk_demo/audioencTest
/sdk/platform/framework/auto/sdk_demo/audplayerTest

编译音视频库

系统的音视频库主要是cedarx 和libcedarc;这个在buuildroot中需要选定。如下图

Target Packages
  Allwinner platform private package select
  Libcedcrc
  Cedarx

飞凌全志T113-i开发板视频编码测试_第1张图片

飞凌全志T113-i开发板视频编码测试_第2张图片

错误

=================
>>> cedarx  Installing to target
cp -rf /home/forlinx/113/OK113i-linux-sdk/out/t113_i/ok113i/longan/buildroot/build/cedarx/config/_cedarx.conf 
/home/forlinx/113/OK113i-linux-sdk/out/t113_i/ok113i/longan/buildroot/target/etc/cedarx.conf
cp: cannot stat '/home/forlinx/113/OK113i-linux-sdk/out/t113_i/ok113i/longan/buildroot/build/cedarx/config/_cedarx.conf': No such file or directory
make[1]: *** [package/pkg-generic.mk:335: /home/forlinx/113/OK113i-linux-sdk/out/t113_i/ok113i/longan/buildroot/build/cedarx/.stamp_target_installed] Error 1

解决办法

cp -rf /home/forlinx/113/OK113i-linux-sdk/out/t113_i/ok113i/longan/buildroot/build/cedarx/conf/default_cedarx.conf  
/home/forlinx/113/OK113i-linux-sdk/out/t113_i/ok113i/longan/buildroot/build/cedarx/config/_cedarx.conf

./build.sh
./build.sh pack

=============================================
视频解码264

fltest_decoderTest 解码/tmp.h264 为yuv 格式。

root@ok113i:/forlinx/media# ls
1.jpg                1280x720_video3.yuv    tmp.h264
1024x600.rgba        2.jpg                  tmp.h265
1280x720_video0.yuv  2560x1440_dcvideo.yuv  videotestsrc_1280x720.nv21
1280x720_video1.yuv  30s.wav
1280x720_video2.yuv  test.mp3

root@ok113i:/forlinx/media# fltest_decoderTest
INFO   : cedarc : Set log level to 3 from /vendor/etc/cedarc.conf
[2023-12-20 17:35:24] ERROR  : awplayer : read plugin entry adecoder-15 fail!
[2023-12-20 17:35:24] ERROR  : awplayer : read plugin entry vdecoder-9 fail!
INFO   : cedarc : register h264 decoder success!
INFO   : cedarc : register mjpeg decoder success!
[ 1097.603725] VE: VE real_freq=576000000
[ 1097.603725]
INFO   : cedarc : register mpeg2 decoder success!
[2023-12-20 17:35:24] WARNING: awplayer : Invalid plugin,function CedarPluginVDInit not found.
INFO   : cedarc : register mpeg4dx decoder success!
INFO   : cedarc : register mpeg4H263 decoder success!
INFO   : cedarc : register mpeg4Normal decoder success!
INFO   : cedarc : register vc1 decoder success!
INFO   : cedarc : register h265 decoder success!
[2023-12-20 17:35:24] ERROR  : awplayer : read plugin entry plugin-0 fail!
decoderTest version:V2.0.20220506
decoderTest intputFile:/forlinx/media/tmp.h264
[D]singleDecoderH264Test                 ================================
[D]singleDecoderH264Test                 ====     CedarC  Decoder    ====
[D]singleDecoderH264Test                 ====  singleDecoderTest cbk ====
[D]singleDecoderH264Test                 ================================
[E][decoderTest.cpp]singleDecoderH264Test line:271 open intputFile:/forlinx/media/tmp.h264
[E][decoderTest.cpp]singleDecoderH264Test line:294 open outputFile:/tmp/800x480nv21_sgl.yuv
new AWVideoDecoderImpl() version:V2.0.20220506
sdk_memory version:V2.0.20220506
DEBUG  : ionAlloc <__GetIonMemOpsS:833>: *** get __GetIonMemOpsS ***
INFO   : cedarc : *** ic_version = 0x1301000010210,
DEBUG  : cedarc : *** nPhyOffset = 0x0
DEBUG  : ionAlloc : pid: 1559, g_context = 0x28b3b8

DEBUG  : ionAlloc : ion alloc open ok
DEBUG  : cedarc : load conf file /etc/cedarc.conf ok!

INFO   : cedarc : Set log level to 5 from /vendor/etc/cedarc.conf
ERROR  : cedarc : now cedarc log level:5
WARNING: cedarc : warning: the nDeInterlaceHoldingFrameBufferNum is 0
[D]singleDecoderH264Test decode process[0/821226]
======================= ret:-6  
[D]singleDecoderH264Test decode process[815936/821226]
offset>(size-4)
[D]decoderDataReady decode write[384000/192000]
======================= ret:3
output file is saved:/tmp/

=============================================
视频解码h265

demoVdecoder 这个文件失败

==================================

ok113i:/forlinx/media# demoVdecoder -i /forlinx/media/tmp.h265 -o dec265.yuv
INFO   : cedarc : Set log level to 3 from /vendor/etc/cedarc.conf
[2023-12-20 19:28:03] ERROR  : awplayer : read plugin entry adecoder-15 fail!
[2023-12-20 19:28:03] ERROR  : awplayer : read plugin entry vdecoder-9 fail!
INFO   : cedarc : register h264 decoder success!
INFO   : cedarc : register mjpeg decoder success!
INFO   : cedarc : register mpeg2 decoder success!
[2023-12-20 19:28:03] WARNING: awplayer : Invalid plugin,function CedarPluginVDInit not found.
INFO   : cedarc : register mpeg4dx decoder success!
INFO   : cedarc : register mpeg4H263 decoder success!
INFO   : cedarc : register mpeg4Normal decoder success!
INFO   : cedarc : register vc1 decoder success!
INFO   : cedarc : register h265 decoder success!
[2023-12-20 19:28:03] ERROR  : awplayer : read plugin entry plugin-0 fail!
[2023-12-20 19:28:03] DEBUG  : awplayer : aw stream init...
[2023-12-20 19:28:03] DEBUG  : awplayer :  ==== CedarX linux decoder demo help start =====
[2023-12-20 19:28:03] DEBUG  : awplayer :  -h or --help to show the demo usage
[2023-12-20 19:28:03] DEBUG  : awplayer :  demo created by zouwenhuan, allwinnertech/AL3
[2023-12-20 19:28:03] DEBUG  : awplayer :  email: [email protected]
[2023-12-20 19:28:03] DEBUG  : awplayer :  ===== CedarX linux decoder demo help end ======
[2023-12-20 19:28:03] DEBUG  : awplayer : nDecoderNum = 1
[2023-12-20 19:28:03] DEBUG  : awplayer : ChannelThread 11, 0
[2023-12-20 19:28:03] DEBUG  : awplayer :  get input file: file:///forlinx/media/tmp.h265
[2023-12-20 19:28:03] DEBUG  : awplayer :  get save pic path: dec265.yuv
DEBUG  : ionAlloc <__GetIonMemOpsS:833>: *** get __GetIonMemOpsS ***
INFO   : cedarc : *** ic_version = 0x1301000010210,
DEBUG  : cedarc : *** nPhyOffset = 0x0
DEBUG  : ionAlloc : pid: 1773, g_context = 0xb5d02528

DEBUG  : ionAlloc : ion alloc open ok
[2023-12-20 19:28:03] DEBUG  : awplayer : source uri 'file:///forlinx/media/tmp.h265'
[2023-12-20 19:28:03] DEBUG  : awplayer <__FileStreamConnect:407>: (5/0/1133141) path:'file:///forlinx/media/tmp.h265'
[2023-12-20 19:28:03] ERROR  : CdxFlacParser <__FlacParserProbe:1133>: Flac probe failed.
[2023-12-20 19:28:03] WARNING: awplayer : Wav parser : no dice, no valid sequence of frames found.
[2023-12-20 19:28:03] WARNING: awplayer : Wav parser : no dice, no valid sequence of frames found.frames found.
[2023-12-20 19:28:03] WARNING: awplayer : Wav parser : no dice, no valid sequence offrames found.
[2023-12-20 19:28:03] WARNING: awplayer : Wav parser : no dice, no valid sequence of frames found.
[2023-12-20 19:28:03] DEBUG  : awplayer <__WvParserProbe:575>: __WvParserProbe:
[2023-12-20 19:28:03] DEBUG  : awplayer <__WvParserProbe:575>: __WvParserProbe:
[2023-12-20 19:28:03] DEBUG  : awplayer <__WvParserProbe:575>: __WvParserProbe:
[2023-12-20 19:28:03] DEBUG  : awplayer <__WvParserProbe:575>: __WvParserProbe:
[2023-12-20 19:28:03] ERROR  : awplayer <__G729ParserProbe:290>: g729 SYNC_WORD probe failed.
[2023-12-20 19:28:03] ERROR  : awplayer <__Id3v2ParserProbe:330>: Probe ID3_header loss sync...
[2023-12-20 19:28:03] WARNING: awplayer : Sorry, I don't know what it is!
[2023-12-20 19:28:03] WARNING: awplayer : should not be here.
[2023-12-20 19:28:03] ERROR  : awplayer : open parser fail, uri(file:///forlinx/media/tmp.h265)
[2023-12-20 19:28:03] ERROR  : awplayer :  decoder open parser error nRet = -1, Decoder->parser: (nil)
[2023-12-20 19:28:03] ERROR  : awplayer :  decoder demom initDecoder error

=============================================

我们修改decoderTest这个程序,使它能解码h265的格式,其中下面代码红色是我修改的。

source ~/113/OK113i-linux-sdk/.buildconfig
~/113/OK113i-linux-sdk/platform/framework/auto/sdk_demo/decoderTest$ make

==============================================

//decoderTest 265
int main(int argc, char** argv)
{
    printf("decoderTest265 version:%s\n", MODULE_VERSION);
    /******** begin set the default encode param ********/
    memset(&decodeParam, 0, sizeof(decodeParam));
    memset(&testParam, 0, sizeof(testParam));

    decodeParam.srcW = 800;
    decodeParam.srcH = 480;
    decodeParam.dstW = 800;
    decodeParam.dstH = 480;
    decodeParam.rotation = Angle_0;
    decodeParam.scaleRatio = ScaleNone;
    decodeParam.codecType = CODEC_H265;
    decodeParam.pixelFormat = PIXEL_NV21;

    testParam.testTimes = 1;
    testParam.testWay = 0;
    strcpy((char*)testParam.intputFile,        "/tmp/tmp.h265");
strcpy((char*)testParam.outputFile,        "/tmp/dec265_out.yuv");

================================================================

Makefile的修改

all: $(Target) 
$(Target) : decoderTest.cpp 
	$(CPP) decoderTest.cpp -o $(Target)  $(LIBS) $(LDFLAGS) -lpthread $(CXXFLAGS)
	$(CPP) decoderTest265.cpp -o $(Target)265  $(LIBS) $(LDFLAGS) -lpthread $(CXXFLAGS)
	@echo "generate $(Target) success!!!"
	@cp -f $(Target)    $(INSTATLL_PATH)
	@cp -f $(Target)265 $(INSTATLL_PATH)
	@echo -e '\e[1;33m cp -f $(Target) $(INSTATLL_PATH) \e[0m'

=============================================
测试解码效果

飞凌全志T113-i开发板视频编码测试_第3张图片

./decoderTest265
INFO   : cedarc : Set log level to 3 from /vendor/etc/cedarc.conf
[2023-12-21 01:51:19] ERROR  : awplayer : read plugin entry adecoder-15 fail!
[2023-12-21 01:51:19] ERROR  : awplayer : read plugin entry vdecoder-9 fail!
INFO   : cedarc : register h264 decoder success!
INFO   : cedarc : register mjpeg decoder success!
[ 3213.535493] VE: VE real_freq=576000000
[ 3213.535493]
INFO   : cedarc : register mpeg2 decoder success!
[2023-12-21 01:51:19] WARNING: awplayer : Invalid plugin,function CedarPluginVDInit not found.
INFO   : cedarc : register mpeg4dx decoder success!
INFO   : cedarc : register mpeg4H263 decoder success!
INFO   : cedarc : register mpeg4Normal decoder success!
INFO   : cedarc : register vc1 decoder success!
INFO   : cedarc : register h265 decoder success!
[2023-12-21 01:51:19] ERROR  : awplayer : read plugin entry plugin-0 fail!
decoderTest265 version:V2.0.20220506
intputFile  :/tmp/tmp.h265
outputFile  :/tmp/d5_out.yuv
[D]singleDecoderTest             ================================
[D]singleDecoderTest             ====     CedarC  Decoder    ====
[D]singleDecoderTest             ====  singleDecoderTest cbk ====
[D]singleDecoderTest             ================================
new AWVideoDecoderImpl() version:V2.0.20220506
sdk_memory version:V2.0.20220506
DEBUG  : ionAlloc <__GetIonMemOpsS:833>: *** get __GetIonMemOpsS ***
INFO   : cedarc : *** ic_version = 0x1301000010210,
DEBUG  : cedarc : *** nPhyOffset = 0x0
DEBUG  : ionAlloc : pid: 1597, g_context = 0x198c480

DEBUG  : ionAlloc : ion alloc open ok
DEBUG  : cedarc : load conf file /etc/cedarc.conf ok!

INFO   : cedarc : Set log level to 5 from /vendor/etc/cedarc.conf
ERROR  : cedarc : now cedarc log level:5
WARNING: cedarc : warning: the nDeInterlaceHoldingFrameBufferNum is 0
[D]singleDecoderTest decode process[0/1133141]
[W][decoderTest265.cpp]singleDecoderTest line:514 decode failed,error code:-6
[D]singleDecoderTest decode process[28/1133141]
[W][decoderTest265.cpp]singleDecoderTest line:514 decode failed,error code:-6
[D]singleDecoderTest decode process[86/1133141]

[D]singleDecoderTest decode process[1127265/1133141]
offset>(size-4)
WARNING: cedarc :  h265 pts list is full
[D]decoderDataReady decode write[384000/192000]
[D]printfArgs    -i:/tmp/tmp.h265
[D]printfArgs    -s:[800x480]
[D]printfArgs    -f:278
[D]printfArgs    -p:5
[D]printfArgs    -o:/tmp/d5_out.yuv
output file is saved:/tmp/d5_out.yuv
~ AWVideoDecoderImpl()
Test 1 times.

=============================================
视频编码

root@ok113i:/forlinx/media# encoderTest
encoderTest version:V2.0.2022050[ 5100.284684] VE: VE real_freq=576000000
[ 5100.284684]
6
intputFile /tmp/800_480.yuv
outputFile /tmp/enc720_30p.265
outputFile  CODEC_H265
[D]singleEncoderTest             ================================
[D]singleEncoderTest             ====     CedarC  Encoder    ====
[D]singleEncoderTest             ====    singleDecoderTest    ====
[D]singleEncoderTest             ================================
[D]printfArgs    -s:800x480
[D]printfArgs    -n:1
[D]printfArgs    -f:3
[D]printfArgs    -p:1
[D]printfArgs    -r:30
[D]printfArgs    -d:800x480
sdk_memory version:V2.0.20220506
INFO   : cedarc : *** ic_version = 0x1301000010210,
[D]encodeFile malloc pIonMem->vir=0xb6a63000!
new AWVideoEncoderImpl() version:V2.0.20220506
sdk_memory version:V2.0.20220506
INFO   : cedarc : *** ic_version = 0x1301000010210,
ERROR  : cedarc : error: the driver do not support the ic 1667
[E][AWVidoeEncoder.cpp]init line:389 VideoEncCreate error, return[E][encoderTest.cpp]encodeFile line:412 init:ffffffff
~ AWVideoEncoderImpl()
ERROR  : cedarc : ReleaseAllocInputBuffer, pEncoder is NULL
[D]printfArgs    -s:800x480
[D]printfArgs    -n:1
[D]printfArgs    -f:3
[D]printfArgs    -p:1
[D]printfArgs    -r:30
[D]printfArgs    -d:800x480
output file is saved:/tmp/enc720_30p.265
Test 1 times.

编码失败,文件为0

=============================================
音频编码

root@ok113i:/forlinx/media# cp 30s.wav /tmp/test.wav
root@ok113i:/forlinx/media# audioenc_test
INFO   : cedarc : Set log level to 3 from /vendor/etc/cedarc.conf
[2023-12-20 18:48:57] ERROR  : awplayer : read plugin entry adecoder-15 fail!
[2023-12-20 18:48:57] ERROR  : awplayer : read plugin entry vdecoder-9 fail!
INFO   : cedarc : register h264 decoder success!
INFO   : cedarc : register mjpeg decoder success!
INFO   : cedarc : register mpeg2 decoder success!
[2023-12-20 18:48:57] WARNING: awplayer : Invalid plugin,function CedarPluginVDInit not found.
INFO   : cedarc : register mpeg4dx decoder success!
INFO   : cedarc : register mpeg4H263 decoder success!
INFO   : cedarc : register mpeg4Normal decoder success!
INFO   : cedarc : register vc1 decoder success!
INFO   : cedarc : register h265 decoder success!
[2023-12-20 18:48:57] ERROR  : awplayer : read plugin entry plugin-0 fail!
[2023-12-20 18:48:57] DEBUG  : awplayer : aw stream init...
[2023-12-20 18:48:57] DEBUG  : awplayer : aw muxer init ..
[2023-12-20 18:48:57] DEBUG  : awplayer : aw muxer size:4
audioenc test version:V2.0.20220506
12-20 18:48:57.953  AudioEnc(W) : AudioEncInit success
fopen /tmp/test.wav OK
fopen /tmp/test.mp3 ok
12-20 18:48:57.955  AudioEnc(E) : audio encode ERR_AUDIO_ENC_PCMUNDERFLOW
12-20 18:48:58.001  AudioEnc(E) : audio encode ERR_AUDIO_ENC_PCMUNDERFLOW
12-20 18:49:05.031  AudioEnc(E) : audio encode ERR_AUDIO_ENC_PCMUNDERFLOW
12-20 18:49:05.077  AudioEnc(E) : audio encode ERR_AUDIO_ENC_PCMUNDERFLOW
12-20 18:49:05.123  AudioEnc(E) : audio encode ERR_AUDIO_ENC_PCMUNDERFLOW
12-20 18:49:05.169  AudioEnc(E) : audio encode ERR_AUDIO_ENC_PCMUNDERFLOW
file end exit.
audioenc test run finish

=============================================
音频解码

下图是
fltest_qt_musicplayer

飞凌全志T113-i开发板视频编码测试_第4张图片

root@ok113i:/forlinx/media# fltest_audioplayer   /forlinx/media/test.mp3
[2023-12-20 19:02:26] WARNING: awplayer : Set log level to 3
[2023-12-20 19:02:26] ERROR  : awplayer : read plugin entry adecoder-15 fail!
[2023-12-20 19:02:26] ERROR  : awplayer : read plugin entry vdecoder-9 fail!
INFO   : cedarc : register h264 decoder success!
INFO   : cedarc : register mjpeg decoder success!
INFO   : cedarc : register mpeg2 decoder success!
[2023-12-20 19:02:26] WARNING: awplayer : Invalid plugin,function CedarPluginVDInit not found.
INFO   : cedarc : register mpeg4dx decoder success!
INFO   : cedarc : register mpeg4H263 decoder success!
INFO   : cedarc : register mpeg4Normal decoder success!
INFO   : cedarc : register vc1 decoder success!
INFO   : cedarc : register h265 decoder success!
[2023-12-20 19:02:26] ERROR  : awplayer : read plugin entry plugin-0 fail!
[2023-12-20 19:02:26] DEBUG  : awplayer : aw stream init...
[2023-12-20 19:02:26] DEBUG  : awplayer : aw muxer init ..
[2023-12-20 19:02:26] DEBUG  : awplayer : aw muxer size:4
set url:/forlinx/media/test.mp3
[2023-12-20 19:02:26] DEBUG  : awplayer : XPlayerCreate.
[2023-12-20 19:02:26] DEBUG  : awplayer :
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> CedarX <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
tag   : cedarx
branch: stable_v2.8_common
commit: 967535b8ff6a073cb4f38e85a4ae5fa6008014d8
date  : Mon, 15 May 2017 01:30:22 +0000 (09:30 +0800)
author:
----------------------------------------------------------------------

xfang tinyalsa SoundDeviceCreate
[2023-12-20 19:02:26] DEBUG  : awplayer : libsdk_player version:V2.0.20220516, LayerCreate

(getInstance 93) version:V2.0.20220506
init chwd sucess !
(HwDisplay 279)
(hwd_init 1258)
[2023-12-20 19:02:26] DEBUG  : awplayer : screen:w 1024, screen:h 600 disp
sdk_memory version:V2.0.20220506
DEBUG  : ionAlloc <__GetIonMemOpsS:833>: *** get __GetIonMemOpsS ***
INFO   : cedarc : *** ic_version = 0x1301000010210,
DEBUG  : cedarc : *** nPhyOffset = 0x0
DEBUG  : ionAlloc : pid: 1608, g_context = 0x274370

DEBUG  : ionAlloc : ion alloc open ok
[2023-12-20 19:02:26] DEBUG  : awplayer : setVideoSurfaceTexture, surface = 0x26fc60
[2023-12-20 19:02:26] DEBUG  : awplayer : process message XPLAYER_COMMAND_SET_SURFACE.
[2023-12-20 19:02:26] DEBUG  : awplayer : ==== pCallback: 0xb67e3574, pUser: 0x26b280
[2023-12-20 19:02:26] DEBUG  : awplayer : ==== process message XPLAYER_COMMAND_SET_SUBCTRL.
[2023-12-20 19:02:26] DEBUG  : awplayer : set deinterlace
[2023-12-20 19:02:26] DEBUG  : awplayer : ==== process message XPLAYER_COMMAND_SET_SUBCTRL.
[2023-12-20 19:02:26] DEBUG  : awplayer : setDataSource(url), url='/forlinx/media/test.mp3'
[2023-12-20 19:02:26] INFO   : awplayer : process message XPLAYER_COMMAND_SET_SOURCE.
[2023-12-20 19:02:26] DEBUG  : awplayer : prepare
[2023-12-20 19:02:26] DEBUG  : awplayer : process message XPLAYER_COMMAND_PREPARE. mPriData->mStatus: 1
[2023-12-20 19:02:26] DEBUG  : demuxComponent : process message DEMUX_COMMAND_PREPARE.
[2023-12-20 19:02:26] DEBUG  : awplayer : source uri 'file:///forlinx/media/test.mp3'
[2023-12-20 19:02:26] DEBUG  : awplayer <__FileStreamConnect:407>: (6/0/4818092) path:'file:///forlinx/media/test.mp3'
[2023-12-20 19:02:26] DEBUG  : awplayer : parser node is id3v2.
[2023-12-20 19:02:26] DEBUG  : awplayer : Good, it's 'id3v2'
[2023-12-20 19:02:26] DEBUG  : awplayer : Good, it's 'mp3'
[2023-12-20 19:02:26] WARNING: awplayer : not implement...(18)
[2023-12-20 19:02:26] DEBUG  : awplayer : *********PrintMediaInfo begin*********
[2023-12-20 19:02:26] DEBUG  : awplayer : fileSize = 4818092, bSeekable = 1, duration = 300016, audioNum = 1, videoNum = 0, subtitleNum = 0
[2023-12-20 19:02:26] DEBUG  : awplayer : ***Audio[0]*** eCodecFormat = 0x3, eSubCodecFormat = 0x0, nChannelNum = 2, nBitsPerSample = 0, nSampleRate = 44100
[2023-12-20 19:02:26] DEBUG  : awplayer : *********P[ 2124.461204] [SNDCODEC][sunxi_card_hw_params][651]:stream_flag: 0
rintMediaInfo end*********
[2023-12-20 19:02:26] DEBUG  : demuxComponent : *********PrintMediaInfo begin*********
[2023-12-20 19:02:26] DEBUG  : demuxComponent : fileSize = 4818092, bSeekable = 1, duration = 300016, audioNum = 1, videoNum = 0, subtitleNum = 0
[2023-12-20 19:02:26] DEBUG  : demuxComponent : ***Audio[0]*** eCodecFormat = 0x3, eSubCodecFormat = 0x0, nChannelNum = 2, nBitsPerSample = 0, nSampleRate = 44100
[2023-12-20 19:02:26] DEBUG  : demuxComponent : *********PrintMediaInfo end*********
[2023-12-20 19:02:26] DEBUG  : awplayer : audio render component setting AudioSink
[2023-12-20 19:02:26] DEBUG  : awplayer : prepareAsync
[2023-12-20 19:02:26] DEBUG  : awplayer : process message XPLAYER_COMMAND_PREPARE. mPriData->mStatus: 4
12-20 19:02:26.531  (W) AUTPlayer info: prepare ok.

[2023-12-20 19:02:26] DEBUG  : awplayer : start
[2023-12-20 19:02:26] DEBUG  : awplayer : process message XPLAYER_COMMAND_START.
[2023-12-20 19:02:26] DEBUG  : awplayer <[ 2124.569726] [SNDCODEC][sunxi_card_hw_params][651]:stream_flag: 0
PlayerStart:740>: player start
[2023-12-20 19:02:26] DEBUG  : awplayer : audio decoder receive cmd: start
(Allwinner Audio Middle Layer),line(971) : Create Decoder!!=====
[2023-12-20 19:02:26] DEBUG  : awplayer : Create libadecoder success...
(Allwinner Audio Middle Layer),line(603) : AudioDec_Installaudiolib ok
(Allwinner Audio Middle Layer),line(606) : audio decoder init start ...
(AllwinnerAlibs),line(50) :
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Audio <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
tag   : audiocodec-v1.2
branch: new
commit: 3ba65962c01cbf1280ddda19d843009b6ef8ce85
date  : Tue Jan 8 16:25:27 2019 +0800
----------------------------------------------------------------------

(AllwinnerAlibs),line(700) : ----Loading so success!
(AllwinnerAlibs),line(902) : *************pAudioStreamInfo start******************
(AllwinnerAlibs),line(903) : eCodecFormat         :id(3), name(mpeg layer-III)
(AllwinnerAlibs),line(904) : eSubCodecFormat      :0
(AllwinnerAlibs),line(905) : nChannelNum          :2
(AllwinnerAlibs),line(906) : nBitsPerSample       :16
(AllwinnerAlibs),line(907) : nSampleRate          :44100
(AllwinnerAlibs),line(908) : nAvgBitrate          :128000
(AllwinnerAlibs),line(909) : nMaxBitRate          :128000
(AllwinnerAlibs),line(910) : nFileSize            :0
(AllwinnerAlibs),line(911) : eAudioBitstreamSource:0
(AllwinnerAlibs),line(912) : eDataEncodeType      :0
(AllwinnerAlibs),line(913) : nCodecSpecificDataLen:0
(AllwinnerAlibs),line(914) : pCodecSpecificData   :(nil)
(AllwinnerAlibs),line(915) : nFlags               :0
(AllwinnerAlibs),line(916) : nBlockAlign          :0
(AllwinnerAlibs),line(917) : *************pAudioStreamInfo end  ******************
(Allwinner Audio Libs),line(27) : init successs...
(Allwinner Audio Middle Layer),line(614) : AUDIO DECODE INIT OK...0
[2023-12-20 19:02:26] DEBUG  : awplayer : audio render receive cmd: start
[2023-12-20 19:02:26] INFO   : awplayer : audio render process start message.
[2023-12-20 19:02:26] DEBUG  : awplayer : init sound device.
[2023-12-20 19:02:26] DEBUG  : awplayer : set sound devide param, sample rate = 44100, channel num = 2.
[2023-12-20 19:02:26] DEBUG  : demuxComponent : process message DEMUX_COMMAND_START.
[2023-12-20 19:02:26] WARNING: awplayer : message 0x40a not handled.
======================================
|Space  key | start or pause    |
|Left   key | seek backend      |
|Right  key | seek forward      |
|Up     key | audio volume larger       |
|Down   key | audio volume small        |
======================================
[2023-12-20 19:02:26] DEBUG  : awplayer : start sound device.
[2023-12-20 19:02:26] DEBUG  : awplayer : audio device start end

[2023-12-20 19:02:26] DEBUG  : awplayer : first audio pts = 0
[2023-12-20 19:02:26] WARNING: awplayer : sample rate change from 44100 to 44100.
[2023-12-20 19:02:26] WARNING: awplayer : channel num change from 2 to 2.
[2023-12-20 19:02:26] WARNING: awplayer : bitPerSample num change from 16 to 16.
[2023-12-20 19:02:26] WARNING: awplayer : if need direct out put flag change from 0 to 1.
[2023-12-20 19:02:26] WARNING: awplayer : data type change from 1 to 1.
[2023-12-20 19:02:26] WARNING: awplayer : start sound devide again because samplaRate or channelNum change
[2023-12-20 19:02:26] INFO   : demuxComponent : waiting for audio stream buffer.
[2023-12-20 19:02:26] INFO   : demuxComponent : waiting for audio stream buffer.
[2023-12-20 19:02:27] INFO   : demuxComponent : waiting for audio stream buffer.
[2023-12-20 19:02:27] INFO   : demuxComponent : waiting for audio stream buffer.

=============================================
测试结果

视频 h264的文件能解,h265也可以解了;编码h264不正常。
音频 编码解码都可以正常运行。Sdk和测试app都可以运行,但是具体的编码格式没有详细测试。

你可能感兴趣的:(智能硬件,音频测试,视频编解码,音视频,GPIO,Linux,全志)