Texas Instruments | Using DSS Write-Back Pipeline for RGB-to-YUV Conversion on DRA7xx Devices | Application notes | Texas Instruments Using DSS Write-Back Pipeline for RGB-to-YUV Conversion on DRA7xx Devices Application notes

Texas Instruments Using DSS Write-Back Pipeline for RGB-to-YUV Conversion on DRA7xx Devices Application notes
Application Report
SPRACB0 – August 2017
Using DSS Write-Back Pipeline for RGB-to-YUV
Conversion on DRA7xx Devices
Subhajit Paul
ABSTRACT
This application report provides information on how to use the DSS Write-back pipeline for RGB-to-YUV
colorspace conversion on DRA7xx platform running Processor SDK Linux Automotive.
1
2
3
4
5
Contents
Introduction ...................................................................................................................
Prerequisites..................................................................................................................
DSS Write-Back Pipeline ...................................................................................................
Using DSS Write-Back Pipeline for RGB-to-YUV Conversion .........................................................
Conclusion ....................................................................................................................
1
2
2
3
3
List of Figures
1
DSS integration in the DRA7xx SoC ...................................................................................... 2
List of Tables
1
Results ........................................................................................................................ 3
Trademarks
All trademarks are the property of their respective owners.
1
Introduction
DRA7xx System-on-Chip (SoC) contains a video processing engine (VPE) which is a specialized
integrated peripheral (IP) for color space conversion of video frames in memory. This IP can be used for
color space conversion and scaling of video frames. VPE supports input frames in YUV color spaces and
can output frames in both RGB and YUV color spaces. However, VPE does not support RGB frames as
input.
The output of most graphics based applications is in RGB color space. Automotive customers interested in
car black-box use cases need to encode the output of graphics applications. For achieving this, the output
frames from graphics application need to be converted to YUV color space. This can be done by utilizing
the write-back pipeline present in the Display Sub-system (DSS) which is exposed to the ProcessorSDK
linux automotive users as a V4L2 (video4linux2) interface. The following application note will focus on how
to use the V4L2 interface to utilize the DSS write-back pipeline for RGB-to-YUV color space conversation
in addition to scaling.
SPRACB0 – August 2017
Submit Documentation Feedback
Using DSS Write-Back Pipeline for RGB-to-YUV Conversion on DRA7xx
Devices
Copyright © 2017, Texas Instruments Incorporated
1
Prerequisites
www.ti.com
2
Prerequisites
2.1
Software Requirements
This document is based on Processor SDK Linux Automotive 3.02. Please ensure that you:
• Have a working Processor SDK Linux Automotive 3.02 installation
• Are able to clone and build example applications based on Processor SDK Linux Automotive available
at:
git://git.ti.com/glsdk/example-applications.git
•
•
Are able to bring up the EVM with the U-Boot and Kernel images from the installation
Can see the V4L2 device node corresponding to the DSS write-back pipeline represented as
/dev/video10.
The release downloads links and software developers guide can be found at the following link:
http://processors.wiki.ti.com/index.php/Category:Processor_SDK_Linux_Automotive.
2.2
Hardware Requirements
The application described here was tested on a:
• Rev H J6 EVM
The application should work on J6 Eco and J6 Entry as well. However they have not been benchmarked
on J6 Eco and J6 Entry at this point.
3
DSS Write-Back Pipeline
3.1
DSS Integration
Figure 1. DSS integration in the DRA7xx SoC
2
Using DSS Write-Back Pipeline for RGB-to-YUV Conversion on DRA7xx
Devices
Copyright © 2017, Texas Instruments Incorporated
SPRACB0 – August 2017
Submit Documentation Feedback
DSS Write-Back Pipeline
www.ti.com
Figure 1 is a diagram representing the integration of DSS in the DRA7xx SoC. The write-back pipeline is
capable of working in two modes, namely capture mode and mem-to-mem mode. The following section
describes the two modes in detail.
3.2
Capture Mode
In capture mode, the output of an overlay-processing unit is input to the write-back pipeline. In this mode,
the write-back pipeline records the output that can also drive an external display device. This mode can be
used for screen capture capabilities. A V4L2 capture device interface is implemented in the ProcessorSDK
Linux Automotive to utilize this feature of the write-back pipeline.
3.3
Mem-to-Mem Mode
In mem-to-mem mode, output of a DSS pipeline is input to the write-back pipeline. In this mode, the writeback pipeline can be used for mem-to-mem color space conversion and scaling of input frames. A V4L2
mem-to-mem device interface is implemented in the Processor SDK Linux Automotive to utilize this
feature of the write-back pipeline. The following sections describe how to develop a linux application that
leverages this feature.
4
Using DSS Write-Back Pipeline for RGB-to-YUV Conversion
To use DSS write-back pipeline for color space conversion and scaling, you can use the test-v4l2-m2m
application, which is part of example-applications delivered as a part of ProcessorSDK Linux Automotive.
To use the test-v4l2-m2m application, run the following command on the target. The following usage
assumes that you have a file named srcfile-xbgr32.raw in your target file system which contains
1920x1080 RGB data.
target# test-v4l2-m2m /dev/video10 srcfile-xbgr32.raw 1920 1080 xbgr32 dstfilenv12.raw 1280 720 nv12 0 0
The application finishes converting all the frames in the file and the 1280x720 NV12 frames are stored in
the file named dstfile-nv12.raw.
5
Conclusion
In this document, a method to convert RGB frames to YUV format using the DSS write back pipeline is
described.
Table 1. Results
Time (ms)
Input 1920x1080 RGB Output 1920x1080 NV12 (CSC)
11.021
Input 1920x1080 RGB Output 1280x720 NV12 (CSC + Downscale)
11.002
Input 1280x720 RGB Output 1280x720 NV12 (CSC)
4.996
Input 1280x720 RGB Output 1920x1080 NV12 (CSC + Upscale)
12.761
SPRACB0 – August 2017
Submit Documentation Feedback
Using DSS Write-Back Pipeline for RGB-to-YUV Conversion on DRA7xx
Devices
Copyright © 2017, Texas Instruments Incorporated
3
IMPORTANT NOTICE FOR TI DESIGN INFORMATION AND RESOURCES
Texas Instruments Incorporated (‘TI”) technical, application or other design advice, services or information, including, but not limited to,
reference designs and materials relating to evaluation modules, (collectively, “TI Resources”) are intended to assist designers who are
developing applications that incorporate TI products; by downloading, accessing or using any particular TI Resource in any way, you
(individually or, if you are acting on behalf of a company, your company) agree to use it solely for this purpose and subject to the terms of
this Notice.
TI’s provision of TI Resources does not expand or otherwise alter TI’s applicable published warranties or warranty disclaimers for TI
products, and no additional obligations or liabilities arise from TI providing such TI Resources. TI reserves the right to make corrections,
enhancements, improvements and other changes to its TI Resources.
You understand and agree that you remain responsible for using your independent analysis, evaluation and judgment in designing your
applications and that you have full and exclusive responsibility to assure the safety of your applications and compliance of your applications
(and of all TI products used in or for your applications) with all applicable regulations, laws and other applicable requirements. You
represent that, with respect to your applications, you have all the necessary expertise to create and implement safeguards that (1)
anticipate dangerous consequences of failures, (2) monitor failures and their consequences, and (3) lessen the likelihood of failures that
might cause harm and take appropriate actions. You agree that prior to using or distributing any applications that include TI products, you
will thoroughly test such applications and the functionality of such TI products as used in such applications. TI has not conducted any
testing other than that specifically described in the published documentation for a particular TI Resource.
You are authorized to use, copy and modify any individual TI Resource only in connection with the development of applications that include
the TI product(s) identified in such TI Resource. NO OTHER LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE TO
ANY OTHER TI INTELLECTUAL PROPERTY RIGHT, AND NO LICENSE TO ANY TECHNOLOGY OR INTELLECTUAL PROPERTY
RIGHT OF TI OR ANY THIRD PARTY IS GRANTED HEREIN, including but not limited to any patent right, copyright, mask work right, or
other intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information
regarding or referencing third-party products or services does not constitute a license to use such products or services, or a warranty or
endorsement thereof. Use of TI Resources may require a license from a third party under the patents or other intellectual property of the
third party, or a license from TI under the patents or other intellectual property of TI.
TI RESOURCES ARE PROVIDED “AS IS” AND WITH ALL FAULTS. TI DISCLAIMS ALL OTHER WARRANTIES OR
REPRESENTATIONS, EXPRESS OR IMPLIED, REGARDING TI RESOURCES OR USE THEREOF, INCLUDING BUT NOT LIMITED TO
ACCURACY OR COMPLETENESS, TITLE, ANY EPIDEMIC FAILURE WARRANTY AND ANY IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL
PROPERTY RIGHTS.
TI SHALL NOT BE LIABLE FOR AND SHALL NOT DEFEND OR INDEMNIFY YOU AGAINST ANY CLAIM, INCLUDING BUT NOT
LIMITED TO ANY INFRINGEMENT CLAIM THAT RELATES TO OR IS BASED ON ANY COMBINATION OF PRODUCTS EVEN IF
DESCRIBED IN TI RESOURCES OR OTHERWISE. IN NO EVENT SHALL TI BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL,
COLLATERAL, INDIRECT, PUNITIVE, INCIDENTAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES IN CONNECTION WITH OR
ARISING OUT OF TI RESOURCES OR USE THEREOF, AND REGARDLESS OF WHETHER TI HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
You agree to fully indemnify TI and its representatives against any damages, costs, losses, and/or liabilities arising out of your noncompliance with the terms and provisions of this Notice.
This Notice applies to TI Resources. Additional terms apply to the use and purchase of certain types of materials, TI products and services.
These include; without limitation, TI’s standard terms for semiconductor products http://www.ti.com/sc/docs/stdterms.htm), evaluation
modules, and samples (http://www.ti.com/sc/docs/sampterms.htm).
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265
Copyright © 2017, Texas Instruments Incorporated
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising