diff --git a/contents/entropy_coding/index.css b/contents/entropy_coding/index.css index 5ca968c..a763bac 100644 --- a/contents/entropy_coding/index.css +++ b/contents/entropy_coding/index.css @@ -42,6 +42,15 @@ td center { margin-top:0em; margin-bottom:0em; } .Canvas { position:relative; } img.math{vertical-align:middle;} div.par-math-display, div.math-display{text-align:center;} +body{ margin:1em auto; max-width:80ch; padding:0 .62em; } +h1,h2,h3,h4,h5 { line-height:1.2; } +@media print{ body{ max-width:none } } +.partHead, likepartHead { font-size: 2em; } +.chapterHead, likechapterHead { font-size: 1.7411em; } +.sectionHead, likesectionHead { font-size: 1.5157em; } +.subsectionHead, likesubsectionHead { font-size: 1.3195em; } +.subsubsectionHead, likesubsubsectionHead { font-size: 1.1487em; } + @media (prefers-color-scheme: dark) { img[src^="index"]{filter: invert(1); } } li p.indent { text-indent: 0em } li p:first-child{ margin-top:0em; } li p:last-child, li div:last-child { margin-bottom:0.5em; } @@ -99,6 +108,8 @@ table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } .hline td, .cline td{ padding: 0; } .hline hr, .cline hr{border:none;border-top:1px solid black;} .hline {border-top: 1px solid black;} +.hline + .vspace:last-child{display:none;} +.hline:first-child{border-bottom:1px solid black;border-top:none;} .tabbing-right {text-align:right;} div.float, div.figure {margin-left: auto; margin-right: auto;} div.float img {text-align:center;} @@ -130,6 +141,7 @@ div.caption span.id{font-weight: bold; white-space: nowrap; } h1.partHead{text-align: center} p.bibitem { text-indent: -2em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; } p.bibitem-p { text-indent: 0em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; } +.subsubsectionHead, .likesubsubsectionHead { font-size: 1em; } .paragraphHead, .likeparagraphHead { margin-top:2em; font-weight: bold;} .subparagraphHead, .likesubparagraphHead { font-weight: bold;} .verse{white-space:nowrap; margin-left:2em} @@ -180,14 +192,20 @@ table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } .hline td, .cline td{ padding: 0; } .hline hr, .cline hr{border:none;border-top:1px solid black;} .hline {border-top: 1px solid black;} +.hline + .vspace:last-child{display:none;} +.hline:first-child{border-bottom:1px solid black;border-top:none;} div.array {text-align:center;} .supertabular {text-align:center} +code.lstinline{font-family:monospace,monospace;} +pre.listings{font-family: monospace,monospace; white-space: pre-wrap; margin-top:0.5em; margin-bottom:0.5em; } .lstlisting .label{margin-right:0.5em; } -div.lstlisting{font-family: monospace,monospace; white-space: nowrap; margin-top:0.5em; margin-bottom:0.5em; } -div.lstinputlisting{ font-family: monospace,monospace; white-space: nowrap; } +pre.lstlisting{font-family: monospace,monospace; white-space: pre-wrap; margin-top:0.5em; margin-bottom:0.5em; } +pre.lstinputlisting{ font-family: monospace,monospace; white-space: pre-wrap; } .lstinputlisting .label{margin-right:0.5em;} table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } +table.longtable{border-collapse: collapse; border-spacing: 0;} div.longtable{text-align:center;} table.longtable{margin-left:auto; margin-right: auto;} +caption.longtable .id{font-weight:bold;} /* end css.sty */ diff --git a/contents/entropy_coding/index.html b/contents/entropy_coding/index.html index 719e54c..3b1d2c4 100644 --- a/contents/entropy_coding/index.html +++ b/contents/entropy_coding/index.html @@ -71,24 +71,24 @@

3

4 Huffman Coding (HC)

-

A Huffman code [51] is a prefix code that, for each code-word, allows to “navigate” -through the so called Huffman tree from the trunk to one of its leaves, without -uncertainty. The Huffman tree satisfies that \begin {equation} l(c(s)) = \lceil I(s)\rceil , \label {eq:huffman_performance} \end {equation} -where \(l(c(s))\) is the length of the (Huffman) code-word, usually in bits of data, assigned to -the symbol \(s\), and \(I(s)\) is the amount of information represented by \(s\), measured bits of +

A Huffman code [51] is a prefix code that, for each code-word, allows to +“navigate” through the so called Huffman tree from the trunk to one of its +leaves, without uncertainty. The Huffman tree satisfies that \begin {equation} l(c(s)) = \lceil I(s)\rceil , \label {eq:huffman_performance} \end {equation} where \(l(c(s))\) is the +length of the (Huffman) code-word, usually in bits of data, assigned to the +symbol \(s\), and \(I(s)\) is the amount of information represented by \(s\), measured bits of information [6].

Notice that the minimum number of bits that can be used for representing a symbol (using Huffman) is 1, which can be a inefficient when the size of the alphabet -is small.1 +is small.1 Another drawback of HC is that the Huffman tree must be updated each time the probabilistic model is updated, action very frequent when using adaptive models.

-

Resources

+

Resources

  1. Huffman.py: Implementation in VCF. @@ -111,18 +111,18 @@

    Resources

  2. Context-Adaptive Variable-Length Coding.

-

To do

+

To do

  1. Create a new module named adaptive_Huffman.py that use a context-based adaptive probabilistic model [10], where the user can select - the order of the model.
+ the order of the model, and HC is used as a entropy encoder.

5 Arithmetic Coding (AC)

In an arithmetic codec [21], the number of bits of data that are used for representing symbols match exactly the number of bits of information provided by -the symbols, i.e, \begin {equation} l(c(s)) = I(s). \end {equation} +the symbols, i.e, \begin {equation} l(c(s)) = I(s). \end {equation}

This also means that, even if the size of the alphabet is small, the coding performance of an arithmetic code is optimal, although this optimality is only fully satisfied if the number of symbols to encode is infinite. Notice also that, if the @@ -130,7 +130,7 @@

5

-

Resources

+

Resources

  1. Arithmetic Coding (notebook). @@ -149,50 +149,53 @@

    Resources

  2. Context-Adaptive Binary Arithmetic Coding.

-

To do

+

To do

    -
  1. Create a new module named arith.py that use a context-based adaptive +
  2. Create a new module named arith that implement a static probabilistic + model and Arithmetic Coding [10]. +
  3. +
  4. Create a new module named arith.py that use a context-based adaptive probabilistic model and Arithmetic Coding [10], where the user can select the order of the model.
-

-

-

6 zlib

-

zlib is based on DEFLATE, which in turn is based on LZ77 [71] and Huffman coding. +

+

+

6 zlib

+

zlib is based on DEFLATE, which in turn is based on LZ77 [71] and Huffman coding. Therefore, zlib exploits the repetition of symbols and also, the 0-order statistical redundancy2. One of the main advantages of zlib is that is quite fast compared to symbol encoders such as HC and AC. -

Nowadays, zlib is a keystone in data manipulation because it is the basic library +

Nowadays, zlib is a keystone in data manipulation because it is the basic library used in such important applications as Zip and Gzip. -

+

-

Resources

-

+

Resources

+

  1. zlib — Compression compatible with gzip.
  2. Lossless JPEG.
-

+

7 Portable Network Graphics (PNG)

-

PNG [8] (pronounced “ping”) is a dictionary-based (string encoding) lossless image +

PNG [8] (pronounced “ping”) is a dictionary-based (string encoding) lossless image compression format used for representing digital images and videos [3] in III... format. The entropy encoder of PNG is based on HC and LZSS, and a pixel predictor that removes the spatial redundancy. -

We must bear in mind that as such an image compressor, we can only interact +

We must bear in mind that as such an image compressor, we can only interact with PNG at the image level, that is, it only accepts images (in shades of gray or in color, with the possibility of an alpha channel), and only returns images. -

+

-

8 References

+

8 References

[1]   Vicente González-Ruiz. Compresión Reversible y Transmisión de @@ -227,9 +230,13 @@

8

-

1In this case, Huffman can be ineffective. In an extreme case, the alphabet could have only -two symbols, and therefore the Huffman encoder does not compress or expand.

-

2In other words, that some symbols are more frequently than others.

+ + + +
+

1In this case, Huffman can be ineffective. In an extreme case, the alphabet could have only +two symbols, and therefore the Huffman encoder does not compress or expand.

+

2In other words, that some symbols are more frequently than others.

\ No newline at end of file diff --git a/contents/entropy_coding/texput.tex b/contents/entropy_coding/texput.tex index e85584b..6fed4b7 100644 --- a/contents/entropy_coding/texput.tex +++ b/contents/entropy_coding/texput.tex @@ -109,7 +109,7 @@ \subsection*{To do} \item Create a new module named \texttt{adaptive\_Huffman.py} that use a context-based adaptive probabilistic model \cite{nelson96datacompression}, where the user can select the order - of the model. + of the model, and HC is used as a entropy encoder. \end{enumerate} \section{\href{https://en.wikipedia.org/wiki/Arithmetic_coding}{Arithmetic @@ -143,6 +143,9 @@ \subsection*{Resources} \subsection*{To do} \begin{enumerate} +\item Create a new module named \texttt{arith} that implement a static + probabilistic model and Arithmetic Coding + \cite{nelson96datacompression}. \item Create a new module named \texttt{arith.py} that use a context-based adaptive probabilistic model and Arithmetic Coding \cite{nelson96datacompression}, where the user can select the order diff --git a/contents/working_environment/index.html b/contents/working_environment/index.html index 62abf72..db974f6 100644 --- a/contents/working_environment/index.html +++ b/contents/working_environment/index.html @@ -19,11 +19,11 @@

Working Environment

Vicente González Ruiz - Departamento de Informática - UAL

-
November 3, 2024
+
December 5, 2024

Contents

-  1 Visual Coding Framework (VCF) Project +  1 The Visual Coding Framework (VCF) Project
 2 Recommended Working Environments
  2.1 Using your Operating System
  2.2 Using a Container @@ -35,7 +35,7 @@

Contents

-

1 Visual Coding Framework (VCF) Project

+

1 The Visual Coding Framework (VCF) Project

VCF [2] is a Python [1] application that implements a collection of algorithms used in image and video compression. VCF is hosted at GitHub and developed by the students of Sistemas Multimedia. diff --git a/contents/working_environment/texput.tex b/contents/working_environment/texput.tex index 9e9fdd8..4598b67 100644 --- a/contents/working_environment/texput.tex +++ b/contents/working_environment/texput.tex @@ -7,18 +7,19 @@ \tableofcontents -\section{Visual Coding Framework (VCF) Project} +\section{The Visual Coding Framework (VCF) Project} \href{https://github.com/Sistemas-Multimedia/VCF}{VCF}~\cite{vruiz__VCF} is a Python~\cite{python} application that implements a collection of algorithms used in image and video compression. VCF is hosted at -GitHub and developed by the students of Sistemas Multimedia. +GitHub and developed with the help of the students of Sistemas +Multimedia. \section{Recommended Working Environments} \subsection{Using your Operating System} VCF modules should run on any machine with a Python interpreter installed. Said that, it is recommended to use Linux or a -UNIX-based OS such as OSX. However, with some configuration effort +UNIX-based OS (such as Mac OSX). However, with some configuration effort (for example, after installing Python), VCF should run also in Windows.