Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jpg硬解码超时1s #9

Open
nihui opened this issue Sep 23, 2023 · 0 comments
Open

jpg硬解码超时1s #9

nihui opened this issue Sep 23, 2023 · 0 comments

Comments

@nihui
Copy link

nihui commented Sep 23, 2023

参考帖子 https://whycan.com/t_5429.html

代码参考
https://github.com/EmperG/lindenis-v536-package/blob/master/allwinner/tina_multimedia/jpegdecode/jpegdecode.c
https://github.com/EmperG/lindenis-v536-package/blob/master/allwinner/tina_multimedia_demo/jpegdecodedemo/src/jpegdecodedemo.c

链接库目录 Yuzukilizard/Software/sunxi-mpp/lib

project(testyuzuki)
cmake_minimum_required(VERSION 3.5)

set(CMAKE_BUILD_TYPE release)

set(CMAKE_CXX_STANDARD 11)

include_directories("/home/nihui/osd/Yuzukilizard/Software/BSP/platform/allwinner/eyesee-mpp/middleware/sun8iw21/media/LIBRARY/libcedarc/include")
link_directories("/home/nihui/osd/Yuzukilizard/Software/BSP/platform/allwinner/eyesee-mpp/middleware/sun8iw21/media/LIBRARY/libcedarc/library/musl")

link_directories("/home/nihui/osd/Yuzukilizard/Software/sunxi-mpp/lib")

add_executable(testyuzuki jpegdecode.c jpegdecodedemo.c)

target_link_libraries(testyuzuki
    libvdecoder.a
    libvideoengine.a
    libawmjpeg.a
    libawh264.a
    libawh265.a
    libVE.a
    libcdc_base.a
    libMemAdapter.a
)
root@TinaLinux:~# ./testyuzuki 
****************************************************************************
* This program shows how to decode a jpeg picture to yuv or rgb data
***************************************************************************
Usage:
jpegdecodedemo argv[1] argv[2] argv[3] 
 argv[1]: the jpeg file which contains absolute path
 argv[2]: the scaledown mode,support :0,1,2,3;0 means no scaledown,1 means scaledown 1/2,2 means scaledown 1/4,3 means scaledown 1/8 
 argv[3]: the decoded data type,support:nv21 nv12 yu12 yv12 and rgb565 
for example:jpegdecodedemo /mnt/SDCARD/test.jpg 1 yv12 
root@TinaLinux:~# ./testyuzuki in.jpg 0 nv21
****************************************************************************
* This program shows how to decode a jpeg picture to yuv or rgb data
***************************************************************************
INFO   : cedarc <VeInitialize:1185>: *** ic_version = 0x1302000023010,
AddVDPlugin firstINFO   : cedarc <CedarPluginVDInit_h264:73>: register h264 decoder success!
INFO   : cedarc <CedarPluginVDInit_h265:82>: register h265 decoder success!
INFO   : cedarc <CedarPluginVDInit_mjpeg:80>: register mjpeg decoder success!
srcBuf = 0xb6e14010,srcBufLen = 557455
JpegDecoderSetDataSource end
WARNING: cedarc <LogVersionInfo:44>: 
>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Cedar Codec <<<<<<<<<<<<<<<<<<<<<<<<<<<<
tag   : 
branch: tina-v853-dev
commit: ee230a47e5a2392ec315795121c2d112492fac1c
date  : Fri Jul 22 10:37:50 2022 +0800
author: wuguanjian
change-id : I28fe0c31c718f097d61ad6bdbcb4cb5df0bd3575
release_author : lichaopdc
patch : 
----------------------------------------------------------------------

iniparser: cannot open /tmp/libcedarc_dynamic_log_level
INFO   : cedarc <cdc_log_set_level:43>: Set log level to 5 from /vendor/etc/cedarc.conf
WARNING: cedarc <InitializeVideoDecoder:455>: warning: the nDecodeSmoothFrameBufferNum is 0
WARNING: cedarc <InitializeVideoDecoder:461>: warning: the nDeInterlaceHoldingFrameBufferNum is 0
WARNING: cedarc <InitializeVideoDecoder:467>: warning: the nDisplayHoldingFrameBufferNum is 0
ERROR  : cedarc <VDecoderRegister:112>: Add '115:h264' fail! '115:h264' already register!
ERROR  : cedarc <CedarPluginVDInit_h264:77>: register h264 decoder failure!!!
ERROR  : cedarc <VDecoderRegister:112>: Add '116:h265' fail! '116:h265' already register!
ERROR  : cedarc <CedarPluginVDInit_h265:86>: register h265 decoder failure!!!
ERROR  : cedarc <VDecoderRegister:112>: Add '101:mjpeg' fail! '101:mjpeg' already register!
ERROR  : cedarc <CedarPluginVDInit_mjpeg:84>: register mjpeg soft decoder failure!!!
Request Video Stream Buffer ok
Copy Video Stream Data ok!
Submit Video Stream Data ok!
WARNING: cedarc <waitInterruptDecoder:768>: wait ve interrupt timeout. ret = 0
decode time = 1026597 us
decoder one pic...
pic nWidth is 1280,nHeight is 720
videoPicture->nWidth = 1280,videoPicture->nHeight = 720,videoPicture->nLineStride = 1280
videoPicture->nTopOffset = 0,videoPicture->nLeftOffset = 0,videoPicture->nBottomOffset = 720,videoPicture->nRightOffset = 1280
acturalWidth = 1280,height = 720
save yuv data successfully,path = /tmp/save_1280_720_nv21.datfree jpeg
dataJpegDecoderGetFrame successfully,imgFrame->mWidth = 1280,imgFrame->mHeight = 720,imgFrame->mYuvData = 0xb6953010,imgFrame->mYuvSize = 1382400
imgFrame->mRGB565Data = 0,imgFrame->mRGB565Size = 0

*************************************************************************
* Quit the program, goodbye!
********************************************************************

尝试重新写了个,发现依然会 wait ve interrupt timeout.

root@TinaLinux:~# ./testyuzuki 
size = 557455
124.757
1280 x 720
sampling_factor = 3
INFO   : cedarc <VeInitialize:1185>: *** ic_version = 0x1302000023010,
WARNING: cedarc <LogVersionInfo:44>: 
>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Cedar Codec <<<<<<<<<<<<<<<<<<<<<<<<<<<<
tag   : 
branch: tina-v853-dev
commit: ee230a47e5a2392ec315795121c2d112492fac1c
date  : Fri Jul 22 10:37:50 2022 +0800
author: wuguanjian
change-id : I28fe0c31c718f097d61ad6bdbcb4cb5df0bd3575
release_author : lichaopdc
patch : 
----------------------------------------------------------------------

iniparser: cannot open /tmp/libcedarc_dynamic_log_level
INFO   : cedarc <cdc_log_set_level:43>: Set log level to 5 from /vendor/etc/cedarc.conf
WARNING: cedarc <waitInterruptDecoder:768>: wait ve interrupt timeout. ret = 0
pic is 1280 x 736
....................... 1098.998


如果我用 https://github.com/mangopi-sbc/tina-package/tree/main/allwinner/liballwinner_tina/liballwinner/LIBRARY/libcedarc/library/lib32/muslgnueabi 这里的库链接,运行时segmentation fault,可能是版本不匹配

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant