Digital Understanding Part 2: Codecs , History and Features

Status
Not open for further replies.

SharekhaN

Inactive
Forerunner
Hi ,

The age of the internet has bought us many options for entertainment . The obession for video was never greater . Since we invest resources and time creating media which is portable , lets us take some time to understand which one of them performs well and some reasons why it does .

Three codecs have taken centerstage . Namely
1) DivX
2) XviD
3) x264

Lets get to know them

History :

DivX ;-) 3.11 Alpha and later 3.xx versions refers to a hacked version of the Microsoft MPEG-4 Version 3 video codec (which was actually not MPEG-4 compliant), extracted around 1998 by French hacker Jérome Rota (also known as Gej).
In early 2000, Jordan Greenhall recruited Rota to form a company (originally called DivXNetworks, Inc., renamed to DivX, Inc. in 2005) to create DivX and steward its development. This effort resulted first in the release of the "OpenDivX" codec and source code on January 15, 2001. OpenDivX was hosted as an open-source project on the Project Mayo web site hosted at projectmayo.com (the name comes from "mayonnaise", because, according to Rota, DivX and mayonnaise are both "French and very hard to make." The company's internal developers and some external developers worked jointly on OpenDivX for the next several months, but the project eventually stagnated . DivXNetworks founded OpenDivX as part of Project Mayo which was intended to be a home for open source multimedia projects. OpenDivX was an open-source MPEG-4 video codec based on a stripped down version of the MoMuSys reference MPEG-4 encoder. The source code, however, was placed under a restrictive license and only members of the DivX Advanced Research Centre (DARC) had write access to the project CVS.

In early 2001, DARC member Sparky wrote an improved version of the encoding core called encore2. This was updated several times before, in April, it was removed from CVS without warning. The explanation given by Sparky was "We (our bosses) decided that we are not ready to have it in public yet."

DivX took the encore2 code and developed it into DivX 4.0, initially released in July 2001. Other developers who had participated in OpenDivX took encore2 and started a new project—Xvid—that started with the same encoding core. The company released a clean-room version of the codec as DivX 4.0 in July 2001. DivX, Inc. has since continued to develop the DivX codec, releasing DivX 5.0 in March 2002. By the release of version 5.2.1 on September 8, 2004, the DivX codec was substantially feature-complete. Changes since then have tended to focus on speed, and encouraging wider hardware player support.
It was after this that a fork of OpenDivX was created, using the latest version of encore2 that was downloaded before it was removed. Since then, all the OpenDivX code has been replaced and Xvid has been published under the GNU General Public License.

In July 2001, developers started complaining about a lack of activity in the project; the last CVS commit was several months before, bugfixes were being ignored, and promised documentation had not been written. Soon after, DARC released a beta version of their closed-source commercial DivX 4 codec, which was based on encore2, saying that "what the community really wants is a Winamp, not a Linux." Many accused DivXNetworks of starting OpenDivX for the sole purpose of harvesting other people's ideas to use in their DivX 4 codec, some were disappointed that the codec had stagnated and wanted to continue working on it, while others were angry at the way DivXNetworks handled a so-called open source project. It was after this that a fork of OpenDivX was created, using the latest version of encore2 that was downloaded before it was removed. Since then, all the OpenDivX code has been replaced and Xvid has been published under the GNU General Public License.

Features:

Some or most codecs support what is known as GMC , Qpels and Chroma Optimizations . But what do they really do . Is turning an Option On or off going to affect my video ? These are the questions usually asked .

GMC :
GMC is most useful in scenes where panning, zooming, or rotation occurs. It enables movement to be described as a relatively simple transform instruction, rather than a constant frame by frame whole scene update. This may not substantially improve the apparent visual quality of the scene, but will greatly improve the resultant compression obtained.

DivX has only one GMC warp point specified. This was to enable easier hardware implementation. Xvid states 3 warp points, and as a result, has less hardware support. The DivX player does support 3 warp point GMC, and thus will play GMC Xvid encoded streams. Because GMC transforms are only added

to the encoding stream when used, they do not have a constant bit rate overhead . X264 uses something as Motion Estimates or ME . We would cover that a bit later .

QPEL :
Advanced video encoding methods such as those based upon MPEG-4 specifications, for example XviD, DivX, use motion estimation algorithms to significantly improve video compression. The default level of resolution for motion estimation for most MPEG-4 implementations is half a pixel, although quarter pixel is specified under the standard. H.264/MPEG-4_AVC specifies quarter pixel as default.
Gains in compressibility from more precisely describing intra-frame motion, are typically offset by the increased constant bitstream overhead of running a higher level of description. Therefore, enabling QPEL does not typically produce smaller file sizes. However, since QPEL delivers sharper images, an equivalent sized QPEL enabled file, will generally be perceived as offering higher visual quality, than a non QPEL file. To this extent, while QPEL files may not be smaller, they can be said to offer a higher level of visual detail compression , while this may always not be true . Where there is supposed to be higher motion in a limited axis , it may leads to greater artifacts or "Mosquitoes" .Choice of use is highly dependent on the source video .
QPEL requires up to twice as much processing power to encode, and 30-60% more processing power to decode. For this reason, and to enable wider hardware compatibility, QPEL is disabled in the default DIVX encoding profiles.

Chroma Optimization :
Represents the “purity†of a color, with lower chroma being less pure .There is no intrinsic upper limit to chroma .Because the human eye is less sensitive to color than luminance, bandwidth can be optimized by storing more luminance detail than color detail. At normal viewing distances, there is no perceptible loss incurred by sampling the color detail at a lower rate

Lumi Masking :
Lumi masking is a technique used by video compression software, which reduces quality in very bright or very dark areas of the picture, as quality loss in these areas is less likely to be visible. It is also known as "psychovisual enhancements" or "adaptive quantization". The reduction in quality (and therefore bitrate) in certain areas of the picture caused by using lumi masking allows more bits to be allocated to the rest of the video, thus improving overall quality. Lumi masking is not perfect, however, and in some cases the degradation in quality it causes is visible.

Motion Estimates :
Used in Mpeg4 AVC codecs like x264 , Nero Digital etc .
There are 4 ways much like the GMC .
Rather than explaining .The arrangements should make more sense .

Diamond search
Code:
 1
101
 1

Hexagonal search
Code:
 1 1
 222
12021
 222
 1 1
Uneven multi-hexagon
Code:
                3

        3       3       3
          3           3
3               3               3
                1
    3       3       3       3
                1
3       3       3       3       3
    3         3 1 3         3
        3   3 22222 3   3
            3 22122 3
31 131 131 13121012131 131 131 13
            3 22122 3
        3   3 22222 3   3
    3         3 1 3         3
3       3       3       3       3
                1
    3       3       3       3
                1
3               3               3
          3           3
        3       3       3

                3

Exhaustive search
Code:
           ...
   111111111111111111111111
   111111111111111111111111
   111111111111111111111111
   111111111111111111111111
   111111111111111111111111
   111111111111111111111111
   111111111111111111111111
...111111111111011111111111...
   111111111111111111111111
   111111111111111111111111
   111111111111111111111111
   111111111111111111111111
   111111111111111111111111
   111111111111111111111111
   111111111111111111111111
              ...

So this kind of scan will check any movements and try to taken them in account with varying degrees of sucess depending on the kind of motion estimates used .

Explaining anything else goes beyond the scope of this article . I hope you have enjoyed going through this as much i have compiling this and adding to this . If you find any disrepencies , please do let me know .

Credits -
Wikipedia
akupenguin (developer )
 
Status
Not open for further replies.