this dir | view | cards | source | edit | dark top

Exam

Exam
Introduction

data compression

Introduction

measuring the performance

Introduction

limits of lossless compression

Lossless Compression

basic concepts

Lossless Compression

typical strategy

Lossless Compression

codes

Lossless Compression

prefix codes

Lossless Compression

Shannon-Fano coding

Lossless Compression

algorithm

Lossless Compression

optimality of Huffman code

Lossless Compression

idea: we could encode larger parts of the message, it might be better than Huffman coding

extended Huffman code … we use nn-grams instead of individual symbols

Lossless Compression

can we modify Huffman algorithm to guarantee that the resulting code minimizes the maximum codeword length?

yes, when constructing the tree, we can sort the nodes not only by their frequencies but also by the depth of their subtree

Lossless Compression

what is the maximum height of a Huffman tree for an input message of length nn?

Lossless Compression

generalize the construction of binary Huffman code to the case of mm-ary coding alphabet (m>2m\gt 2)

Lossless Compression

implementation notes

Lossless Compression

canonical Huffman code

Lossless Compression

adaptive compression

Lossless Compression

adaptive Huffman code

Lossless Compression

each string sAs\in A^* associate with a subinterval Is[0,1]I_s\subseteq[0,1] such that

Lossless Compression

encoding

Lossless Compression

decoding

Lossless Compression

problem: using floating point arithmetic leads to rounding errors → we will use integers

underflow may happen that way if we use too short integers

Lossless Compression

another problem

Lossless Compression

algorithm

Lossless Compression

time complexity

Lossless Compression

adaptive version

Lossless Compression

Hartley's formula

Lossless Compression

Shannon's formula

Lossless Compression

Kraft-McMillan theorem

Lossless Compression

proof

Lossless Compression

theorem: let CC be a uniquely decodable code for a random variable XX, then H(X)L(C)H(X)\leq L(C)

Lossless Compression

entropy of a discrete random vector

Lossless Compression

theorem: an arbitrary optimal prefix code CC for a random variable XX satisfies H(X)L(C)<H(X)+1H(X)\leq L(C)\lt H(X)+1

Lossless Compression

analysis of arithmetic coding

Lossless Compression

problems

Lossless Compression

a better probabilistic model

Lossless Compression

according to an experimental estimate

the entropy of English is 1.3 bits per symbol

Lossless Compression

methods

Lossless Compression

Prediction by Partial Matching (PPM)

Lossless Compression

unary code α\alpha

Lossless Compression

binary code β\beta

Lossless Compression

Elias codes

Lossless Compression

Elias codes are universal

Lossless Compression

idea

Lossless Compression

problems

Lossless Compression

LZ77

Lossless Compression

LZSS

Lossless Compression

other variants

Lossless Compression

Deflate algorithm

Lossless Compression

LZ77 disadvantages

Lossless Compression

LZ78

Lossless Compression

LZW

Lossless Compression

LZC

Lossless Compression

LZMW

Lossless Compression

LZAP

Lossless Compression

color spaces

Lossless Compression

representation of bitmap images

Lossless Compression

GIF (Graphics Interchange Format)

Lossless Compression

PNG (Portable Network Graphics)

Lossless Compression

Burrows–Wheeler transform

Lossless Compression

bzip2

Lossy Compression

how to measure the loss of information

Lossy Compression

sampling

Lossy Compression

quantization

Lossy Compression

audio processing

Lossy Compression

main idea

Lossy Compression

central limit theorem

if we collect nn samples of random variable XX, the distribution of the sample mean approaches N(EX,var(X)/2)N(\mathbb EX,\text{var}(X)/2) for a sufficiently large nn

Lossy Compression

problem formulation

Lossy Compression

uniform quantizer

Lossy Compression

forward adaptive quantizer (offline)

Lossy Compression

backward adaptive quantizer (online)

code interval multiplier
0 (0,Δ)(0,\Delta) 0.8
1 (Δ,2Δ)(\Delta,2\Delta) 0.9
2 (2Δ,3Δ)(2\Delta,3\Delta) 1
3 (3Δ,)(3\Delta,\infty) 1.2
4 (Δ,0)(-\Delta,0) 0.8
5 (2Δ,Δ)(-2\Delta,-\Delta) 0.9
6 (3Δ,2Δ)(-3\Delta,-2\Delta) 1
7 (,3Δ)(-\infty,-3\Delta) 1.2
Lossy Compression

nonuniform quantization

Lossy Compression

companding

Lossy Compression

we split the file (or group the individual samples) into vectors

Lossy Compression

idea: codebook

Lossy Compression

LBG algorithm

Lossy Compression

tree-structured vector quantization (TSVQ)

Lossy Compression

lattice vector quantizers

Lossy Compression

classified vector quantization

Lossy Compression

applications

Lossy Compression

instead of that, we will quantize the difference between the previous predicted value and the current value

Lossy Compression

DPCM (differential pulse-code modulation)

Lossy Compression

ADPCM

Lossy Compression

G.726

Lossy Compression

delta modulation

Lossy Compression

constant factor adaptive delta modulation (CFDM)

Lossy Compression

for images, we have to make a two-dimensional transform

it is better to transform each dimension separately = separable transform

Lossy Compression

separable transform using matrix AA

Lossy Compression

orthogonal transform … we use orthogonal transform matrix

Lossy Compression

Karhunen-Loéve transform

Lossy Compression

discrete cosine transform

Lossy Compression

discrete sine transform

gain GDSTG_{DST} is close to the optimum value for Markov sources with low correlation coefficient ρ=E[xnxn+1]E[xn2]\rho=\frac{\mathbb E[x_nx_{n+1}]}{\mathbb E[x_n^2]}

Lossy Compression

Hadamard matrix

Lossy Compression

discrete Walsh-Hadamard transform

Lossy Compression

quantization of transform coefficients

Lossy Compression

quantization and coding

Lossy Compression

JPEG (Joint Photographic Experts Group)

Lossy Compression

WebP

Lossy Compression

example

Lossy Compression

filters – selectively block frequencies that does not belong to the filtered range

Lossy Compression

digital filter with input (xn)(x_n) output (yn)(y_n) coefficients (ai),(bi)(a_i),(b_i)

Lossy Compression

filters used in subband coding

Lossy Compression

basic algorithm

  1. analysis
    • MM filters cover the frequency range of the input
    • generalized Nyquist rule – the sampling frequency has to be at least twice the supported frequency range
  2. downsampling (decimation)
    • keep each MMth sample
  3. quantization + coding
    • allocation of bits between subbands
      • subband variance is a suitable heuristic
    • ADPCM, PCM, vector quantization
  4. decoding
  5. upsampling
    • insert appropriate number of zeros
  6. synthesis
    • bank of reconstruction filters
Lossy Compression

G.722

Lossy Compression

MPEG audio (Moving Picture Experts Group)

Lossy Compression

image compression

Lossy Compression

can we reduce the problem to image compression?

Lossy Compression

basic types of algorithms

Lossy Compression

video signal representation

Lossy Compression

MPEG-SIF format based on ITU-R 601 4:2:2

Lossy Compression

ITU-R H.261

Lossy Compression

MPEG

Lossy Compression

MPEG-1

Lossy Compression

MPEG-2

Lossy Compression

MPEG-4

Lossy Compression

MPEG-M (Part 2)

Lossy Compression

H.264 improvements (examples)

Lossy Compression

H.265 improvements (examples)

Hurá, máš hotovo! 🎉
Pokud ti moje kartičky pomohly, můžeš mi koupit pivo.