Data Formats and Codecs

download Data Formats and Codecs

of 66

  • date post

    22-Jan-2016
  • Category

    Documents

  • view

    38
  • download

    0

Embed Size (px)

description

INF 5070 – Media Storage and Distribution Systems. Data Formats and Codecs. 30/8 – 2004. Why codecs and formats?. Codecs (coders/decoders) Determine how information is represented Important for servers and distribution systems Required sending speed Amount of loss allowed Buffers required - PowerPoint PPT Presentation

Transcript of Data Formats and Codecs

  • Data Formats and Codecs30/8 2004INF 5070 Media Storage and Distribution Systems

    2004 Carsten Griwodz & Pl HalvorsenINF 5070 media servers and distribution systems

    Why codecs and formats?Codecs (coders/decoders)Determine how information is representedImportant for servers and distribution systemsRequired sending speedAmount of loss allowedBuffers requiredFormatsDetermine how data is storedImportant for servers and distribution systemsWhere is the data?Where is the data about the data?

  • Media data

    2004 Carsten Griwodz & Pl HalvorsenINF 5070 media servers and distribution systems

    Media dataMedium: "Thing in the middlehere: means to distribute and present informationMedia affect human computer interactionThe mantra of multimedia usersSpeaking is faster than writingListening is easier than readingShowing is easier than describing

    2004 Carsten Griwodz & Pl HalvorsenINF 5070 media servers and distribution systems

    Dependence of MediaTime-independent mediaTextGraphicsDiscrete media

    Time-dependent mediaAudioVideoContinuous media

    Interdependant mediaMultimedia

    "Continuous" refers to the users impression of the data, not necessarily to its representationCombined video and audio is multimedia - relations must be specified

    2004 Carsten Griwodz & Pl HalvorsenINF 5070 media servers and distribution systems

    Dependence of MediaDefined by the presentation of the data, not its representation

    Discrete mediaTextGraphicsVideo stills (image displayed by pausing a video stream)

    Continuous mediaAudioVideoAnimationTicker news (continuously scrolling text)

    MultimediaMultiplexed audio and video

    2004 Carsten Griwodz & Pl HalvorsenINF 5070 media servers and distribution systems

    Properties of a Multimedia SystemFlexibilityProvide mechanisms to handle all kinds of media, in particular, discrete and continuous mediaA VCR and a desktop publishing system for text and graphics are no multimedia systemsAn editor with voice annotation is a multimedia system

    IntegrationIndependent media storageComputer-controlled media combination

    DefinitionA multimedia system is characterized by the integrated computer-controlled handling of independent discrete and continuous media

    2004 Carsten Griwodz & Pl HalvorsenINF 5070 media servers and distribution systems

    Multimedia: Not Your Ordinary DataMultimedia is different from traditional digital data:High data volumeContinuous streamingSeveral related streamsQuality of service

    2004 Carsten Griwodz & Pl HalvorsenINF 5070 media servers and distribution systems

    High Data VolumeThroughput:Higher volume than for traditional dataLonger transactions than for traditional dataRequiresPerformance and bandwidthResource management techniquesCompression

    Typical valuesUncompressed video:140 216 Mbit/sUncompressed audio (CD):1.4 Mbit/sUncompressed speech:64 Kbit/sCompressed audio & video (VoD):down to 1.2 8 Mbit/sCompressed audio & video (Conf.):down to 128 Kbit/sCompressed speech:down to 6.2 Kbit/s

  • Coding for distribution

    2004 Carsten Griwodz & Pl HalvorsenINF 5070 media servers and distribution systems

    Compression - NecessityE.g., video sequence25 images/sec.PAL standard3 byte/pixelYUV (luminance + 2 chrominance values)RGB (red-green-blue values)Image resolution 640 * 480 pixelData rate = 640 * 480 * 3 Byte * 25/s = 23040000 byte/s ~ 22 MByte/sApprox. 1/16 stream over EthernetApprox. 1/2 stream over Fast EthernetCompression is necessary

    2004 Carsten Griwodz & Pl HalvorsenINF 5070 media servers and distribution systems

    Compression General RequirementsDependence on application type:Dialogue modeRetrieval mode

    2004 Carsten Griwodz & Pl HalvorsenINF 5070 media servers and distribution systems

    Compression Mode Dependent RequirementsDialogue and retrieval mode requirements:Synchronization of audio, video, and other media

    Dialogue mode requirements:End-to-end delay < 150msCompression and decompression in real-timeSymmetricRetrieval mode requirements:Fast forward and backward data retrievalRandom access within 1/2 sAsymmetric

    We look mainly at retrieval mode!

    2004 Carsten Griwodz & Pl HalvorsenINF 5070 media servers and distribution systems

    Compression Categories

    2004 Carsten Griwodz & Pl HalvorsenINF 5070 media servers and distribution systems

    Basic Encoding Steps

    2004 Carsten Griwodz & Pl HalvorsenINF 5070 media servers and distribution systems

    Run-Length CodingAssumptionLong sequences of identical symbolsExample

    2004 Carsten Griwodz & Pl HalvorsenINF 5070 media servers and distribution systems

    Bit-Plane CodingAssumptionEven longer sequences of identical bitsExample 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, ,0,0 (MSB) 0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0, ,0,0 (MSB-1) 1,0,1,0,0,1,0,1,1,0,0,1,0,0,0,0, ,0,0 (MSB-2) 0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0, ,0,0 (MSB-3)10,0,6,0,0,3,0,2,2,0,0,2,0,0,1,0, ,0,0 (absolute) 0,x,1,x,x,1,x,0,0,x,x,1,x,x,0,x, ,x,x (sign bits) (0,1) (2,1) (0,0)(1,0)(2,0)(1,0)(0,0)(2,1) (5,0)(8,1)Up to 20% savings over run-length coding can be achieved

    2004 Carsten Griwodz & Pl HalvorsenINF 5070 media servers and distribution systems

    Huffman CodingAssumptionSome symbols occur more often than othersE.g., character frequencies of the English language

    Fundamental principleFrequently occurring symbols are coded with shorter bit strings

    2004 Carsten Griwodz & Pl HalvorsenINF 5070 media servers and distribution systems

    Huffman CodingExampleCharacters to be encoded:A, B, C, D, EProbability to occur:p(A)=0.3, p(B)=0.3, p(C)=0.1, p(D)=0.15, p(E)=0.15

    2004 Carsten Griwodz & Pl HalvorsenINF 5070 media servers and distribution systems

    HuffmanTable and example of application to data stream

    2004 Carsten Griwodz & Pl HalvorsenINF 5070 media servers and distribution systems

    JPEGJPEG: Joint Photographic Expert Group

    International Standard:For digital compression and coding of continuous-tone still images:Gray-scaleColorSince 1992

    Joint effort of:ISO/IEC JTC1/SC2/WG10Commission Q.16 of CCITT SGVIII

    Compression rate of 1:10 yields reasonable results

    2004 Carsten Griwodz & Pl HalvorsenINF 5070 media servers and distribution systems

    JPEGVery general compression scheme

    Independence ofImage resolutionImage and pixel aspect ratioColor representationImage complexity and statistical characteristics

    Well-defined interchange format of encoded data

    Implementation inSoftware onlySoftware and hardware

    2004 Carsten Griwodz & Pl HalvorsenINF 5070 media servers and distribution systems

    JPEGSequence of compression stepsDifferent resolutions possibleLossy or lossless modelossless compression factor ~1,6:1Symmetrical codec

    2004 Carsten Griwodz & Pl HalvorsenINF 5070 media servers and distribution systems

    JPEG Baseline Mode: QuantizationUse of quantization tables for the DCT-coefficientsMap interval of real numbers to one integer numberAllows to use different granularity for each coefficient

    2004 Carsten Griwodz & Pl HalvorsenINF 5070 media servers and distribution systems

    JPEG 4 Modes of Compression

    2004 Carsten Griwodz & Pl HalvorsenINF 5070 media servers and distribution systems

    Motion JPEGUse series of JPEG frames to encode video

    ProLossless mode editing advantageFrame-accurate seeking editing advantageArbitrary frame rates playback advantageArbitrary frame skipping playback advantageScaling through progressive mode distribution advantageMin transmission delay = 1/framerate conferencing advantageSupported by popular frame grabbers

    ContraSeries of JPEG-compressed imagesNo standard, no specificationWorse, several competing quasi-standardsNo relation to audioNo inter-frame compression

    2004 Carsten Griwodz & Pl HalvorsenINF 5070 media servers and distribution systems

    H.261 (px64)International StandardVideo codec for video conferences at p x 64kbit/s (ISDN):Real-time encoding/decoding, max. signal delay of 150msConstant data rateIntraframe codingDCT as in JPEG baseline modeInterframe coding, motion estimationSearch of similar macroblock in previous image and comparePosition of this macroblock defines motion vectorDifference between similar macroblocks

    2004 Carsten Griwodz & Pl HalvorsenINF 5070 media servers and distribution systems

    MPEG (Moving Pictures Expert Group)International Standard:Compression of audio and video for playback (1.5 Mbit/s):Real-time decodingSequence of I-, P-, and B-Frames:Random accessat I-framesat P-frames: i.e. decode previous I-frame firstat B-frame: i.e. decode I and P-frames first

    2004 Carsten Griwodz & Pl HalvorsenINF 5070 media servers and distribution systems

    MPEG-2From MPEG-1 to MPEG-2Improvement in qualityFrom VCR to TV to HDTVNo CD-ROM based constraintsHigher data ratesMPEG-1: about 1.5 MBit/sMPEG-2: 2-100 MBit/sEvolution1994: International StandardAlso later known as H.262Prominent role for digital TV in DVB (digital video broadcasting) and DVD (digital video disk)Commercial MPEG-2 realizations available

    2004 Carsten Griwodz & Pl HalvorsenINF 5070 media servers and distribution systems

    MPEG-2Beyond MPEG-1:Higher quality encodingHigher data ratesInterleaved modes

    Use casesBroadcast quality productionDVB-T: TerrestrialDVB-S: SatelliteDVB-C: CableProgram Streamfor post-processing, storage, and DVD distributionTransport Streamfor broadcasting, error resilience

    Scaling:Signal to Noise Ration (SNR) scaling- progressive compression error correcting codesSpatial scaling- several pixel resolutionsTemporal scaling- frame dropping

    2004 Carsten Griwodz & Pl HalvorsenINF 5070 media servers an