POV-Ray : Newsgroups : povray.animations : Most ambitious ever! : Re: Most ambitious ever! Server Time
6 Oct 2024 08:42:49 EDT (-0400)
  Re: Most ambitious ever!  
From: Thorsten Froehlich
Date: 27 Sep 2003 05:13:00
Message: <3f75549c@news.povray.org>
In article <3f731503@news.povray.org> , Warp <war### [at] tagpovrayorg>  wrote:

>  I see.
>   I have to admit I don't know too much about MPEG-2 and how it differs
> from MPEG-1.

Every MPEG-2 decoder is also a fully functional MPEG-1 decoder.

>   However, from my experience I can say that MPEG-4 differs from MPEG-1
> by an enormous amount. Some important differences I know of:
>
>   - In MPEG-1 the types of frames are fixed to a certain pattern
>     (eg. IBBBPBBBPBBB) regardless of the movie contents. In MPEG-4
>     keyframes can be located anywhere (and are usually located at
>     places where they are most needed, ie. where the image changes
>     a lot).
>
>   - In MPEG-1 the image is divided into fixed-sizes squares which are
>     compressed in a similar way as JPEG. In MPEG-4 the image is divided
>     into completely free-shaped parts.

Which doesn't mean it isn't turned into squares again.  Almost every
compression based on the DCT uses the 8*8 DCT (the DV standard allows a
special variation of the 8*8 DCT to produce better results with interlaced
input data).  This common DCT size is also why transcoding, especially from
DV to MPEG-2 (and back) is so fast.  The DCT step can be completely skipped.

>   - The MPEG-1 format supports only a very limited amount of frame rates
>     (I really don't understand why). In MPEG-4 it's completely free.
>
>   - AFAIK the quality of MPEG-1 is highly dependant on the resolution
>     of the video. That is, a larger resolution needs a larger bitrate
>     to preserve the same image quality.

The codec algorithms simply don't depend on the frame dimensions, thus one
can of course mess around with this, but if the codec at the same time
restricts the MEPG-1 bitrate, you of course the low quality results.

One interesting side-note here should be how both MPEG-2 as well as DV (you
know the format you find on all digital video cameras as of last year, Sony
is now pushing I-frame only MPEG-2 to sell new gear, the least in the
semiprofessional product range above about US$2K) handle the aspect ratio.

If you buy a "widescreen" DVD, you don't somehow get more data, all you get
is a differently scaled image.  On a DVD the frame resolution is always the
MEPG-2 main profile, which is 720*480 for NTSC and 720*576 for PAL.  To make
a 16:9 aspect ratio out of this, the frames are simply scaled.  Due to the
"interpolation"-like nature of the DCT one doesn't notice.  Much like one
doesn't notice a VHS tape only can store about 240 pixels horizantal
resolution (the thing you find as "240 lines" or something similar in your
VCRs datasheet).

Anyway, knowing that the resolution is only 720*480 for NTSC and 720*576 for
PAL is important when making a backup copy of a DVD as for optimal results
one wants to use ie.e 240 for NTSC or 288 for PAL, especially when making
the backup copy with MPEG-4.

> In MPEG-4, however, image
>     resolution is irrelevant: Video resolution doesn't matter, you
>     can always compress to the same bitrate and get about the same
>     image quality. In fact, if you use a larger resolution, the image
>     quality will increase, not decrease, at the same bitrate (this is
>     from empirical experience; I don't have any technical proof of this).

The main benefit of MPEG-2 and MPEG-4 is that they offer good support for
varioable bitrate encoding.  How effective the variable bitrate encoding is
can be seen whenever you have a film with a long flight over a diverse
ground, i.e. a city or diverse landscape.  These scenes also make a great
test case for codec capabilities.

>   - A 200 Megs MPEG-1 will compress to something like 50 Megs MPEG-4
>     with no important decrease in image quality. (Again, by empirical
>     experience.)

Notice that this also to a major part depends on the MPEG-1 codec you use.
There are really *serious* differences between MPEG codecs (regardless if
this is MPEG 1, 2, 4 etc, also ture for i.e. JPEG and DV).  All these
compression standards have one thing in common: They do *not* define the
details of the algorithms to be used.  They only define a format of the
encoded data and how to interpret it.  That is why a simply software MEPG-2
relatime encoder will probably produce low quality, high bitrate video while
an advanced, hardware accelerated reatime encoder will produce a muss lower
bitrate and a much higher quality.  At the same resolution!  On the other
hand, a "slow" multipass software encoder can usually produce significantly
better results but taking a lot more time (than realtime).

>     In the same way, if you try to make an MPEG-1 with the same file size
>     as the MPEG-4, the image (and sound) quality will be highly degraded.

Of course.  For good summary about all this, also try
<http://bmrc.berkeley.edu/research/mpeg/faq/mpeg2-v38/faq_v38.html#tag54>

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.