Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 ASP

Reply
 
Thread Tools Search this Thread Display Modes
Old 20th March 2004, 14:04   #1  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,779
MPEG-4 ASP Information

What is MPEG-4?

MPEG-4 (ISO 14496) is a broad Open Standard developed by the Moving Picture Experts Group (MPEG), a working group of the International Organization for Standardization (ISO) which also did the well known MPEG-1 (MP3, VCD) and MPEG-2 (DVD, SVCD) Standards, standardizing all sorts of audio/video compression formats and much more
By its nature the MPEG-4 Standard doesnt aim at standardizing one potential product (eg something comparable to DVD) but covers a broad range of Sub-Standards, which Product Providers can choose from to follow, according to what they need for their product

The MPEG-4 Standard, as mentioned, is divided into many different sub-standards, where for us users on Doom9 the following parts might be of major interest:
- ISO 14496-1 (Systems), Animation/Interactivity (like DVD Menus)
- ISO 14496-2 (Video), e.g. Advanced Simple Profile (ASP), as followed by XviD, DivX5, 3ivx...
- ISO 14496-3 (Audio), Advanced Audio Coding (AAC)
- ISO 14496-10 (Video), Advanced Video Coding (AVC), also known as H.264
- ISO 14496-14 (Container), MP4 container format (uses the .mp4 extension)
- ISO 14496-17 (Subtitles), MPEG-4 Timed Text subtitle format

This information thread now aims at providing some usefull infos on most of these parts, with a focus on MPEG-4 ASP and AVC/H.264


What are the possible advantages of an open standard, like MPEG-4, compared to closed formats, like Micro$oft's Windows Media?

The good thing about an open standard is that its open for everyone to follow when creating a product. therefore we already have a lot of different products which are compatible to the MPEG-4 Standard and are therefore also compatible to each other
Next to interoperability and big product range to choose from, an open standard leads to competition, which means for the consumer that products in the competitive market will most likely have a better increase in quality, lower prices and a better focus on the consumers needs

but not to forget and thats maybe the most important point for me:
an open standard allows open source development, like we all know from XviD for example
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free

Last edited by bond; 19th June 2005 at 11:41.
bond is offline   Reply With Quote
Old 20th March 2004, 14:08   #2  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,779
ISO 14496-2 (Video) - Advanced Simple Profile (ASP)

The MPEG-4 Standard defines a broad range of video coding tools. The atm most widely used ones are defined under ISO 14496-2, thats why this part of the Standard is also often called MPEG-4 "Part 2", but i will call it from now on MPEG-4 ASP as described below

MPEG-4 Part 2 Profiles

As already mentioned the MPEG-4 Standard aims at multiple applications. Of course for different usages also different coding tools are needed (ie if you want to stream video content at very low bitrates you will use different tools as if you want to make a dvd backup copy at medium or high bitrates)
to cover all these different needs the MPEG-4 Standard defines a lot of different Profiles and Levels. each profile/level is an interoperability/conformance point, ensuring that all products, following a specific profile/level, even if from different vendors, can work together.
these profiles/levels standardise not only what encoding tools can be used but also define for example the allowed bitrate-range, image-sizes, frame-rates aso...

For an overview on available MPEG-4 profiles have a look here


Advanced Simple Profile (ASP)

When it comes to DVD Backups the Advanced Simple Profile @ Level 5 (ASP@L5) is the one to follow
It allows frame sizes up to 720x576, frame-rates up to 30fps and offers advanced coding tools like B-Frames (B-VOPS), QuarterPixel Motion Estimation (QPEL), Global Motion Compensation (GMC) and MPEG/Custom Quantization, in contrary to the the Simple Profile, which also only allows a max. frame size of 352x288 and 15fps for example

the most important Advanced Simple Profile tools (not available in Simple Profile) are:

B-Frames/B-VOPS/Bi-directional encoding/prediction:
In contrary to I-Frames/Keyframes (which include the entire image and dont depend on other frames) or P-Frames (which include only the changed parts of the image from the previous I- or P-Frame), B-Frames are constructed using data from the previous and next I- or P-Frame. B-Frames can be compressed much more than other frame types, which overall should help quality and compressibility.

Quarter Pixel Motion Search Precision (QPEL):
basically most MPEG-4 codecs by default detect motion between two frames down to half a pixel (HalfPel)
Now with QuarterPel you can detect motion that is only a quarter of a pixel per frame, effectively doubling precision!
practically this means that you will get a much sharper image with QPEL, try it and you will love it (that's my opinion of course )

Global Motion Compensation (GMC):
GMC detects if there is an amount of motion big parts of the frame have in common. If thats the case GMC kicks in, using a single motion vector for all similar parts of the frame instead of multiple ones.
practically this helps saving bits when panning, zoom or rotation occurs (depending on how good the GMC implementation is/offered warppoints), bits which than can be used somewhere else, for example where they bring more sharpness.

MPEG/Custom Quantization:
While with MPEG-4 Simple Profile you can only use the h.263 quantization type, the ASP also allows you to use custom ones
While the h.263 type will bring you a softer image (good for 1CD encodes), the default MPEG matrix is better for higher bitrates, preserving more details
a popular custom matrix is for example hvs_good, also nice for lower bitrates, but there are also many more

Adaptive Quantization:
When encoding with a Variable Bitrate (eg in 2pass) each frame can get compressed with a different quant (the higher the quant the smaller the size/bitrate of the frame). What frame gets what quant (eg compress high motion more) is decided by the "Rate Control".
With Adaptive Quantisation (also available in Simple Profile) the quant can additionally also differ inside each frame (eg high motion/dark parts of the frame get a higher quant/compressed more, faces get a lower quant than background, aso...)


basically MPEG-4 ASP became popular with the famous DivX5 Codec, which name is also often used to describe content following ASP@L5 (like people name all sorts of Cola, even Pepsi, as "Coca-Cola"), but its important to realise that there also exist other MPEG-4 ASP codecs which are not more or less compatible to MPEG-4 as DivX5:

available MPEG-4 ASP Codecs

ASP codecs are available atm from XviD (binary), DivX5, DivX4/OpenDivX, ffmpeg/ffvfw/ffdshow, 3ivx, Nero Digital, Skal, Quicktime, mpegable, Envivio, Sorenson and many more...
doom9's quality comparisons: 1 2
(note that DivX3.11 aka MS MPEG-4, RV9, VP6 and WMV9 are not MPEG-4 compliant!)

XviD
maybe one of the most advanced MPEG-4 ASP codecs, highly tuned for DVD Backups and offering a very broad range of encoding tools (including more than 1 B-Frames, QPEL, GMC (3 warppoints), h.263/MPEG/Custom Quants, Adaptive Quants, Trellis and much more)
XviD is open source (GPL) and THE codec of the Doom9 community, where it also has its own XviD Forum, where the XviD developers are also often around (as i am sure you know already )
For more infos about XviD visit the official Homepage XviD.org, read crusty's FAQ and of course the XviD Forum on doom9

DivX5
maybe the most popular and most widely used MPEG-4 ASP Codec, mainly living from its name tough. It offers less MPEG-4 ASP features (up to 2 B-Frames, h.263/MPEG Quant, a weak GMC (1 warppoint), QPEL) and some people claim also less quality than XviD
still its THE codec in the business world and the codec which made MPEG-4 ASP popular
For more infos about DivX5 visit the official Homepage DivX.com and the DivX Forum on doom9

ffmpeg
ffmpeg (aka libavcodec/format) is surely THE implementation of MPEG-4 when it comes to completeness. ffmpeg is offering as good as all tools imaginable (eg error resilience) and is opensource (LGPL)
still when it comes to encoding it often stands in the shadows of XviD, but it provides good quality and is a very important implementation many other projects are heavily based on (for example the famous mplayer or ffdshow use it)
For more infos about ffmpeg visit the official Homepage ffmpeg.org and the New Codecs forum on doom9

3ivx
tough one of the oldest MPEG-4 codecs around (the devs claim even older than DivX5), 3ivx became popular in the last months. 3ivx' video codec offers h.263/MPEG Quants, Adaptive Quant., 4MV (but not B-Frames, GMC and QPEL) and was the first to set a PAR
3ivx does not only offer Video Encoding but is an allround implementation of the MPEG-4 Standard including also AAC encoding (FAAC) and maybe one of the best MP4 container tools available
For more infos about 3ivx visit the official Homepage 3ivx.com and the New Codecs/Containers forum on doom9 (where you can also find some of the devs sometimes)

Nero Digital
the MPEG-4 ASP codec from nero is maybe the youngest one, but nero is very ambitious in becoming very popular
atm their codec is only available inside Nero Recode2 (together with a good AAC encoders (HE-AAC, Multichannel...)). ND offers only 1 B-Frame, GMC (3 warppoints), QPEL, h.263/MPEG/Custom Quants, Adaptive Quant. (Psy High) and is one of the fastest codecs around
For more infos about NeroDigital visit the official Homepage NeroDigital.com and the New Codecs forum on doom9 (where you can also find some of the devs sometimes)


MPEG-4 ASP on Hardware - DivX/NeroDigital Certification / Private MPEG-4 Profiles

Some first generation hardware decoder chips werent able to handle important tools the ASP offers (ie QPEL and GMC). Today's chips are more powerful and support for example QPEL and 1 Warppoint GMC already (none supports 3WP GMC till now)
For being able to support also players, which uses even the oldest chip, DivXNetworks and Nero created something which can be called private MPEG-4 Profiles, namely the DXN Home Theater Profile (DXN HTP) and the ND Standard Profile (ND StP). Every player who is able as a minimum to handle the DXN HTP and ND StP (next to other stuff) can get a Certification from DivXNetworks and/or Nero
When encoding following the HTP/StP for example you cant use QPEL or GMC and use only 1 B-Frame. therefore basically the HTP/StP are a tradeoff between quality and usability with old hardware decoder chips
of course these private certifications also help DivXNetworks and Nero to establish their brand-names even more

still the correct expression for what we need a player to support is MPEG-4 ASP@L5, if a player is offering this you should be able to play your encodes following MPEG-4 ASP (no matter what encoder was used) without problems


further documentation

If you want to read more about MPEG-4 Video you can have a look at the page of MPEG Industry Forum, providing an overview of available Resources and Tutorials/Papers
The Specs for the Amendment1 to 14496-2 can be found here
Also important to mention is the Site of the Moving Picture Experts Group (MPEG), offering a FAQ especially about MPEG-4 Video or an overview of the MPEG-4 Standard (including many Infos on MPEG-4 Video too)
also if you simply search for "MPEG-4" on google you will find more than a lot of usefull sites too
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free

Last edited by bond; 19th June 2005 at 13:10.
bond is offline   Reply With Quote
Old 7th April 2004, 14:31   #3  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,779
If you have any suggestions, ideas which points should be added or found any broken links, feel free to post below!
I will do my best to keep the Information up-to-date

Please don't use this sticky to discuss any MPEG-4 issues, this thread is meant for info only!
If you have any questions plz search the forum, perhaps they have been answered already and only then start a new thread

thanks,
bond
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free
bond is offline   Reply With Quote
Old 13th September 2007, 04:09   #4  |  Link
publicENEMY
Registered User
 
Join Date: Mar 2007
Posts: 3
Quote:
Originally Posted by bond View Post
Quarter Pixel Motion Search Precision (QPEL):
basically most MPEG-4 codecs by default detect motion between two frames down to half a pixel (HalfPel)
Now with QuarterPel you can detect motion that is only a quarter of a pixel per frame, effectively doubling precision!
practically this means that you will get a much sharper image with QPEL, try it and you will love it (that's my opinion of course )
Hi bond.

The QPEL information you provided is a bit misleading/inaccurate. The purpose of QPEL is not to get sharper images. It is used to minimized residual energy during motion compensation process.

Do check back. Doom9 forum is THE DEFINITIVE source for video coding. We dont want any inaccurate information do we?

Anyway, very good effort on providing the community great informations.

Thanks.
publicENEMY is offline   Reply With Quote
Old 13th September 2007, 18:44   #5  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,779
publicENEMY, thanks for your feedback! actually i tried to write a sticky that is understandable for newbies and provides info that is useable in practice (thats why i wrote "practically..."). i fear your sentence doesnt reach that (and from my point of view qpel indeed helps sharpness "in practice" )
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free
bond is offline   Reply With Quote
Old 14th September 2007, 08:45   #6  |  Link
Stux
Registered User
 
Stux's Avatar
 
Join Date: Dec 2002
Location: Sydney, Australia
Posts: 252
I'm of the opinion that bond and publicEnemy's definitions are both correct.

The purpose of almost everything in a video codec is generally to minimize residual energy.

So that is the purpose of qpel too, but qpel does that by allowing quarter pixel motion to be represented. The idea being that if you represent the motion more accurately, then the error will be minimized.

This does work, and can even result in sharper images.

But there are two problems

1) The motion vectors generally double in size as the enhanced precision means that you need enhanced precision motion vectors! And that can often lead to a loss in overall coding efficiency

2) With DCT based codecs the increased motion estimation accuracy means the DCT noise which varies between different DCT implementations becomes a significant part of the compensation. This results in qpel based artifacts like waterfalls/blurring on image decoding when using different "compliant" dcts.

the DCT problem is not a problem with standards which fully specify the image transform (like h264)
__________________
http://www.3ivx.com
Stux is offline   Reply With Quote
Old 16th September 2007, 07:43   #7  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,690
Quote:
Originally Posted by Stux View Post
1) The motion vectors generally double in size as the enhanced precision means that you need enhanced precision motion vectors! And that can often lead to a loss in overall coding efficiency
Double in size?

Going from hpel to qpel is one single bit of motion vector for each direction, X and Y.

So, for example, lets say we have a motion vector (6.5,8.5). This takes a total of 10 bits (ignoring entropy encoding, etc). The qpel version might be (6.5, 8.75). This would be 11 bits.
Dark Shikari is offline   Reply With Quote
Old 16th September 2007, 08:28   #8  |  Link
Sergey A. Sablin
Registered User
 
Join Date: Dec 2004
Location: Tomsk, Russia
Posts: 366
Quote:
Originally Posted by Dark Shikari View Post
Double in size?

Going from hpel to qpel is one single bit of motion vector for each direction, X and Y.
well, probably that what Stux meant - one bit actually doubles motion vector value

Quote:
Originally Posted by Dark Shikari View Post
So, for example, lets say we have a motion vector (6.5,8.5). This takes a total of 10 bits (ignoring entropy encoding, etc). The qpel version might be (6.5, 8.75). This would be 11 bits.
9 (4+5) and 11 (5+6), of course ignoring entropy coding. then it's actually depends on entropy coding. Basically it all depends on the motion vector difference distribution (mind motion vector prediction) - for example if most of the motion vectors differences in the picture is +/-0.5 comparing to +/-0.75, then it is twice the source bits and twice entropy coded bits for VLC in general. (probably not the most real life example though anyway...)
Sergey A. Sablin is offline   Reply With Quote
Old 16th September 2007, 08:35   #9  |  Link
akupenguin
x264 developer
 
akupenguin's Avatar
 
Join Date: Sep 2004
Posts: 2,393
Random real life sample, with entropy coding: averaged 6 bits per non-zero mv component in hpel, 7 bits in qpel.

Quote:
Originally Posted by Stux View Post
2) With DCT based codecs the increased motion estimation accuracy means the DCT noise which varies between different DCT implementations becomes a significant part of the compensation. This results in qpel based artifacts like waterfalls/blurring on image decoding when using different "compliant" dcts.
Increased motion precision should reduce the number of nonzero dct coefficients, which should reduce the error from idct mismatch. (The same reason quant2 may look better than quant1 when decoded with the wrong idct.)
Otoh, what might exacerbate idct mismatch is that qpel uses an 8tap sharpening filter (and thus sharpens/spreads the error in addition to the content) while hpel is bilinear. But that's just mpeg4's specific versions of qpel and hpel; there's no reason you couldn't have a bilinear qpel or a 8tap hpel in some other format.

Last edited by akupenguin; 16th September 2007 at 08:56.
akupenguin is offline   Reply With Quote
Old 15th September 2016, 14:05   #10  |  Link
Carolcausey10
Registered User
 
Join Date: Aug 2016
Location: Sydney
Posts: 2
Quote:
Originally Posted by Stux View Post
the DCT problem is not a problem with standards which fully specify the image transform (like h264)
So, does this meant that this problem would be there in some other formats as well or does this relate to MPEG only?
Carolcausey10 is offline   Reply With Quote
Old 15th September 2016, 18:21   #11  |  Link
SeeMoreDigital
Life looks better in UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 11,290
Carolcausey10,

Are you aware that Stux's post was submitted nine years ago?!
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 21st September 2016, 12:35   #12  |  Link
Carolcausey10
Registered User
 
Join Date: Aug 2016
Location: Sydney
Posts: 2
No, and I wonder what I was thinking at that time I feel I was searching through the forum and reading about compression format when I came across the post and just replied... but will take care moving ahead...
Carolcausey10 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 17:21.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.