intel-media-driver: Bitstream is corrupted on occasion - intel-media-sdk

We are developing the video recording device using ffmpeg and vaapi for encoding. Currently we have a trouble that the video recording data is corrupted on occasion. When recording for a week, the error is whether it happens once.
We have debugged using CodecDbgSetting.cfg in the media-driver, and we have enabled the following configurations.
For the debug information to be input to the encoder:
PicParams:1
SlcParams:1
CmdBufferMfx:1
EncodeRawInputSurface:1
For the debug information to be output from the encoder:
Bitstream:1
Recording was performed using the same input image, and we compared the debug information of error case with the debug information of correct case. As the result, only the PAK_Bitstream_I_Frame.dat generated by the Bitstream specification was different. So we are considering there is a problem in the layer below the media-driver.
Is our considertion correct?
We don't know how to debug the lower layer from the media-driver.
Would you please give us some advice to continue to debug?
Here is our environments.
media-driver: 18.3.0
OS: Ubuntu 16.04.5 LTS (kernel 4.15.0-51-generic)
CPU: Intel(R) Xeon(R) CPU E3-1505M v6

Related

SyCL ComputeCpp: issues with the matrix_multiply SDK example

I just managed to install successfully the SyCL ComputeCpp + OpenCL (from CUDA) and running cmake to generate the samples VS2019 sln, successfully.
I've tried to run the matrix_multiply example ONLY, for now.
It ran successfully using the Intel FPGA emulator as a default device.
Changing the devices to the Device CPU worked well as well.
Choosing the host device, took ages without exiting.
When I tried to change the device to the nVidia, the GeForce GTX 1650 Ti.
I got this expection error from there ComputeCpp:RT0100, etc etc.
Googling a bit, I found I'd probably have to output the PTX instead of the SPIR.
So I regenerated the sln using -DCOMPUTECPP_BITCODE=ptx64
After doing that, the kernel ran successfully on the nVidia GPU.
My first question is: is that needed since nVidia does NOT support spir yet at the time of this writing, but only PTX?
However this broke the other devices, which are now reporting:
[ComputeCpp:RT0107] Failed to create program from binary
This happens now for all devices: Intel GPU, Device CPU, Device FPGA (While were formerly working)
Inspecting the .sycl I found now SYCL_matrix_multiply_cpp_bin_nvptx64[].
My question is: how to support nVidia with ptx and "normal" devices with spir altogether in the same exe? I did a menĂ¹ from which the user can choose to play with, but now it's working only for nVidia.
What am I doing wrong, please?
I would expect to be able to run the same .sycl code for all the devices despite it contains ptx or spir. How to manage for that?
EDIT: I just tried to retarget the bitcode to spirv64, since the computecpp_info told me all my devices are supposed to support it.
However, now no device is anymore working with that setting :-(

Monitoring GPU usage by FFMPEG

I have an small http server which receives requests to process some video clips. The server spawns a child process and uses FFMPEG for this. I recently compiled FFMPEG to use GPUs. I am using an Nvidia GeForce GTX 1080.
However I am unable to figure out a way to analyse the memory and other usage statistics of GPUs. I have tried nvidia-smi, but it seems to return 0% always.
The question I have is what are some of the best tools that are available for monitoring GPU usage.
Edit - I am on Ubuntu 16.04 and only have remote access. So command-line tools are better.
I finally figured out that nvidia-smi provides various ways to monitor and log gpu stats. nvidia-sim dmon -f --filename periodically logs the gpu stats to a file. nvidia-smi daemon also does somethin similar

Desktop GPU encoding using gstreamer in WINDOWS

I have developed the gstreamer GPU encoding on Nvidia Jetson Tx2. but now i am
trying for Desktop Nvidia GPU encoding using gstreamer.
I am not able get "omxh264enc" in the listed supported elements using
"gst-inspect-1.0.exe".
so, i want to do hardware encoding on* desktop GPU* using Gstreamer.
Kindly guide me in right direction, or any sample command line or program
for desktop gpu supported encoding.
Note: i am trying on laptop gpu + visual studio 2015
Regards,
adi
Depends on your GPU hardware. There is nvenc for NVIDIA and msdk for Intel at least. It may be that you have to build these elements yourself as they require proprietary libraries from 3rd party vendors that GStreamer can't redistribute. There is no omx on PC, that one is used for embedded devices primarily.

Windows Media Foundation UVC 8 Megapixel video stream

I'm investigating an issue with an in-house developed app using WMF to capture UVC data from a Cypress FX3 device. The stream is generated from a test pattern generator fed from an FPGA to the FX3. For a frame size of 1920x1080 (#30FPS), the frame capture works fine. For a frame size of (say) 3264x2448 (at <8FPS to meet throughput restrictions) the app is getting stuck during the ReadSample(). It does appear data is being received as the data image pattern can be seen in memory. Device enumeration looks ok i.e. the reported descriptors look to be correct and SelectFormat() is set accordingly.
Are there any restrictions on frame size?
I see that problem with your hardware is very specific and can be related with hardware part. The frame size - 3264x2448 is very huge. I have experience with Logitecn HD Pro Webcam C920 and I can get max frame size 2304x1536 at 2 FPS and RGB24. If you have connected via USB then it can be problem to transmit it via USB bus (especially for USB2). You must know that Windows Media Foundation is engine of the media part of Windows - for example WindowsStore can work only with Media Foundation. More over, Windows 10 Includes encoder and decoder for HEVC (H265) video and supports 4K and 8K in native, but playing video and working with live video via USB has some difference.

How to view bootchart of an embedded device such as smartphone?

I have a laptop installed windows 7 x64 and a virtual machine with Ubuntu 12.04. I installed Bootchart on my virtual machine. I can view bootchart diagram of my virtual machine after log it on.
But I wonder... Is there any way to view bootchart diagram of an embedded device such as my android smartphone if i connect it to my laptop?
Can you help me to solve this? Thank you very much.
If you are a developer with the Android source code, you can use the following method and the bottom link to enable the bootchart on you smartphone.
brief instruction is like:
install the bootchart tool on your host machine
build 'init' with bootchart support
install 'init' into your system image
trigger bootchart functionality on system boot
retrieve the collected data from the system
generate the graphic from the data
view the resulting graphic
interpret the results
and more details please refer to :
http://elinux.org/Using_Bootchart_on_Android
dmesg command will be the one of the most helpful tool in providing log messages right from beginning of booting as far as any operating system based on linux. It prints the message buffer of kernel and it should also enable you to decode the boot sequence. You can also redirect the kernel messages using the 'console' command via the interface(UART / USB) that is available on the device.
Another interesting tool that could work in tandem with dmesg is netconsole if the device does not provision for other interface based logging or issues in disk logging. It sends all kernel log messages without any dependency on userspace, to another computer over the network (UDP) . However note that netconsole initializes only after NIC card initialization and hence capture of early kernel logs before this point will not be there but captures the rest of the boot process.

Resources