Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use PX2 to hard-code H.264 [CODE_PX2] Encode_H264

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article to share with you is about how to use PX2 hard coding H.264 [CODE_PX2]Encode_H264, Xiaobian think it is quite practical, so share it with you to learn, I hope you can gain something after reading this article, do not say much, follow Xiaobian to have a look.

The Rayeager PX2 development board has very powerful multimedia processing capabilities. If you need to invoke hardware acceleration to decode ordinary media files/streams, you only need to invoke multimedia related interfaces according to Android standards.

For the special needs of some industry users, Rayeager PX2 actually opens the interface to decode bare streams such as H.264.

Here is a code to decode the H.264 bare code stream. If you have some experience in Android system development, you will soon be able to understand and rewrite it. How to use:

Decompress the code in the root directory of Android compilation environment of PX2, and enter the ChipSPARK_PX2_H264_DECODER folder. Execute the following command to compile:

mm -B

The executable file can be generated at the following path: out/target/product/rkpx2/system/bin/vpu_apiDemo

Push the file to the PX2 board via adb, noting that chmod 777 grants execution permissions.

Decode is performed in the adb shell with the following command:

./ vpu_apiDemo -i h364 codestream file-coding 7

The-coding 7 indicates that the file is H.264 encoded, in fact, the code can be modified to decode many other types of code streams and even encode. Logcat allows you to see the relevant decoding status.

Related API in this path: /hardware/rk29/libon2/vpu_api. h

Code: ChipSPARK_PX2_H264_DECODER.zip

Command line parameters:

vpu_apiDemo -i yuv data file-o /mnt/sdcard/output 264 file name-coding 7 -t 2 -w 320 -h 240

where-t2 indicates that the encoding action is performed.

ChipSPARK_PX2_H264_ENCODER.zip

This is a compiled binary file that can be pushed directly into the system test. You guessed it, this file also has the same bare code decoding function mentioned in the previous post.

CHIPSPARK_vpuDEMO_bin.zip

The above is how to use PX2 hard code H.264 [CODE_PX2]Encode_H264, Xiaobian believes that some knowledge points may be seen or used in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report