Mail_Android_Video_SW_DDK_Intergration_Guide_And_Codec_User_Manual中文翻译【chapter1】
Chapter 1 Introduction
第一章 引言
this chapter gives an overview of the user and kernel space driver
components of the Mali Video Processor Android DDK. It contains the
following sections:
1.1 About the driver on page 1-11
1.2 Linux kernel device driver on page 1-12
1.3 User-space driver on page 1-14
1.4 Instrumentation on page 1-15
1.5 Additional information on page 1-16
本章概述了Mali視頻處理器Android DDK的用戶和內核空間驅動程序組件,包含以下部分:
1.1 關于驅動 1-11 頁
1.2 linux 內核設備驅動 1-12 頁
1.3 用戶空間驅動 1-14 頁
1.4 儀器 1-15 頁
1.5 附加信息 1-16 頁
1.1 About the driver
The Mali Video Processor Android DDK contains the Linux kernel device driver and OpenMAX components that support video
decode and encode.The DDK also contains integration tests to verify
correct integration.
1.1 關于驅動
Mali視頻處理器Android DDK包含Linux內核設備驅動程序和支持視頻解碼和編碼的OpenMAX組件。DDK還包含集成測試,以驗證是否正確集成。
1.2 Linux kernel device driver
The supplied device can be integrated with a new Linux kernel or Android platform if the differences between your plateform and the supplied implementation are restricted.
Integration is simple if your platform differences are restricted to the following list:
The Linux kernel version.
The interrupt line assigned to the Mali video processor hardware The physical addresses assigned to the Mali video processor hardware.
To integrate the device driver with a platform,you must perform these tasks:
1.Configure the supplied device driver for Mali video processor hardware in your device and the Linux kernel you are using.
2.Build and test the device driver on your plateform.
If your platform is different from the reference implementation in ways that are not listed above , it might be necessary to modify the device driver or provide your own full port of the driver. The process for porting a new device driver is hardware and OS-specific.
1.2 Linux 內核設備驅動程序
如果你的平臺和提供的實現之間的差異受到限制,那么提供的設備可以與一個新的 linux 內核或 android 平臺集成。
如果您的平臺差異限于以下列表,則集成很簡單:
1.Linux內核版本
2.分配給Mali視頻處理器硬件的中斷線
3.分配給Mali視頻處理器硬件的物理地址
要將設備驅動程序與平臺集成,必須執行以下任務:
1.在設備和正在使用的Linux內核中為Mali視頻處理器硬件配置提供的設備驅動程序
2.在平臺上構建并測試設備驅動程序。
如果您的平臺在以上未列出的方式上與參考實現不同,則可能有必要修改設備驅動程序或提供您自己的驅動程序完整端口。移植新設備驅動程序的過程是特定于硬件和特定于操作系統的。
1.2.1 Device driver architecture
The device driver consists of two kernel objects, base and resource. The base kernel object contains all functionality that is individual for each session. Examples are Memory Management Unit (MMU) table management, and input/output message queue management.The base also contains the implementation of the device driver interface that userspace applications use to interact with the device driver. Userspace interacts with the kernel drivers using ioctl messages. The resource kernel object encapsulates all functional entities that only have a single instance.Examples are register access functionality,IRQ handling,and the session scheduler.The following figure shows the two kernel objects and their sub modules.
The driver supports user space allocated input and output buffers.The following allocators are supported:
1.Valloc
2.Malloc
3.Gralloc
4.DMA-buffer
If your Gralloc implementation does not use DMA-buffer or ashmem as memory allocator,you must add support for your allocator by implementing the interface defined by mve_buffer.h The driver has been tested with the reference Gralloc implementation that is part of Android, and with the Gralloc implementation from ARM.
1.2.1設備驅動架構
設備驅動程序由兩個內核對象組成:基礎對象和資源?;緝群藢ο蟀總€會話各自的所有功能。示例包括內存管理單元(MMU)表管理和輸入/輸出消息隊列管理。該庫還包含用戶空間應用程序用來與設備驅動程序進行交互的設備驅動程序接口的實現。用戶空間使用ioctl消息與內核驅動程序進行交互。資源內核對象封裝了只有一個實例的所有功能實體,例如寄存器訪問功能,IRQ處理和會話調度程序。下圖顯示了兩個內核對象及其子模塊。
驅動程序支持用戶空間分配的輸入和輸出緩沖器。
支持以下分配器:
1.Valloc
2.Malloc
3.Gralloc
4.DMA-buffer
如果您的Gralloc實現未使用DMA緩沖區或ashmem作為內存分配器,則必須通過實現mve_buffer.h定義的接口來添加對分配器的支持。該驅動程序已使用參考Gralloc實現進行了測試,該實現是Android的一部分,并通過來自ARM的Gralloc實現。
1.3 User-space driver
The user-space driver consists of OpenMAX decoder and encoder components.These components act as a layer between the client applications and the kernel driver.
OpenMAX works by connecting components together using input and output ports.The output port of a component is connected to the input port of the next component in the chain.For efficient buffer usage,the output buffer of a component is used directly as input buffer of the next component.The OpenMAX components,supplied by ARM, support buffer sharing if the buffers are allocated by:
1.Valloc or malloc
2.Gralloc,and the memory backend allocator is DMA-buffer or ashmem.
The client application creates the OpenMAX components using an OpenMAX core.The core is responsible for exposing the components to client applications and allowing components to be instantiated.The client communicates directly with the component when it has been instantiated.For more information about OpenMAX,refer to
https://www.khronos.org/registry/omxil/
1.3 用戶空間
用戶空間驅動程序由OpenMAX解碼器和編碼器組件組成,這些組件充當客戶端應用程序和內核驅動程序之間的一層。
OpenMAX通過使用輸入和輸出端口將組件連接在一起來工作。組件的輸出端口連接到鏈中下一個組件的輸入端口。為了有效地使用緩沖區,組件的輸出緩沖區直接用作下一個組件的輸入緩沖區 。ARM提供的OpenMAX組件,如果通過以下方式分配緩沖區,則支持緩沖區共享:
1.Valloc or malloc
2.Gralloc,and the memory backend allocator is DMA-buffer or ashmem.
客戶端應用程序使用OpenMAX內核創建OpenMAX組件。該內核負責將組件公開給客戶端應用程序,并允許實例化組件。實例化后,客戶端直接與組件進行通信。有關OpenMAX的更多信息,請參閱
到https://www.khronos.org/registry/omxil/
1.4 Instrumentation
You can use ARM DS-5 Streamline to collect counters and events from the Mali Android Video software driver.This has been tested on version 5.19 of ARM DS-5 Streamline.
1.4 儀器
您可以使用ARM DS-5 Streamline從Mali Android Video軟件驅動程序收集計數器和事件。這已在ARM DS-5 Streamline 5.19版上進行了測試。
1.5 Additional information
ARM does not support or provide patches to the Android framework to extend the set of Android features.
ARM has codecs for VC1 and RealVideo.Android does not currently include any file parsers offering support for these types of streams.If you want to be able to play VC1 to RealVideo encoded streams,you must download the binaries for the codecs from http://connect.arm.com and write the extensions to the relevant Android frameworks yourself.
ARM provides a libjpeg implementation that uses the video processor to accelerate decoding and encoding of JPEG streams .This implementation is a proof of concept and must not be used as a production quality component.
1.5 附加信息
ARM不支持或不提供Android框架補丁來擴展Android功能集。
ARM具有用于VC1和RealVideo的編解碼器。Android目前不包含任何支持這些類型的流的文件解析器。如果要能夠將VC1播放到RealVideo編碼的流,則必須從http://connect.arm.com下載該編解碼器的二進制文件,然后將擴展名自己寫入相關的Android框架。
ARM提供了一個libjpeg實現,該實現使用視頻處理器來加速JPEG流的解碼和編碼。此實現是概念證明,不能用作生產質量組件。
總結
以上是生活随笔為你收集整理的Mail_Android_Video_SW_DDK_Intergration_Guide_And_Codec_User_Manual中文翻译【chapter1】的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: KeyBert、TextRank等九种本
- 下一篇: 《apue》 首次拜读完经典之作,两三记