VERIFY SAMPLE
1. Overview¶
This article introduces the SDK released test demo, it is mainly a simple test of single module or multiple modules, which is used to guide users to encapsulate API for single module.
2. Release Sample¶
2.1. gfx¶
gfx needs to use physical memory, so the mi_sys
module will be introduced. Specific operations include quickfill
, bitblit
, blending
, etc.
The code path:
/sdk/verify/feature/gfx
Compilation method:
vi /project/release/customer_tailor/nvr_i2m_display_glibc_tailor.mk
Add verify_gfx:=enable
at the end.
Then cd /sdk/verify/feature
; make gfx
You can also code the makefile to compile the sample code (recommended).
Note: the file format and path generated in the demo need to be obtained by reading the code, or you can define it yourself.
2.2. disp+panel¶
The code mainly connect the output display of disp and panel, obtain an input buffer from disp, and put the filled YUV data into the disp module, so that the panel can display the related YUV files.
The code path:
/sdk/verify/feature/disp
Compilation method:
vi /project/release/customer_tailor/nvr_i2m_display_glibc_tailor.mk
Add verify_disp:=enable
at the end.
Modify /sdk/verify/feature/disp/config.mk,SRCS:= disp_ut.c panel_ut.c init_panel_driveric.c
Then cd /sdk/verify/feature
; make disp
; generate bin: prog
Run:
./prog -f YUV420SP_352_288.yuv -w 352 -h 288 -o ttl
-f: YUV parameter, file format is semiplaner420.
-w: the width displayed on the panel.
-h:the height displayed on the panel.
-o: ttl/mipi(panel type, the demo version is 800*480 TTL by default)
2.3. ai/ao¶
The code mainly provides ai/ao
sample code, including audio-related functions such as capture
, play
, vqe
, aec
, nr
, etc.
The code path:
/sdk/verify/mi_demo/geonosis/audio_all_test_case
Compilation method:
cd /sdk/verify/mi_demo/geonosis make audio_all_test_case
Audio plug-in and operating method reference: [Demo board audio instructions] (../audio/audio.md).
2.4. vdec¶
The code mainly realizes the concatenation of vdec
and disp
, and then sends es
stream to vdec
. After decoding and binding with disp
, disp
will finally display the picture of es
stream.
The code path:
/sdk/verify/feature/disp
Compilation method:
vi /project/release/customer_tailor/nvr_i2m_display_glibc_tailor.mk
Add verify_disp:=enable
at the end
Modify /sdk/verify/feature/disp/config.mk, SRCS:= (disp_ut.c) vdec_ut.c init_panel_driveric.c
If you use vdec_ut.c
, change USE_CASE:=disp
to USE_CASE:=vdec_disp
accordingly.
Then cd /sdk/verify/feature;make disp
, generate bin file: prog
Run:
./prog -f 720P265.h264 -w 640 -h 360
-f : H264es, the file has a header for reading nalu, and there is an es stream in the application download directory
-w : The width displayed on the panel
-h : The hight displayed on the panel
Note: -w and -h are not the width and height of the video stream, which need to be written in the code.
2.5. application¶
Application corresponded demo is located in sdk\verify\application
, if you need it running after booting, perform the following process:
-
Modify
/project/release/customer_tailor/nvr_i2m_display_glibc_tailor.mk
, addverify_bootanimation:=enable
at the end. -
cd /project.
-
/setup_config.sh configs/nvr/i2m/8.2.1/nor.glibc-squashfs.011a.64.
-
make clean;make image //enter application directory to fetch related resources, and then package them into images.
-
The compilation will automatically copy the application-related content to the image and package it into a burned image.
2.6. Mi_demo¶
Mi_demo corresponded demo is located in sdk\verify\mi_demo\geonosis
, compilation method is as follows (take compiling audio_all_test_case
as an example):
-
Add
audio_all_test_case
intosdk\verify\mi_demo\geonosis\Makefile
; -
Enter in
sdk/verify/mi_demo
directory, make clean;make. -
The generated demo is in
sdk/verify/mi_demo/out/demo/app: prog_audio_all_test_case