MediaLib
Encyclopedia
mediaLib is a portable low level library for accelerating multimedia
applications, with interfaces in C
. It is developed by Sun Microsystems
and open source
d under the CDDL license as part of the OpenSolaris
project. The latest released version is 2.5.
It is implemented in ANSI C
, but can take advantage of SIMD
multimedia instructions on various processors to gain a significant performance boost. It was originally designed to leverage VIS
on SPARC
processors and later added support for MMX/SSE
/SSE2
on Intel/AMD processors.
Since mediaLib is written in C and SIMD
multimedia compiler intrinsics, it should be usable on any system that has an ANSI C compiler that supports SIMD multimedia intrinsics. Systems without SIMD intrinsics support can also use it as pure ANSI C, forgoing any extra acceleration provided by SIMD multimedia instructions. It is also included as part of Solaris
10.
mediaLib 2.5 contains about 4000 files and 2.4 million lines of code, and contains more than 3000 functions for different areas:
Open source applications that use mediaLib include Java
, JDS
for Solaris, mplayer
, ffmpeg
, and ogle
.
There are several mediaLib versions targeting different platforms, but all share the same API
, so users can switch from one platform to another without changing source code:
Multimedia
Multimedia is media and content that uses a combination of different content forms. The term can be used as a noun or as an adjective describing a medium as having multiple content forms. The term is used in contrast to media which use only rudimentary computer display such as text-only, or...
applications, with interfaces in C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....
. It is developed by Sun Microsystems
Sun Microsystems
Sun Microsystems, Inc. was a company that sold :computers, computer components, :computer software, and :information technology services. Sun was founded on February 24, 1982...
and open source
Open source
The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...
d under the CDDL license as part of the OpenSolaris
OpenSolaris
OpenSolaris was an open source computer operating system based on Solaris created by Sun Microsystems. It was also the name of the project initiated by Sun to build a developer and user community around the software...
project. The latest released version is 2.5.
It is implemented in ANSI C
ANSI C
ANSI C refers to the family of successive standards published by the American National Standards Institute for the C programming language. Software developers writing in C are encouraged to conform to the standards, as doing so aids portability between compilers.-History and outlook:The first...
, but can take advantage of SIMD
SIMD
Single instruction, multiple data , is a class of parallel computers in Flynn's taxonomy. It describes computers with multiple processing elements that perform the same operation on multiple data simultaneously...
multimedia instructions on various processors to gain a significant performance boost. It was originally designed to leverage VIS
Visual Instruction Set
Visual Instruction Set, or VIS, is a SIMD instruction set for SPARC V9 microprocessors developed by Sun Microsystems. There are three versions of VIS: VIS 1, VIS 2 and VIS 2+...
on SPARC
SPARC
SPARC is a RISC instruction set architecture developed by Sun Microsystems and introduced in mid-1987....
processors and later added support for MMX/SSE
Streaming SIMD Extensions
In computing, Streaming SIMD Extensions is a SIMD instruction set extension to the x86 architecture, designed by Intel and introduced in 1999 in their Pentium III series processors as a reply to AMD's 3DNow! . SSE contains 70 new instructions, most of which work on single precision floating point...
/SSE2
SSE2
SSE2, Streaming SIMD Extensions 2, is one of the Intel SIMD processor supplementary instruction sets first introduced by Intel with the initial version of the Pentium 4 in 2001. It extends the earlier SSE instruction set, and is intended to fully supplant MMX. Intel extended SSE2 to create SSE3...
on Intel/AMD processors.
Since mediaLib is written in C and SIMD
SIMD
Single instruction, multiple data , is a class of parallel computers in Flynn's taxonomy. It describes computers with multiple processing elements that perform the same operation on multiple data simultaneously...
multimedia compiler intrinsics, it should be usable on any system that has an ANSI C compiler that supports SIMD multimedia intrinsics. Systems without SIMD intrinsics support can also use it as pure ANSI C, forgoing any extra acceleration provided by SIMD multimedia instructions. It is also included as part of Solaris
Solaris Operating System
Solaris is a Unix operating system originally developed by Sun Microsystems. It superseded their earlier SunOS in 1993. Oracle Solaris, as it is now known, has been owned by Oracle Corporation since Oracle's acquisition of Sun in January 2010....
10.
mediaLib 2.5 contains about 4000 files and 2.4 million lines of code, and contains more than 3000 functions for different areas:
- algebraAlgebraAlgebra is the branch of mathematics concerning the study of the rules of operations and relations, and the constructions and concepts arising from them, including terms, polynomials, equations and algebraic structures...
- matrixMatrix (mathematics)In mathematics, a matrix is a rectangular array of numbers, symbols, or expressions. The individual items in a matrix are called its elements or entries. An example of a matrix with six elements isMatrices of the same size can be added or subtracted element by element...
- imageImageAn image is an artifact, for example a two-dimensional picture, that has a similar appearance to some subject—usually a physical object or a person.-Characteristics:...
- graphicsGraphicsGraphics are visual presentations on some surface, such as a wall, canvas, computer screen, paper, or stone to brand, inform, illustrate, or entertain. Examples are photographs, drawings, Line Art, graphs, diagrams, typography, numbers, symbols, geometric designs, maps, engineering drawings,or...
- signal processingSignal processingSignal processing is an area of systems engineering, electrical engineering and applied mathematics that deals with operations on or analysis of signals, in either discrete or continuous time...
- videoVideoVideo is the technology of electronically capturing, recording, processing, storing, transmitting, and reconstructing a sequence of still images representing scenes in motion.- History :...
- audioSoundSound is a mechanical wave that is an oscillation of pressure transmitted through a solid, liquid, or gas, composed of frequencies within the range of hearing and of a level sufficiently strong to be heard, or the sensation stimulated in organs of hearing by such vibrations.-Propagation of...
- speechSpeechSpeech is the human faculty of speaking.It may also refer to:* Public speaking, the process of speaking to a group of people* Manner of articulation, how the body parts involved in making speech are manipulated...
- volume renderingVolume renderingIn scientific visualization and computer graphics, volume rendering is a set of techniques used to display a 2D projection of a 3D discretely sampled data set.A typical 3D data set is a group of 2D slice images acquired by aCT, MRI, or MicroCT scanner....
Open source applications that use mediaLib include Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...
, JDS
Java Desktop System
OpenSolaris Desktop, formerly Java Desktop System , is a desktop environment now developed by Oracle Corporation available for Solaris, and formerly Linux....
for Solaris, mplayer
MPlayer
MPlayer is a free and open source media player. The program is available for all major operating systems, including Linux and other Unix-like systems, Microsoft Windows and Mac OS X. Versions for OS/2, Syllable, AmigaOS and MorphOS are also available. The Windows version works, with some minor...
, ffmpeg
FFmpeg
FFmpeg is a free software project that produces libraries and programs for handling multimedia data. The most notable parts of FFmpeg are libavcodec, an audio/video codec library used by several other projects, libavformat, an audio/video container mux and demux library, and the ffmpeg command line...
, and ogle
Ogle DVD Player
Ogle is a DVD player for GNU/Linux, and other Unix-like operating systems. It is released as free software under the GNU GPL license. It was originally developed in 1999 by a few students at Chalmers Tekniska Högskola in Göteborg, Sweden, and maintained until late 2003...
.
There are several mediaLib versions targeting different platforms, but all share the same API
Application programming interface
An application programming interface is a source code based specification intended to be used as an interface by software components to communicate with each other...
, so users can switch from one platform to another without changing source code:
- Standard C: written in pure ANSI C, with some general code optimization for performance
- VIS/VIS2/VIS3: optimized for SPARC chips with VIS/VIS2/VIS3 multimedia instruction sets
- MMX/SSE/SSE2: optimized for Intel/AMD chips with MMX/SSE/SSE2 multimedia instruction sets
- Integer: optimized for chips that have no or limited floating pointFloating pointIn computing, floating point describes a method of representing real numbers in a way that can support a wide range of values. Numbers are, in general, represented approximately to a fixed number of significant digits and scaled using an exponent. The base for the scaling is normally 2, 10 or 16...
capabilities, such as UltraSPARC T1UltraSPARC T1|right|262px|UltraSPARC T1 processorSun Microsystems' UltraSPARC T1 microprocessor, known until its 14 November 2005 announcement by its development codename "Niagara", is a multithreading, multicore CPU...
and some embedded chips - Multi-threaded version: A thin wrapper layer built with OpenMPOpenMPOpenMP is an API that supports multi-platform shared memory multiprocessing programming in C, C++, and Fortran, on most processor architectures and operating systems, including Linux, Unix, AIX, Solaris, Mac OS X, and Microsoft Windows platforms...
on top of mediaLib, providing flexible multithreading multimedia acceleration for applications