Enabling Hardware Accelerated VC-1 AP Interlace on Intel Atom Processor E38XX Series

Similar documents
Video Encoding on Intel Atom Processor E38XX Series using Intel EMGD and GStreamer

Intel Media SDK Library Distribution and Dispatching Process

The Case for Rack Scale Architecture

Using GStreamer for hardware accelerated video decoding on Intel Atom Processor E6xx series

Specification Update. January 2014

Software Solutions for Multi-Display Setups

Customizing Boot Media for Linux* Direct Boot

Intel HTML5 Development Environment. Tutorial Test & Submit a Microsoft Windows Phone 8* App (BETA)

Intel Media Server Studio - Metrics Monitor (v1.1.0) Reference Manual

Power Benefits Using Intel Quick Sync Video H.264 Codec With Sorenson Squeeze

Intel HTML5 Development Environment. Tutorial Building an Apple ios* Application Binary

Creating Full Screen Applications Across Multiple Displays in Extended Mode

iscsi Quick-Connect Guide for Red Hat Linux

Creating Overlay Networks Using Intel Ethernet Converged Network Adapters

Intel SSD 520 Series Specification Update

Intel Media SDK Features in Microsoft Windows 7* Multi- Monitor Configurations on 2 nd Generation Intel Core Processor-Based Platforms

Intel Core TM i3 Processor Series Embedded Application Power Guideline Addendum

Intel Solid-State Drive Pro 2500 Series Opal* Compatibility Guide

Intel Retail Client Manager Audience Analytics

2013 Intel Corporation

Intel Data Direct I/O Technology (Intel DDIO): A Primer >

Partition Alignment of Intel SSDs for Achieving Maximum Performance and Endurance Technical Brief February 2014

Intel HTML5 Development Environment. Article - Native Application Facebook* Integration

Intel Desktop Board D945GCPE

Intel HTML5 Development Environment Article Using the App Dev Center

Intel 810 and 815 Chipset Family Dynamic Video Memory Technology

Intel Internet of Things (IoT) Developer Kit

Intel IoT Gateways: Publishing Data to an MQTT Broker Using Python

Intel Desktop Board DG41BI

Intel Desktop Board DG43RK

Intel Ethernet and Configuring Single Root I/O Virtualization (SR-IOV) on Microsoft* Windows* Server 2012 Hyper-V. Technical Brief v1.

with PKI Use Case Guide

Intel Media Server Studio Professional Edition for Windows* Server

Intel vpro Technology. How To Purchase and Install Go Daddy* Certificates for Intel AMT Remote Setup and Configuration

Intel Desktop Board DP55WB

Intel Retail Client Manager

Intel Core i5 processor 520E CPU Embedded Application Power Guideline Addendum January 2011

Intel Desktop Board D945GCPE Specification Update

Intel Small Business Advantage (Intel SBA) Release Notes for OEMs

Intel Desktop Board DG41TY

Intel Desktop Board DG31PR

Intel Data Migration Software

Intel Desktop Board DQ35JO

Intel Technical Advisory

Intel Desktop Board DQ43AP

Intel Atom Processor E3800 Product Family

Intel Desktop Board DG41WV

Intel vpro Technology. How To Purchase and Install Symantec* Certificates for Intel AMT Remote Setup and Configuration

Intel Integrated Native Developer Experience (INDE): IDE Integration for Android*

Intel Service Assurance Administrator. Product Overview

BSP for Windows* Embedded Compact* 7 and Windows* Embedded Compact 2013 for Mobile Intel 4th Generation Core TM Processors and Intel 8 Series Chipset

Intel Desktop Board D945GCL

Haswell Cryptographic Performance

Hetero Streams Library 1.0

VNF & Performance: A practical approach

Intel Desktop Board DQ965GF

System Event Log (SEL) Viewer User Guide

Intel Desktop Board DG33TL

Intel Retail Client Manager

Intel Desktop Board DP43BF

Intel Desktop Board DG965RY

Intel and Qihoo 360 Internet Portal Datacenter - Big Data Storage Optimization Case Study

Upgrading Intel AMT 5.0 drivers to Linux kernel v2.6.31

COSBench: A benchmark Tool for Cloud Object Storage Services. Jiangang.Duan@intel.com

* * * Intel RealSense SDK Architecture

Douglas Fisher Vice President General Manager, Software and Services Group Intel Corporation

Displaying Stereoscopic 3D (S3D) with Intel HD Graphics Processors for Software Developers August 2011

Intel Identity Protection Technology (IPT)

White Paper Amy Chong Yew Ee Online Sales Account Manager APAC Online Sales Center Intel Corporation. BOM Cost Reduction by Removing S3 State

Intel Platform Controller Hub EG20T

How to Configure Intel Ethernet Converged Network Adapter-Enabled Virtual Functions on VMware* ESXi* 5.1

Internal LVDS Dynamic Backlight Brightness Control

Resetting USB drive using Windows Diskpart command

Intel Cloud Builder Guide: Cloud Design and Deployment on Intel Platforms

Intel X38 Express Chipset Memory Technology and Configuration Guide

Intel 845G/GL Chipset Dynamic Video Memory Technology

Intel Desktop Board D101GGC Specification Update

Intel System Event Log (SEL) Viewer Utility

WHITE PAPER. LVDS Flat Panel Display Interface on Intel Desktop Boards. July 2009 Order Number: E

Intel Solid-State Drive Data Center Tool User Guide Version 1.1

Software Evaluation Guide for Microsoft Office Excel 2010* and WinZip 15.5*

This guide explains how to install an Intel Solid-State Drive (Intel SSD) in a SATA-based desktop or notebook computer.

Intel Unite. User Guide

User Experience Reference Design

System Image Recovery* Training Foils

Intel Network Builders: Lanner and Intel Building the Best Network Security Platforms

Intel Identity Protection Technology Enabling improved user-friendly strong authentication in VASCO's latest generation solutions

Intel Modular Server System MFSYS25

Installing Service Pack Updater Archive for CodeWarrior Tools (Windows and Linux) Quick Start

Cloud based Holdfast Electronic Sports Game Platform

RAID and Storage Options Available on Intel Server Boards and Systems

Three Paths to Faster Simulations Using ANSYS Mechanical 16.0 and Intel Architecture

Intel RAID RS25 Series Performance

Intel Network Builders

Software Evaluation Guide for Autodesk 3ds Max 2009* and Enemy Territory: Quake Wars* Render a 3D character while playing a game

Revision History. Revision Revision History Date

Developing High-Performance, Flexible SDN & NFV Solutions with Intel Open Network Platform Server Reference Architecture

Intel Core TM i7-660ue, i7-620le/ue, i7-610e, i5-520e, i3-330e and Intel Celeron Processor P4505, U3405 Series

Fast, Low-Overhead Encryption for Apache Hadoop*

Transcription:

Enabling Hardware Accelerated VC-1 AP Interlace on Intel Atom Processor E38XX Series Application Note May 2014 Document Number: 330630-001US

By using this document, in addition to any agreements you have with Intel, you accept the terms set forth below. You may not use or facilitate the use of this document in connection with any infringement or other legal analysis concerning Intel products described herein. You agree to grant Intel a non-exclusive, royalty-free license to any patent claim thereafter drafted which includes subject matter disclosed herein. INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL PRODUCTS. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. EXCEPT AS PROVIDED IN INTEL'S TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL ASSUMES NO LIABILITY WHATSOEVER AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR USE OF INTEL PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. A "Mission Critical Application" is any application in which failure of the Intel Product could result, directly or indirectly, in personal injury or death. SHOULD YOU PURCHASE OR USE INTEL'S PRODUCTS FOR ANY SUCH MISSION CRITICAL APPLICATION, YOU SHALL INDEMNIFY AND HOLD INTEL AND ITS SUBSIDIARIES, SUBCONTRACTORS AND AFFILIATES, AND THE DIRECTORS, OFFICERS, AND EMPLOYEES OF EACH, HARMLESS AGAINST ALL CLAIMS COSTS, DAMAGES, AND EXPENSES AND REASONABLE ATTORNEYS' FEES ARISING OUT OF, DIRECTLY OR INDIRECTLY, ANY CLAIM OF PRODUCT LIABILITY, PERSONAL INJURY, OR DEATH ARISING IN ANY WAY OUT OF SUCH MISSION CRITICAL APPLICATION, WHETHER OR NOT INTEL OR ITS SUBCONTRACTOR WAS NEGLIGENT IN THE DESIGN, MANUFACTURE, OR WARNING OF THE INTEL PRODUCT OR ANY OF ITS PARTS. Intel may make changes to specifications and product descriptions at any time, without notice. Designers must not rely on the absence or characteristics of any features or instructions marked "reserved" or "undefined". Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them. The information here is subject to change without notice. Do not finalize a design with this information. The products described in this document may contain design defects or errors known as errata which may cause the product to deviate from published specifications. Current characterized errata are available on request. Contact your local Intel sales office or your distributor to obtain the latest specifications and before placing your product order. Copies of documents which have an order number and are referenced in this document, or other Intel literature, may be obtained by calling 1-800-548-4725, or go to: http://www.intel.com/design/literature.htm Intel, Intel Atom, and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. *Other names and brands may be claimed as the property of others. Copyright 2014, Intel Corporation. All rights reserved. Enabling Hardware Accelerated VC-1 AP Interlace on Intel Atom Processor E38XX Series Application Note May 2014 2 Document Number: 330630-001US

Introduction Contents 1 Introduction... 5 2 Background... 7 3 Solution... 9 4 Applying the Solution... 11 4.1 Prerequisites... 11 4.2 Patching the Gstreamer-vaapi Plugin... 11 4.3 Patching OTC s intel-driver... 12 4.4 Decoding a VC-1 AP Interlaced Stream... 12 5 Results and Test Coverage... 13 6 Conclusion... 14 Figures Figure 1. VA API Software Architectural View... 7 Figure 2. Hierarchical Layers of VC-1 Bitstream... 9 Tables Table 1. Terminology... 6 Table 2. Table 3. Frame Coding Mode... 9 Field Picture Type... 10 Enabling Hardware Accelerated VC-1 AP Interlace on Intel Atom Processor E38XX Series May 2014 Application Note Document Number: 330630-001US 3

Revision History Date Revision Description May 2014 001 Initial release. Enabling Hardware Accelerated VC-1 AP Interlace on Intel Atom Processor E38XX Series Application Note May 2014 4 Document Number: 330630-001US

Introduction 1 Introduction VC-1 is a video codec standard released and maintained by the Society of Motion Picture and Television Engineers (SMPTE). The standard is also known as SMPTE 421M. VC-1 supports coding for progressive video content in Simple, Main, and Advanced Profiles, and interlaced video content in Advanced Profile only. VC-1 interlaced coding is especially attractive to the broadcast industry due to the bandwidth reduction via interlaced coding. A hardware-accelerated media solution with EMGD for the Intel Atom Processor E38XX Series is inherited from the Intel Open Source Technology Center (OTC) VA API stack. Even though general VC-1 SP/MP/AP decoding is supported in the original VA API stack, VC-1 support is not commonly used or tested due to the relative insignificance of the VC-1 codec in the Linux* space. VC-1 is most commonly found in codecs developed by Microsoft: WMV3, WMVA, WVC1A. However, some applications do require complete, hardware-accelerated, VC-1 decoding support, and this prompted Intel to develop a solution on top of the VA API stacks that decodes VC-1 AP Interlaced coded streams. The objective of this solution is to ensure that the decoding of the VC-1 AP Interlaced coded stream is hardware-accelerated with the Intel Atom Processor E38XX Series Multi-Format Decoding (MFD) engine. This paper identifies gaps in the current stack and provides an implementation for a solution on an Intel Atom Processor E38XX Series system. The Intel Embedded Design Center provides qualified developers with web-based access to technical resources. Access Intel Confidential design materials, step-by-step guidance, application reference solutions, training, Intel s tool loaner program, and connect with an e-help desk and the embedded community. Design Fast. Design Smart. Get started today. www.intel.com/embedded/edc. Enabling Hardware Accelerated VC-1 AP Interlace on Intel Atom Processor E38XX Series May 2014 Application Note Document Number: 330630-001US 5

Table 1. Terminology Term Description AP API EMGD FCM IOTG MB MFD OTC SMPTE VA WMV Advanced Profile Application Program Interface Intel Embedded Media and Graphics Driver Frame Coding Mode Internet of Things Solution Group Macroblocks Multi-Format Decoding Intel Open Source Technology Center Society of Motion Picture and Television Engineers Video Acceleration Windows Media Video Enabling Hardware Accelerated VC-1 AP Interlace on Intel Atom Processor E38XX Series Application Note May 2014 6 Document Number: 330630-001US

Background 2 Background EMGD for the Intel Atom Processor E38XX Series uses the Intel Open Source Technology Center s VA API media solution for hardware-accelerated video decoding with different codec profiles such as H.264, MPEG-2, and VC-1. Even though VC-1 decoding is generally supported in the VA API stacks, decoding of VC-1 AP Interlaced coded streams is not supported in the current solution s stack. One convenient alternative is to switch to a software-accelerated solution that uses the system CPU to decode the decoded streams; however, this is not optimal in terms of performance and reducing CPU utilization of the system. Figure 1 provides an architectural view of the VA API stacks to help illustrate what must be implemented in the OTC s VA API stack to decode VA-1 AP Interlaced coded streams. Figure 1. VA API Software Architectural View Enabling Hardware Accelerated VC-1 AP Interlace on Intel Atom Processor E38XX Series May 2014 Application Note Document Number: 330630-001US 7

There are two areas to address when decoding the VC-1 AP Interlaced coded streams. The first area is the Gstreamer-vaapi component. Additional parsing logic is required so that the bitstream of a VC-1 AP Interlaced coded stream is parsed correctly according to the SMPTE standard. The second area is the i965 video driver. To get the compressed VC-1 AP Interlaced data to decode properly, a command buffer must be sent to the MFD hardware. Based on these requirements, additional logic must be implemented in the gstreamervaapi decoder plugin and the i965 video driver to get the VA API stack to decode a VC-1 AP Interlace video. In this solution, the other components shown in Figure 1 do not require modification. Enabling Hardware Accelerated VC-1 AP Interlace on Intel Atom Processor E38XX Series Application Note May 2014 8 Document Number: 330630-001US

Solution 3 Solution To implement the additional logic discussed in the Background section, the fundamental hierarchical layers that construct a VC-1 encoded stream, whether it is progressive or interlace video, must be understood. In general, a VC-1 AP stream is composed of the following hierarchical layers. Sequence Entry-point Picture Slices Macroblocks (MB) Blocks Figure 2 illustrates the presence of some of these layers in the bitstream. Figure 2. Hierarchical Layers of VC-1 Bitstream Each layer can be detected by identifying a uniquely defined code (called start code ) from the encoded bitstream. The start code is followed by a header section, which can contain some useful bits of information relevant to the solution. For example, the sequence header section contains a field called Interlace that must be parsed correctly by the codec for the decoder to determine if the stream is a progressive or an interlace video. There are essentially two types of VC-1 interlace coding: Interlace frame and interlace field. Interlace frame coding is used when both fields of an interlace frame are coded together. Interlace field coding is used when the two fields of an interlace frame are coded separately. The difference between these two coding modes leads to different methods of decoding the stream. In order to identify the coding mode adopted by an interlace picture, the codec parser can look at the field called Frame Coding Mode (FCM) found in the picture header. Table 2. Frame Coding Mode Field Value 0b 10b 11b Frame Coding Mode Progressive Interlace Frame Interlace Field Enabling Hardware Accelerated VC-1 AP Interlace on Intel Atom Processor E38XX Series May 2014 Application Note Document Number: 330630-001US 9

Since the two fields of data for interlace field coding are coded separately, one of these two fields is meant to be displayed first. That field is called the first field, and it can be the top field or the bottom field of the frame. This leads to the necessity for the codec parser to extract the field called Top Field First found in the picture header. A value of 0 for TFF indicates that the first field in the frame is a bottom field and the second field in the frame is a top field. Alternately, a value of 1 for TFF indicates that the first field in the frame is a top field and the second field in the frame is a bottom field. In an interlace field picture, each of the top and bottom fields can be decoded into different picture types such as I, P, B, or BI. From the picture header, a field called Field Picture Type (FPTYPE) can be extracted to identify the field picture type for each of the two fields. FPTYPE can be decoded by the codec parser according to Table 3. Table 3. Field Picture Type FPTYPE First Field Second Field 000b I I 001b I P 010b P I 011b P P 100b B B 101b B BI 110b BI B 111b BI BI For the i965 video driver, a few fixes must be implemented so that the interlace frame and the interlace field coding are processed properly. First, the FCM value given by the codec needs to be extracted from the frame_coding_mode field defined in VAPictureParameterBufferVC1 structure. With the FCM value read, the driver can now, in the case of interlace field coding, determine the proper picture type for the first and second field. Consequently, the driver is also able to determine the correct picture height in macroblocks. Additionally, the proper way to store the reference frame data for interlace field coding is missing in the i965 video driver. This has also been implemented in the patch provided. Enabling Hardware Accelerated VC-1 AP Interlace on Intel Atom Processor E38XX Series Application Note May 2014 10 Document Number: 330630-001US

Applying the Solution 4 Applying the Solution As described in the Solution section, a couple of patch files have been created to enable the decoding of VC-1 AP Interlaced coded stream with Intel OTC s VA API stack. After applying the patches, both the VC-1 frame interlace and the field interlace should be decoded properly. The following sections provide detailed instructions for patching the Gstreamer-vaapi and OTC s driver. Generally, these instructions should work as described if the specified software versions are installed on the target system. For different software versions, additional patching efforts may be required and the instructions should be used as a rough guideline. 4.1 Prerequisites 1. Development tools package 2. Git 3. Gstreamer base framework 1.0.7 or beyond 4. Gstreamer ugly plugin for asfdemux plugin 5. Patch tool 4.2 Patching the Gstreamer-vaapi Plugin 1. Clone the plugin by entering the following at a terminal prompt. $ git clone git://gitorious.org/vaapi/gstreamer-vaapi.git 2. Checkout the specific commit; this commit is used during the testing and enabling. $ git checkout 2e356b0f7efae33fb943ad11204020dcdbf1b04f 3. Go into the gstreamer-vaapi directory. $ cd gstreamer-vaapi 4. Retrieve the patch file Gst_Plugins_VAAPI_pre_0_5_8_VC1_Interlace_Patch and place it in the current directory. The patch file is located in the driver release package in patches\common\va_driver_i965\vc1_interlace, which is in IEMGD_HEAD_Linux.tgz. 5. Patch the Gstreamer-vaapi project. $ patch p1 < Gst_Plugins_VAAPI_pre_0_5_8_VC1_Interlace_Patch 6. Run the autogen to initialize the submodules in the project. $./autogen.sh Enabling Hardware Accelerated VC-1 AP Interlace on Intel Atom Processor E38XX Series May 2014 Application Note Document Number: 330630-001US 11

7. Go into the codec-parser directory. $ cd ext/codecparsers 8. Retrieve the patch file Gst_Codecparser_VAAPI_pre_0_5_8_VC1_Interlace_Patch from the path identified in Step 4 and place it in the current directory. 9. Patch the codec-parsers project. $ patch p1 < Gst_Codecparser_VAAPI_pre_0_5_8_VC1_Interlace_Patch 10. Compile the Gstreamer-vaapi project. $ make $ make install 4.3 Patching OTC s intel-driver 1. Clone the driver. $ git clone git://anongit.freedesktop.org/vaapi/intel-driver 2. Checkout the specific version; this version is used during testing and enabling. $ git checkout 1.2.1 3. Go into the intel-driver directory. $ cd intel-driver 4. Retrieve the patch file Intel_VA_Driver_1_2_1_GEN7_VC1_Interlace_Patch from the path previously mentioned, and place it in the current directory. 5. Patch the intel-driver project. $ patch -p1 < Intel_VA_Driver_1_2_1_GEN7_VC1_Interlace_Patch 6. Compile the intel-driver project. $./autogen.sh $ make $ make install 4.4 Decoding a VC-1 AP Interlaced Stream With the application of the patches, the VC-1 AP Interlaced coded stream can be decoded successfully. The gst-launch tool can be used to demonstrate the decoding capability of the VC-1 interlace. Using a WMV clip, the following gstreamer pipeline can be used. $ gst-launch-1.0 -v filesrc location=<video clip path plus filename>! asfdemux! vaapidecode! vaapisink Enabling Hardware Accelerated VC-1 AP Interlace on Intel Atom Processor E38XX Series Application Note May 2014 12 Document Number: 330630-001US

Results and Test Coverage 5 Results and Test Coverage Intel tested VC-1 AP interlace by decoding a list of VC-1 Field and Frame interlace clips in WMV contained format. In addition, tests have been carried out with the following conformance test bitstreams provided by SMPTE: SA10210, SA10211, SA10212, SA10213, SA10214, SA10215, SA10216, SA10217 Enabling Hardware Accelerated VC-1 AP Interlace on Intel Atom Processor E38XX Series May 2014 Application Note Document Number: 330630-001US 13

6 Conclusion This paper provides guidelines and solutions for decoding VC-1 Interlace coded streams on the Intel Atom Processor E38XX Series with EMGD Linux* driver. The Intel Embedded Design Center provides qualified developers with web-based access to technical resources. Access Intel Confidential design materials, step-by step guidance, application reference solutions, training, Intel s tool loaner program, and connect with an e-help desk and the embedded community. Design Fast. Design Smart. Get started today. Enabling Hardware Accelerated VC-1 AP Interlace on Intel Atom Processor E38XX Series Application Note May 2014 14 Document Number: 330630-001US