Tuesday, January 27, 2009

H.264 vs MJPEG2000 vs MJPEG

Here's an interesting article:

It's interesting because it claims that MJPEG is better than H.264. This is a strange claim. If you want to do Intra-only coding (i.e. no motion compensation), you can use H.264 in Intra mode. Detlev Marpe demonstrated that H.264 in Intra mode has similar performance to Motion JPEG2000:
http://www.f4.fhtw-berlin.de/~barthel/paper/spie03_marpe_et_al.pdf

Note that Marpe includes actual results, unlike the article above. So, even in Intra mode, H.264 will significantly out-perform the older MJPEG standard. Using Intra and Inter coding (i.e. adding motion compensation) will increase the performance dramatically, even if there is a lot of camera movement and detail in the scene.

If in doubt about competing claims, ask for rate-distortion results and independent subjective test results. For example, see this site for some third-party codec comparisons:
http://compression.ru/video/codec_comparison/mpeg-4_avc_h264_2007_en.html

Or send me an email - I will try and answer it and give you an impartial opinion.

- Iain.

Tuesday, January 20, 2009

Analyzing H.264 clips

I have put two examples of H.264 coded sequences on the downloads page. Both are short segments of the "Foreman" CIF video sequence, coded using the Baseline and Main profiles of H.264.

Use a viewer such as Elecard's Streameye to analyze the clips:

http://www.elecard.com/products/products-pc/professional/streameye/
(you can download a time-limited trial version).

Here's an screenshot of the Main Profile clip. You can see the P-slices (blue bars) and B-slices (green bars). Use the Streameye menus to examine frames, look at the distribution of macroblock types, motion vectors, etc.

What does the "H" in H.264 stand for?

I was asked this question today and I think it's a really good question: what does the "H" stand for in H.264 ?

H.264 is an ITU standard or "Recommendation". ITU Recommendations are
assigned letters and numbers; so everything that starts with H. is in
a similar area (audiovisual/multimedia) :
http://www.itu.int/rec/T-REC-h

Other groups of standards start with different letters, always a
letter and a number. E.g. P.910 is a standard for subjective quality measurement.

ISO/IEC standards have numbers, so MPEG-2 Video is ISO/IEC 13818-2. "MPEG" is a standardisation group within ISO/IEC.

H.264 is co-published with ISO/IEC MPEG so it also has an MPEG number. Confusingly,
it's given the same basic number as MPEG-4:

  • MPEG-4 Visual (older standard) is ISO/IEC 14496-2 ("MPEG-4 Part 2")
  • H.264/Advanced Video Coding is co-published as ISO/IEC 14496-10 ("MPEG-4 Part 10")

A list of a few current standards:
http://www.citeulike.org/user/xistenshal/tag/standard

Finally, a note about the publication date of standards. The ISO/IEC or ITU website lists the date of the most recent published version of a standard. However, this can be confusing. For example, ITU-T H.263 was first published in 1995, but the most recent updated version was published in 2005 (after the first publication of H.264). Generally, updated versions will correct errors in the text and (in some cases) add extensions. For a realistic timeline of standards development, look at the original publication date. In chronological order of original publication date:
  • H.261
  • MPEG-1
  • MPEG-2 / H.262 (co-published)
  • H.263
  • MPEG-4 Visual
  • H.264 / MPEG-4 Part 10 (co-published)
  • VC-1

Thursday, January 8, 2009

New tutorial on transform and quantization

New white paper / tutorial posted on the derivation of the 4x4 forward + inverse transforms. Comments welcome. - Iain.