Notes
Slide Show
Outline
1
Graphics File Format and
Data Compression Techniques
(take 2)  Week 8
2
Administrivia (is back)
  • Distribute exams
  • Discuss groundrules
  • Please sign in as you turn exams in
3
Halloween
  • Hope I didn’t spoil your Halloween


  • Have some candy…
4
Tonight
  • Exams due by 7:30
  • Break until 8:00
  • Brief 1hr lecture
5
Exam
  • Closed book, no computers or calculators
  • Please follow instructions carefully
  • Show all work
    • Don’t know an answer?
    • Show me what you do know…
    • (give me something to work with)
  • Sign attendance as you turn exam in
6
Eye Evolution this week in Journal Science
  • Ciliary photoreceptors with vertebrate-type opsins in an invertebrate brain
  • Platynereis dumerilii
    • 'living fossil,‘ (a marine worm)
    • light sensitive Opsin molecule
    • Same as the human/vertibrate Opsin
  • Indicates a common evolutionary ancestor
7
PNG filters
  • PNG compresses lossless data better than GIF
    • In part because a series of lossless (reversible) filters are used
    • Filters examine pixels from rows and columns already traversed
  • Assumes that deltas take less room to store than the pixel values
8
PNG filtered pixels
9
PNG filters
  • 0 Unfiltered
  • 1 Sub filtered (diff from pixel on left)
  • 2 Up filter (diff from pixel above)
  • 3 Avg filter (diff from avg pixels to left and above)
  • 4 Paeth filter (diff from value predicted by neighbors)
10
Paeth predictive filter
  • horiz = abs(above – upperLeft);
  • vert  = abs(left  – upperLeft);
  • diag  = abs(left + above – 2* upperLeft);
  • if (horiz <= vert && horiz <= diag)
  • return left;
  • if (vert <= diag)
  • return above;
  • return upperLeft;
11
Audio Delta Coding
  • Similar but 1 dimensional predictive filter
  • Used for lossless audio compression
  • Delta techniques assume small changes between samples
12
Example
  • 4 seconds of EEG data









  • Example from P. Bourke
13
Intrasample diff. distribution






  • Few bits needed to encode (most) diffs
14
Lossless Audio
  • Pretty much:
    • Predictive filtering
    • Entropy coding
    • Extra media specific tricks:
      • Stereo Decorrelation
15
Predictive Filtering
  • Any predictor function may create a filter
    • When encoding:
      • residual = sample – predictor(lastSample)
    • When decoding:
      • sample = residual + predictor(lastSample)
16
Predictive Filtering
  • In a delta filter (simplest):
    • prediction = lastSample


  • More complicated filters:
    • Dynamically change weighting to adapt the correlation between lastSample and prediction
      • Prediction=lastSample*weight
17
Stereo Decorrelation
  • Signals in a stereo mix are usually very similar
  • Convert L+R signals to X+Y:
    • X=L-R
    • Y=R+(X/2)
  • This could be accounted for in a special filter…
18
CAD
  • Computer aided design
  • Lossless is critical!


  • CAD:
    • isn’t about pixels
    • is precisely describing the relationships of objects
    • Stores vector info not pixels
19
CAD & SGI
  • We sold many ‘seats’ to CAD
  • Custom stripped down configurations
    • CAD is very price sensitive

  • Much low end CAD on PC with AutoCAD
  • Airplanes designed on CATIA on SGI
20
DXF: AutoCAD export format
  • Stores floating point values:
    • Primary X,Y,Z coordinate
    • Entity's thickness
21
CAD entities
  • Primitives:
    • LINE, POINT, CIRCLE, ARC, SOLID, 3DLINE, 3DFACE, SHAPE, TEXT, POLYLINE, etc.
  • Library of objects are built out of these primatives
22
Modeling
  • Contrast
    • Game modeling
    • CAD modeling
23
Resource Libraries
  • No longer unusual to construct physical object out of game/animation models