+ All Categories
Home > Documents > Software & Services Group Developer Products Division Copyright© 2011, Intel Corporation. All...

Software & Services Group Developer Products Division Copyright© 2011, Intel Corporation. All...

Date post: 15-Dec-2015
Category:
Upload: noelia-poplar
View: 213 times
Download: 1 times
Share this document with a friend
Popular Tags:
24
Software & Services Group Developer Products Division Copyright© 2011, Intel Corporation. All rights reserved. *Other brands and names are the property of their respective owners. Essential Performance Advanced Performance Distribute d Performance Efficient Performance Developing Intel® AVX Optimized Microsoft* Real-Time Audio (MSRTA) Codec using Intel® IPP Naveen Gv Intel Corporation 1
Transcript

Software & Services GroupDeveloper Products Division Copyright© 2011, Intel Corporation. All rights reserved.

*Other brands and names are the property of their respective owners.

Essential Performance

Advanced Performance

Distributed Performance

Efficient Performance

Developing Intel® AVX Optimized Microsoft* Real-Time Audio (MSRTA) Codec using Intel® IPP

Naveen GvIntel Corporation

1

Software & Services GroupDeveloper Products Division Copyright© 2011, Intel Corporation. All rights reserved.

*Other brands and names are the property of their respective owners.

Objectives

• How Intel® Integrated Performance Primitives (Intel® IPP) can provide the building

blocks to develop Microsoft* Real Time Audio (MSRTA) codec on the latest Intel

microprocessor, codenamed ‘Sandy Bridge’.

• This session describes how to use Intel IPP to build Intel® Advanced Vector

Extensions (Intel® AVX) optimized Microsoft* Real Time Codec for VoIP applications and

provides performance results for the Sandy Bridge microprocessor-based platform.

2

Software & Services GroupDeveloper Products Division Copyright© 2011, Intel Corporation. All rights reserved.

*Other brands and names are the property of their respective owners.

Agenda

Introduction

Intel® AVX Optimization

Unified Speech Component (USC)

USC MSRTA Codec

Demo – Intel IPP – USC MSRTA Codec

Performance of USC MSRTA codec

Summary

References

3

Software & Services GroupDeveloper Products Division Copyright© 2011, Intel Corporation. All rights reserved.

*Other brands and names are the property of their respective owners.

Phase Productivity Tool Feature Benefit

Advanced Build & Debug

Intel® Composer XE

C/C++ and Fortran compilers, performance libraries, and parallel models

Application performance, scalability and quality for current multicore and future many-core systems.

Advanced Verify

Intel® Inspector XE

Memory & threading error checking tool for higher code reliability & quality

Increases productivity and lowers cost, by catching memory and threading defects early

Advanced Tune

Intel® VTune™ Amplifier XE

Performance Profiler to optimize performance and scalability

Removes guesswork, saves time, makes it easier to find performance and scalability bottlenecks Combines ease of use with deeper insights.

Intel® Parallel Studio XE 2011Powerful tools to create fast, reliable and secure code

Today’s Focus: Intel® Integrated Performance Primitives, a component of Intel® Composer XE

4

Software & Services GroupDeveloper Products Division Copyright© 2011, Intel Corporation. All rights reserved.

*Other brands and names are the property of their respective owners.

Intel IPP - overview

Application Source Code

Intel IPP Usage Code Samples

Intel IPP Library C/C++ API

Intel IPP Processor-Optimized Binaries

• Intel® Core™ i7 Processors• Intel® Atom™ Processors• Intel® Core™ 2 Duo and Core™ Extreme

Processors• Intel® Core™ Duo and Core™ Solo Processors• Intel® Pentium® D Dual-Core Processors• Intel® Xeon® 64-bit Dual-Core Processors• Intel® Xeon® DP and MP Processors

• Sample video/audio/speech codecs• Image processing and JPEG• Signal processing• Data compression• .NET and Java integration

API calls

Static/Dynamic Link

Rapid Application Development

Outstanding Performance

CompatibilityandCode Re-Use

• Data Compression• Data Integrity• Signal processing• Matrix mathematics• Vector mathematics• String processing• Speech coding

• Cryptography• Image processing• Image color

conversion• JPEG / JPEG2000• Computer Vision• Video coding• Audio coding

Free Code Samples

Processor-Optimized Implementation

Cross-platform API

5

Software & Services GroupDeveloper Products Division Copyright© 2011, Intel Corporation. All rights reserved.

*Other brands and names are the property of their respective owners.

Intel IPP - Functions and Samples Domains Functions Samples

1. Image Processing

* Geometry transformations, such as resize/rotate * Linear and non-linear filtering operation on an image for edge detection, blurring, noise removal and etc for filter effect.* Linear transforms for 2D FFTs, DFTs, DCT. * image statistics and analysis

* Tiled Image Processing / 2D Wavelet Transform /C++ Image Processing Classes/Image Processing functions Demo

2. Computer Vision

* Background differencing, Feature Detection (Corner Detection, Canny Edge detection), Distance Transforms, Image Gradients, Flood fill, Motion analysis and Object Tracking, Pyramids, Pattern recognition, Camera Calibration * Face Detection

3. Color conversion

* Converting image/video color space formats: RGB, HSV, YUV, YCbCr* Up/Down sampling* Brightness and contrast adjustments

4. JPEG Coding

* High-level JPEG and JPEG2000 compression and decompression functions* JPEG/JPEG2000 support functions: DCT, Wavelet transforms, color conversion,

downsampling

• UIC-Unified Image Codec/ Integration with the Independent JPEG Group (IJG) library

5. Video Coding

* VC-1, H.264, MPEG-2, MPEG-4, H.261, H.263 and DV codec support functions * Simple Media Player/ Video Encoder / h.264 decoding

6. Audio Coding

* Echo cancellation and audio transcoding, BlockFiltering, Spectral Data prequantization.

* Audio Codec Console application

7. Realistic Rendering

* Acceleration Structures, Ray-Scene Intersection and Ray Tracing* Surface properties, shader support, tone mapping

* Ray Tracing

6

Software & Services GroupDeveloper Products Division Copyright© 2011, Intel Corporation. All rights reserved.

*Other brands and names are the property of their respective owners.

Intel IPP - Functions and Samples Domains Functions Samples

8. Speech Coding

* Adaptive/Fixed Codebook functions, Autocorrelation, Convolution, Levinson-Durbin recursion, Linear Prediction Analysis &

Quantization, Echo Cancellation, Companding

* G.168, G.167, G.711, G.722, G.722.1, G.722.2, AMRWB, Extended AMRWB (AMRWB+), G.723.1, G.726, G.728, G.729, MSRTA, GSM AMR, GSM FR

9. Data Compression

* Entropy-coding compression: Huffman, VLC* Dictionary-based compression: LZSS, LZ77* Burrows-Wheeler Transform, MoveToFront, RLE, Generalized Interval

Transformation* Compatible feature support for zlib and bzip2

* zlib, bzip2, gzip-compatible /General data compression examples

10. Cryptography

* Big-Number Arithmetic / Rijndael, DES, TDES, SHA1, MD5, RSA, DSA, Montgomery, prime number generation and pseudo-random number generation (PRNG) functions

* Intel IPP crypto usage in Open SSL*

11. String Processing * Compare, Insert, change case, Trim, Find, Regexp, Hash * “ippgrep” – regular expression matching

12. Signal Processing

* Transforms: DCT, DFT, MDCT, Wavelet (both Haar and user-defined filter banks), Hilbert

* Convolution, Cross-Correlation, Auto-Correlation, Conjugate* Filtering: IIR/FIR/Median filtering, Single/Multi-Rate FIR LMS filters* Other: Windowing, Jaehne/Tone/Traingle signal generation,

Thresholding

* Signal Processing Function Demo

13. Vector Math* Logical, Shift, Conversion, Power, Root, Exponential, Logarithmic, Trigonometric, Hyperbolic, Erf, Erfc

14. Matrix Math* Addition, Multiplication, Decomposition, Eigenvalues, Cross-product,

transposition

Other Common Functions * CPUTypes, Thread Number Control, Memory Allocation * Linkages/Different language support

7

Software & Services GroupDeveloper Products Division Copyright© 2011, Intel Corporation. All rights reserved.

*Other brands and names are the property of their respective owners.

Sandy Bridge Microarchitecture : First AVX Capable Processor

The primary benefits of Intel AVX are:

Support for wider vector data (up to 256-bit).

Efficient instruction encoding scheme that supports 3 and 4 operand instruction syntaxes.

Flexible programming environment, ranging from branch handling to relaxed memory

alignment requirements.

New data manipulation and arithmetic compute primitives, including broadcast, permute,

fused-multiply-add, etc.

Intel AVX is a 256-bit instruction set extension

to SSE designed to provide even higher

performance for applications that are floating-

point intensive. Intel AVX adds new

functionality to the existing Intel SIMD

instruction set (based on SSE) and includes a

more compact SIMD encoding format.

8

Software & Services GroupDeveloper Products Division Copyright© 2011, Intel Corporation. All rights reserved.

*Other brands and names are the property of their respective owners.

Intel IPP : Intel AVX Optimizations

• AVX Hand-tuned Optimizations– signal processing functions (FFT, DFT, FIR, IIR)

– vector math and random numbers

– speech and audio coding

– image processing and realistic rendering

– data compression and cryptography

– DirectX 3D math functions

• Intel Compiler Auto-Vector Optimizations – ~30% of IPP functions

– simple arithmetic and logic functions

– performance approximately equal to hand optimized

Complete list of hand optimized functions - http://software.intel.com/en-us/articles/intel-ipp-functions-optimized-for-intel-avx-intel-advanced-vector-extensions/

9

Software & Services GroupDeveloper Products Division Copyright© 2011, Intel Corporation. All rights reserved.

*Other brands and names are the property of their respective owners.

Intel IPP : Intel AVX Optimization

Platform Architecture SIMD Requirements Processor / µarchitecture

IA-32 px C optimized for all IA-32 processors i386+

p8 SSE4.1, SSE4.2, AES-NI Penryn, Nehalem, Westmere

g9 AVX Sandy Bridge µarchitecture

Intel® 64 (EM64T) mx C-optimized for all Intel® 64 platforms P4

y8 SSE4.1, SSE4.2, AES-NI Penryn, Nehalem, Westmere

e9 AVX Sandy Bridge µarchitecture

Intel IPP uses codes optimized for various central processing units (CPUs). Dispatching

refers to detection of your CPU and selecting the corresponding Intel IPP binary.

ippsc-7.0.dll

ippscg9-7.0.dll

ippscw7-7.0.dll

Sandy Bridge µarchitecture

ippsc-7.0.dll

DLLMain (…){//Check CPUippGetCPUType ()://Load best DLL…}

ApplicationInte main(…){#include “ipp.h”ippsZeroMean_16s}

10

Software & Services GroupDeveloper Products Division Copyright© 2011, Intel Corporation. All rights reserved.

*Other brands and names are the property of their respective owners.

Performance : Intel AVX optimized functions

11

Software & Services GroupDeveloper Products Division Copyright© 2011, Intel Corporation. All rights reserved.

*Other brands and names are the property of their respective owners.

Performance : Intel AVX optimized functions

12

Software & Services GroupDeveloper Products Division Copyright© 2011, Intel Corporation. All rights reserved.

*Other brands and names are the property of their respective owners.

Intel AVX optimized Intel IPP RT audio functions

Function Base Name Operation

AdaptiveCodebookSearch_RTA Searches for the adaptive codebook index and the lag, and computes the adaptive vector

FixedCodebookSearch_RTA, FixedCodebookSearchRandom_RTA

Searches for the fixed codebook vector

HighPassFilter_RTA Performs high-pass filtering

LSPQuant_RTA Performs quantization of LSP coefficients

LSPToLPC_RTA Converts LSP coefficients to LP coefficients

QMFDecode_RTA Performs QMF synthesis

PostFilter_RTA Restores speech signal from the residual

*LSP – Line spectral pairs*LP – Linear Prediction*QMF- Quadrature mirror filter

13

Software & Services GroupDeveloper Products Division Copyright© 2011, Intel Corporation. All rights reserved.

*Other brands and names are the property of their respective owners.

Unified Speech Component (USC)

Unified Speech Component (USC) interface is designed for implementing speech

codecs, echo cancellers and other algorithm modules in the C language using Intel

IPP.

The USC interface defines a global table of unified functions that are applicable to a USC

algorithm. The table can be augmented for future functionality expansions. Each USC

algorithm must implement USC base functions and may implement algorithm-specific

functions.

Currently the USC library implements the following types of algorithms:

– Speech codec

– Echo cancellation algorithm, also referred to as echo canceller

– Speech signal filter

– Tone detection and generation algorithm, also referred to as tone detector.

14

Software & Services GroupDeveloper Products Division Copyright© 2011, Intel Corporation. All rights reserved.

*Other brands and names are the property of their respective owners.

USC MSRTA codec

Real Time(RT)Audio is the preferred Microsoft® Real-Time audio codec and is used by

Microsoft Office Communications Server (OCS) and other communication application like

Microsoft Office Communicator, and Microsoft Live Meeting Console.

The USC MSRTA codec supports 16bit wideband 16000 Hz and narrowband 8000 Hz PCM(Pulse

Code Modulation) mono signals compression and decompression with 20ms frame lengths at

bitrates 8800 bps and 18000 bps respectively.

To get more information about Microsoft Real-Time Audio Codec refer to -

Overview of the Microsoft RTAudio Speech codec

15

Software & Services GroupDeveloper Products Division Copyright© 2011, Intel Corporation. All rights reserved.

*Other brands and names are the property of their respective owners.

Demo : USC MSRTA Sample

Set system environment variable IPPROOT

Open solution/project file in related Microsoft* Visual Studio

Select configuration/platform you need

Build all projects in Microsoft* Visual Studio

Running the codec

Codec name Supported bitrate,

in bps

Codec description

IPP_MSRTAnb_FP 8800 Narrowband 8000 KHz MSRTA codec, floating-point

implementation

IPP_MSRTAwb_FP 18000 Wideband 16000 KHz MSRTA codec, floating-point

implementation

usc_speech_rtp_codec.exe [options] <infile> <outfile>

How to build the source code

16

Software & Services GroupDeveloper Products Division Copyright© 2011, Intel Corporation. All rights reserved.

*Other brands and names are the property of their respective owners.

Optimization Notice

Optimization Notice

Intel compilers, associated libraries and associated development tools may include or utilize options that optimize for instruction sets that are available in both Intel and non-Intel microprocessors (for example SIMD instruction sets), but do not optimize equally for non-Intel microprocessors. In addition, certain compiler options for Intel compilers, including some that are not specific to Intel micro-architecture, are reserved for Intel microprocessors. For a detailed description of Intel compiler options, including the instruction sets and specific microprocessors they implicate, please refer to the “Intel Compiler User and Reference Guides” under “Compiler Options." Many library routines that are part of Intel compiler products are more highly optimized for Intel microprocessors than for other microprocessors. While the compilers and libraries in Intel compiler products offer optimizations for both Intel and Intel-compatible microprocessors, depending on the options you select, your code and other factors, you likely will get extra performance on Intel microprocessors.

Intel compilers, associated libraries and associated development tools may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include Intel® Streaming SIMD Extensions 2 (Intel® SSE2), Intel® Streaming SIMD Extensions 3 (Intel® SSE3), and Supplemental Streaming SIMD Extensions 3 (Intel SSSE3) instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors.

While Intel believes our compilers and libraries are excellent choices to assist in obtaining the best performance on Intel and non-Intel microprocessors, Intel recommends that you evaluate other compilers and libraries to determine which best meet your requirements. We hope to win your business by striving to offer the best performance of any compiler or library; please let us know if you find we do not.

Notice revision #20110307

17

Software & Services GroupDeveloper Products Division Copyright© 2011, Intel Corporation. All rights reserved.

*Other brands and names are the property of their respective owners.

IPP USC MSRTA codec Performance – IA32

IPP SC CodecBitrate(bps)

Audio fileNHM SNB Speedup :

NHM/SNBVoice

Activity Detection

Duration(sec)

Encode(MHz)

Decode(MHz)

Encode(MHz)

Decode(MHz)

Encode Decode

IPP_MSRTA_FP - 8800s_8000_16.wav 1070 20.42 2.35 16.65 1.92 1.23 1.22

IPP_MSRTA_FP VAD1 8800s_8000_16.wav 1070 19.97 2.15 16.45 1.78 1.21 1.21

IPP SC CodecBitrate(bps)

Audio fileNHM SNB Speedup : Nhm/Snb

Voice Activity

Detection

Duration(sec)

Encode(MHz)

Decode(MHz)

Encode(MHz)

Decode(MHz) Encode Decode

IPP_MSRTA_FP - 18000 s_16000_16.wav 1090 42.87 5.29 38.35 4.18 1.12 1.27

IPP_MSRTA_FP VAD1 18000 s_16000_16.wav 1090 37.52 5.61 32.51 4.65 1.15 1.21

System Configuratio

nNehalem(NHM) Sandy Bridge(SNB)

CPU Intel(R) Xeon(R) CPU X5570 @ 2.93GHz Genuine Intel(R) CPU 0 @ 3.00GHz

Operating System

Microsoft* Windows 2003 Microsoft* Windows x64 with SNB patch

18

Software & Services GroupDeveloper Products Division Copyright© 2011, Intel Corporation. All rights reserved.

*Other brands and names are the property of their respective owners.

IPP USC MSRTA codec Performance – Intel64

IPP SC Codec ippscy8-7.0.dll+ Bitrat

e(bps)

Audio fileNHM SNB

Speedup : NHM/SNB

Voice Activity

Detection

Duration(sec)

Encode(MHz)

Decode(MHz)

Encode(MHz)

Decode(MHz)

Encode Decode

IPP_MSRTA_FP 8800s_8000_16.wav 1070 22.8 3.03 16.79 1.95

1.36 1.55

IPP_MSRTA_FP VAD1 8800s_8000_16.wav 1070 21.77 2.78 16.19 1.75

1.34 1.59

IPP SC Codec ippscy8-7.0.dll+ Bitrate

(bps)Audio file

NHM SNBSpeedup : Nhm/Snb

Voice Activity

Detection

Duration(sec)

Encode(MHz)

Decode(MHz)

Encode(MHz)

Decode(MHz) Encode Decode

IPP_MSRTA_FP 18000s_16000_16.wav 1090 46.26 6.87 34.51 4.36

1.34 1.58

IPP_MSRTA_FP VAD1 18000s_16000_16.wav 1090 39.99 7.25 31.08 4.77

1.29 1.52

System Configuratio

nNehalem(NHM) Sandy Bridge(SNB)

CPU Intel(R) Xeon(R) CPU X5570 @ 2.93GHz Genuine Intel(R) CPU 0 @ 3.00GHz

Operating System

Microsoft* Windows 2003 Microsoft* Windows x64 with SNB patch

19

Software & Services GroupDeveloper Products Division Copyright© 2011, Intel Corporation. All rights reserved.

*Other brands and names are the property of their respective owners.

Summary

Intel IPP is a highly optimized library for latest Intel architecture including Sandybridge.

By using IPP functions, Intel AVX optimized audio and speech codec can be developed

including Microsoft* real time audio codec.

Intel IPP offers sample code to demonstrate the development and usage of MSRTA codec.

20

Software & Services GroupDeveloper Products Division Copyright© 2011, Intel Corporation. All rights reserved.

*Other brands and names are the property of their respective owners.

References

Intel® Parallel Studio XE 2011 Home page -

http://software.intel.com/en-us/articles/intel-parallel-studio-xe/

Intel® IPP Functions Optimized for Intel® Advanced Vector Extensions –

http://software.intel.com/en-us/articles/intel-ipp-functions-optimized-for-intel-avx-intel-advan

ced-vector-extensions/

Intel® AVX: New Frontiers in Performance Improvements and Energy Efficiency -

http://software.intel.com/en-us/articles/intel-avx-new-frontiers-in-performance-improvement

s-and-energy-efficiency/

21

Software & Services GroupDeveloper Products Division Copyright© 2011, Intel Corporation. All rights reserved.

*Other brands and names are the property of their respective owners. 22

Software & Services GroupDeveloper Products Division Copyright© 2011, Intel Corporation. All rights reserved.

*Other brands and names are the property of their respective owners.

Optimization Notice

Optimization Notice

Intel compilers, associated libraries and associated development tools may include or utilize options that optimize for instruction sets that are available in both Intel and non-Intel microprocessors (for example SIMD instruction sets), but do not optimize equally for non-Intel microprocessors. In addition, certain compiler options for Intel compilers, including some that are not specific to Intel micro-architecture, are reserved for Intel microprocessors. For a detailed description of Intel compiler options, including the instruction sets and specific microprocessors they implicate, please refer to the “Intel Compiler User and Reference Guides” under “Compiler Options." Many library routines that are part of Intel compiler products are more highly optimized for Intel microprocessors than for other microprocessors. While the compilers and libraries in Intel compiler products offer optimizations for both Intel and Intel-compatible microprocessors, depending on the options you select, your code and other factors, you likely will get extra performance on Intel microprocessors.

Intel compilers, associated libraries and associated development tools may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include Intel® Streaming SIMD Extensions 2 (Intel® SSE2), Intel® Streaming SIMD Extensions 3 (Intel® SSE3), and Supplemental Streaming SIMD Extensions 3 (Intel SSSE3) instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors.

While Intel believes our compilers and libraries are excellent choices to assist in obtaining the best performance on Intel and non-Intel microprocessors, Intel recommends that you evaluate other compilers and libraries to determine which best meet your requirements. We hope to win your business by striving to offer the best performance of any compiler or library; please let us know if you find we do not.

Notice revision #20110307

23

Software & Services GroupDeveloper Products Division Copyright© 2011, Intel Corporation. All rights reserved.

*Other brands and names are the property of their respective owners.

Legal Disclaimer

INFORMATION IN THIS DOCUMENT IS PROVIDED “AS IS”. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT.  INTEL ASSUMES NO LIABILITY WHATSOEVER AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO THIS INFORMATION INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT.

Performance tests and ratings are measured using specific computer systems and/or components and reflect the approximate performance of Intel products as measured by those tests. Any difference in system hardware or software design or configuration may affect actual performance. Buyers should consult other sources of information to evaluate the performance of systems or components they are considering purchasing. For more information on performance tests and on the performance of Intel products, reference www.intel.com/software/products.

BunnyPeople, Celeron, Celeron Inside, Centrino, Centrino Atom, Centrino Atom Inside, Centrino Inside, Centrino logo, Cilk, Core Inside, FlashFile, i960, InstantIP, Intel, the Intel logo, Intel386, Intel486, IntelDX2, IntelDX4, IntelSX2, Intel Atom, Intel Atom Inside, Intel Core, Intel Inside, Intel Inside logo, Intel. Leap ahead., Intel. Leap ahead. logo, Intel NetBurst, Intel NetMerge, Intel NetStructure, Intel SingleDriver, Intel SpeedStep, Intel StrataFlash, Intel Viiv, Intel vPro, Intel XScale, Itanium, Itanium Inside, MCS, MMX, Oplus, OverDrive, PDCharm, Pentium, Pentium Inside, skoool, Sound Mark, The Journey Inside, Viiv Inside, vPro Inside, VTune, Xeon, and Xeon Inside are trademarks of Intel Corporation in the U.S. and other countries.*Other names and brands may be claimed as the property of others.

Copyright © 2011.  Intel Corporation.

http://intel.com/software/products

24


Recommended