「 Notes 」 Qualcomm Video Documents Notes

■ Multimedia Driver Development and Bringup Guide – Audio (80-NU323-1)
■ Multimedia Driver Development and Bringup Guide – Camera (80-NU323-2)
■ Multimedia Driver Development and Bringup Guide – Display (80-NU323-3)

File 《80-NU323-5》 Video Bringup User Guide

  1. For nonsecure playback/recording, video session buffers are allocated in the system heap and are checked at the following location:
adb shell
cat/d/ion/clients/video_client-0
cat/d/ion/clients/video_client-1
  1. check video session buffers allocated in the mm heap for secure playback
adb shell
cat /d/ion/heaps/mm
  1. Verify recording and playback functionality
The following log message shows the decoder component that is selected.
QTI decoder: ACodec : [OMX.qcom.video.decoder.avc] DRC Mode: Dynamic BufferMode
Google decoder: ACodec : [OMX.google.h264.decoder] DRC Mode: Dynamic BufferMode

Enable the following flag in the ACodec.cpp file
Change//#define LOG_NDEBUG 0to #define LOG_NDEBUG 0
  1. Debug ---- from 《80-NU330-1 C Android Video Debug guide》
    capture the userspace and kernel log with the following log masks:
adb shell setprop vendor.vidc.debug.level 7
adb shell "echo 0x3F > /d/msm_vidc/fw_level”
adb shell “echo 0x103F > /d/msm_vidc/debug_level”

///////////////////////////////////////////////////////////////////////////////////
// 1. Check the number of frame drops while playing a video
adb shell setprop persist.debug.sf.stats 1

// Sample log
I/NuPlayerDriver(396):NuPlayer
I/NuPlayerDriver(396):mime(video/avc)
I/NuPlayerDriver(396):decoder(OMX.qcom.video.decoder.avc)
I/NuPlayerDriver(396):resolution(1920 x 1080)
I/NuPlayerDriver(396):numFramesTotal(1160), numFramesDropped(1),percentageDropped(0%)

///////////////////////////////////////////////////////////////////////////////////
// 2. Modify the Venus clock and verify the use case
//## open framdrops log
adb shell setprop persist.debug.sf.stats 1

//## a. Set Venus Clock to TURBO
adb shell setprop vidc.debug.turbo 1

//## b. Disable DCVS for decoder
adb shell "echo 0 > /d/msm_vidc/dcvs_dec_mode"

//## c. Disable DCVS for encoder
adb shell "echo 0 > /d/msm_vidc/dcvs_enc_mode"

//## d. Enable all CPUs
adb shell stop mpdecision
adb shell stop thermald
adb shell "echo 1 > /sys/devices/system/cpu/cpu1/online"
adb shell "echo 1 > /sys/devices/system/cpu/cpu2/online"
adb shell "echo 1 > /sys/devices/system/cpu/cpu3/online"
adb shell "echo 1 > /sys/devices/system/cpu/cpu4/online"
adb shell "echo 1 > /sys/devices/system/cpu/cpu5/online"
adb shell "echo 1 > /sys/devices/system/cpu/cpu6/online"
adb shell "echo 1 > /sys/devices/system/cpu/cpu7/online"


//## e. change the CPU to Performance Mode
adb shell "echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"
adb shell "echo performance > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor"
adb shell "echo performance > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor"
adb shell "echo performance > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor"
adb shell "echo performance > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor"
adb shell "echo performance > /sys/devices/system/cpu/cpu5/cpufreq/scaling_governor"
adb shell "echo performance > /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor"
adb shell "echo performance > /sys/devices/system/cpu/cpu7/cpufreq/scaling_governor"


//## f. Capture required debug imformation
//for hardware codecs 
adb root
adb remount
adb shell setprop vidc.debug.level 7
adb shell setprop vpp.debug.level 7 (if vpp enabled)
adb shell "echo 0x103f > /d/msm_vidc/debug_level"
adb shell "echo 0x3F > /d/msm_vidc/fw_level"
adb shell "echo 0 > /proc/sys/kernel/kptr_restrict"1. Capture OMX logs.
“setprop vidc.debug.level 7for the hardware codecs
“setprop omx_swvdec.log.level 7for the QTI software codecs
2. Capture V4L2 logs.
echo 100 > /sys/module/videobuf2_core/parameters/debug
3. Capture driver logs.
adb shell "echo 0x103f > /d/msm_vidc/debug_level"
adb shell "echo 0 > /proc/sys/kernel/kptr_restrict"
4. Capture firmware logs.
adb shell "echo 0x3F > /d/msm_vidc/fw_level"
adb shell "echo 0 > /proc/sys/kernel/kptr_restrict"
5. Capture input/output buffer logs.
adb root
adb remount
adb shell chmod 777 /data/misc/media
-Encoder
adb shell setprop vidc.enc.log.in 1
adb shell setprop vidc.enc.log.out 1
-Decoder – Hardware codecs
adb shell setprop vidc.dec.log.in 1
adb shell setprop vidc.dec.log.out 1
-Decoder – QTI software codecs
adb shell setprop omx_swvdec.dump.ip 1
adb shell setprop omx_swvdec.dump.op 1
bitstreams/yuv will be stored at /data/misc/media/

//for QTI software codecs
adb shell setprop omx_swvdec.log.level 7

//Capture media player statistics
adb shell setprop persist.debug.sf.stats 1

//Systrace – Capture video-enabled system trace logs in systrace recorder and include all events. 
//See http://developer.android.com/tools/help/systrace.html for more details.
//Alternate command to capture systrace
systrace.py gfx input view webview wm am audio video camera hal res dalvik sched freq idle disk load sync workq -b 50480 -t 10 -o mynewtrace.html
//The buffer and duration are modified to capture the issue. Ensure that the device is rooted and remounted.

//Capture user space logs and kernel logs with the following commands:
“adb logcat –v threadtime” for collecting userspace(logcat) logs
“adb logcat –b kernel” for collecting kernel(dmesg) logs

-----------------------------------------------------------------------------------------------------

//2. Capture input/output OMX buffers to analyze bitstream, GOP structure, macroblock QP, and
//so on, to analyze the rate control content.
//a. Output buffer log
“adb shell setprop vidc.dec.log.out 1for hardware codecs
//or
“adb shell setprop omx_swvdec.dump.op 1for QTI software codecs

//b. Input buffer log
“adb shell setprop vidc.dec.log.in 1for hardware codecs
//Or
“adb shell setprop omx_swvdec.dump.ip 1for QTI software codecs

//3. Capture OMX IL encoder logs and ensure that the input buffer timestamps are included.
“adb shell setprop vidc.debug.level 7for hardware codecs or QTI software codecs

//Enable/Disable Perceptual Quantization (PQ)
//Perceptual Quantization (PQ) is a new feature in encoder to improve the quality for homogenous region in a frame. Use the following commands to enable/disable PQ:
//To enable PQ
adb shell setprop vidc.enc.disable.pq 0
//To disable PQ
adb shell setprop vidc.enc.disable.pq 1

//1. Capture OMX logs.
“setprop vidc.debug.level 7for the hardware codecs
“setprop omx_swvdec.log.level 7for the QTI software codecs

//2. Capture V4L2 logs.
echo 100 > /sys/module/videobuf2_core/parameters/debug

//3. Capture driver logs.
adb shell "echo 0x103f > /d/msm_vidc/debug_level"
adb shell "echo 0 > /proc/sys/kernel/kptr_restrict"

//4. Capture firmware logs.
adb shell "echo 0x3F > /d/msm_vidc/fw_level"
adb shell "echo 0 > /proc/sys/kernel/kptr_restrict"

//5. Capture input/output buffer logs.
adb root
adb remount
adb shell chmod 777 /data/misc/media

//-Encoder
adb shell setprop vidc.enc.log.in 1
adb shell setprop vidc.enc.log.out 1
//-Decoder – Hardware codecs
adb shell setprop vidc.dec.log.in 1
adb shell setprop vidc.dec.log.out 1
//-Decoder – QTI software codecs
adb shell setprop omx_swvdec.dump.ip 1
adb shell setprop omx_swvdec.dump.op 1
bitstreams/yuv will be stored at /data/misc/media/

6. Capture the number of ETB/EBD and FTB/FBD.
adb shell cat /d/msm_vidc/core0/inst*/info

//6.1 Debug a video framework playback issue

//2. Verify whether QTI parser is used. QTI parser supports most container format, and QTI has
tested only with QTI parser.
adb shell setprop mm.enable.qcom_parser 37491
adb shell getprop mm.enable.qcom_parser

//3. Disable audio from the scenario; it helps narrow down the issue.
"adb shell setprop persist.debug.sf.noaudio 1for playback use case
"adb shell setprop persist.debug.sf.noaudio 3for recording use case

//4. Debug a video framework recording issue
adb shell setprop persist.debug.sf.noaudio 3

你可能感兴趣的:(07--Android,Media)