Restoration tips: Andrea’s Corollary to the Kush Gauge™

prologue: DON’T (always) TRUST COMPANIES!

Following many HDTV and internet broadcaster advices, a “studio quality” transmission for an H.264 1080p transmission could be achieved with a bitrate of a mere 6mbps; if we use the Kush Gauge formula, we can see that this is true only if the motion factor is lower than medium… for 16/9 sport material at 29.97fps, for example, a 17.4mbps bitrate is needed!

 

ANDREA’S COROLLARY TO THE KUSH GAUGE

To calculate video bitrate for a codec different from H.264, the Kush Gauge costant value should be changed accordingly to the codec used.

Other lossy video codecs (apart H.264/MPEG-4 part 10, or AVC)

Even if AVC is widely used, also thanks to the x.264 open source encoder, there are many other codecs still in use nowadays; the main ones are:

  • MPEG-2 – used in many DTV and HDTV broadcasting, in DVD and sometimes in BD
  • VC-1 – used sometimes in BD; once used in HD-DVD
  • H.265, or HEVC – new codec, used in particular for 4K/UHD

There are also many other ones – H.263 (divx/xvid), MPEG-1 (VCD), WMV9 – that are slowly replaced by newer (or better) ones.

So, let’s focus on the main three alternative codecs to AVC.

VC-1

Quality is really similar to AVC; but it has some technical features missing or worst than AVC; the constant will therefore be set at 0.075 – sligthly worse than AVC.

HEVC

New codec, still in development; few serious comparisons were made, and it seems that bitrate gain could vary from 35% to over 70%; based on past studies, it could be difficult to believe that; if an AVC encoded video had a bitrate factor of 100, HEVC could achieve the same video quality at 30… so, to be fair, I’ll put it at 60 – 40% gain – so the constant will be set for the moment at 0.0482; this is obviously a value that will change in time, whenever more deep comparisons will be conducted, and newer encoders will be developed. EDIT 2019-05-11: value changed taking in account the best HEVC encoder efficiency (x265) on average Vs the best AVC encoder (x264); data found here: http://www.compression.ru/video/codec_comparison/hevc_2018/#hq_report

MPEG-2

This is the most known and valid alternative to AVC; widely used aroud the globe thanks mostly to DVD and DVB, it will be used for many years to come.

And it’s the most difficult to rate in comparison to AVC… According to many, AVC have the same quality of MPEG-2 at half the bitrate; so, if MPEG-2 bitrate factor is 100, AVC should be 50 – setting the constant at 0.14.

Is it true? Well, probably in many cases it could be, but there are so many variables that plays against or in favour of this, that a simple, unique value is difficult to set at the moment.

Comparison papers state that average AVC bitrate gain is around 55.4%; this value is mainly calculated using PSNR as main video quality valutation. But it’s known now that modern video codecs (including MPEG-2) rely on the fact that human vision could be “tricked” more easily than measurement; therefore, this value should not be taken as an absolute truth; infact, following tests results that used SSIM, when MPEG-2 and AVC have the same subjective quality, AVC gain is lower.

Some HDTV stations claims that their MPEG-2 1080i broadcasting have a perfect quality at 6/8mpbs; obviously it’s not true; even if in some cases this bitrate is more than enough – news, weather reports, soap operas, studio transmissions – it is not the case for movies, or worst for sport!

In their defense, there were great improvements in the latest year in MPEG-2 encoders, gaining more than 30% in bitrate Vs. the first encoders; plus, some technique “borrowed” from the H.264 format helped to achieve extraordinary results – in comparison to old MPEG-2 encoders, of course.

Speaking about software encoders, these is not always true; despite the fact that there were improvements, they were not so outstanding as hardware encoders of broadcast level…

So, at the end, I think it’s fair to set the constant for MPEG-2 at 0.136 – considering AVC bitrate gain between 40 and 55%: this constant could be lowered to 0.116 – setting the AVC gain at 40% – only for evaluating existing encoded material that was produced with industry level hardware encoders, like DVD, BD or HDTV material, as it’s a matter of fact that those kind of encoders work better than available software ones that we could use at home.

FINAL NOTES:

As the Kush Gauge is a “rule of thumb” and not a law, of course also these constants are approximate; nevertheless, this rule should be used with the most part of video sources, but must still be used with a grain of salt!

 

ANDREA’S COROLLARY TO THE KUSH GAUGE™

To calculate video bitrate for a codec different from H.264, the Kush Gauge costant value should be changed accordingly to the codec used.

To obtain a good quality video:

width x height x FPS x motion rank x

  • 0.0482 for HEVC
  • 0.075 for VC-1
  • 0.136 for MPEG-2

= final bitrate in bps

or higher should be used* to obtain a good quality result.

exception: a source material, made using industry standard MPEG-2 hardware decoder, must have a bitrate* higher than

width x height x FPS x motion rank x 0.116

to be considered of good quality.

*CBR or VBR average bitrate


ADDENDUM (2016-11-09):

Chroma subsampling and bit depth: the Kush Gauge takes in account the 4:2:0 and 8 bit, but it could be possible to use the formula even with others, so I updated it accordingly, using the following data:

Chroma Subsampling 4:2:0 = 1 4:2:2 = 1.333… 4:4:4 = 2.666…
Bit Depth 8 bit = 1 10 bit =1.25 12 bit = 1.5

Also, do remember to use the effective width or height, following the aspect ratio of display and source.

updated Kush Gauge formula:

width x height x FPS x motion rank x codec constant x chroma subsampling x bit depth = optimal bitrate (bits per second)

Example: 1920×1080 2.20:1 source = 1920×872, motion rank high, codec x265, 24 frames per second, 4:2:2 10bit

1920 x 872 x 24 x 4 x 0.045 x 1.3333 x 1.25 = 12054226 = ~12mbps


ADDENDUM (2019-01-14):

Further lossy video codecs

Some other codecs are added to the previous list:

MPEG-1

One of the first important and well known video codec, that started the digital video revolution with its use in the VCD standard. Not used anymore (as far as I know), still could be useful in certain cases.

According to the “Future Performance of Video Codecs” paper, leap gain of MPEG-2 was not that great, around 2-5%; hence, I decided to set the costant for MPEG-1 at 0.143.

MPEG-4 part 2 (divx/xvid)

Mainly used to compress further other compressed video sources, it is almost never used anymore, supplanted by the more efficient AVC codec; yet, it could be useful to evaluate the quality of old files.

Always according to the “Future Performance of Video Codecs” paper, leap gain towards MPEG-2 was 20-40% for h.263, and further 8-10% of the MPEG-4 part 2 towards h.263. As AVC leap gain towards the latter was around 10-30%, I think that a safe costant for the MPEG-4 part 2 (used to compress video with the divx and xvid codecs) should be set at 0.09.

Progressive / Interlaced

As interlaced material takes more bitrate, I added this new variable, that multiply x 1.2 interlaced video (and of course progressive will be x 1.0).

Grain

Also grain implies higher bitrate; difficult to calculate this – it depends from many factors – but I think multiply x 1.5 video with grain is a right decision (and of course no grain will be x 1.0).

updated Kush Gauge formula:

width x height x FPS x motion rank x codec constant x chroma subsampling x bit depth x grain x progressive = optimal bitrate (bits per second)

Example: 1920×1080 2.20:1 source = 1920×872, motion rank high, codec x265, 24 frames per second, 4:2:2 10bit, grain, interlaced

1920 x 872 x 24 x 4 x 0.045 x 1.3333 x 1.25 x 1.5 x 1.2 = 21697606,8 = ~21.7mbps


CHECKING QUALITY OF A GIVEN VIDEO MPEG-2 ENCODED SOURCE:

HD-NET is known to have a fairly good quality; let’s take “Escape from New York”: its actual resolution is 1920×804, FPS is 29.97fps and motion factor could be set at 2; it is interlaced, and grain is not so apparent, so:

1920 x 804 x 29.97 x 2 x 0.116 x 1.2 x 1.0 = 112879921 = ~11.29mbps

or, according to higher constant value,

1920 x 804 x 29.97 x 2 x 0.136 x 1.2 x 1.0 = 15100598 = ~15.1mbps

as its bitrate is 17.2mbps, its quality could be considered very good!

***

Also WOWOW, a japanese HDTV station, has a good quality; “Indiana Jones and the Temple of Doom” has an actual resolution of 1920×816, FPS is 23.976fps and motion factor could be set at 2; grain is present, so:

1920 x 816 x 23.976 x 2 x 0.116 x 1.0 x 1.5 = 13072159, = ~13mbps

or, according to higher constant value,

1920 x 816 x 23.976 x 2 x 0.136 x 1.0 x 1.5 = 15325980 = ~15.32mbps

as its bitrate is 19.9mbps, its quality could be considered really high!

***

“Matrix Reloaded” is a movie full of action; so a motion factor of 4 is considered – even if probably a 3 should be quite good; interlaced, no grain.

NTSC DVD:

720 x 480 x 29.97 x 4 x 0.136 x 1.2 x 1.0 = 6761461 = ~6.76mbps

average bitrate is 6.34mbps, so its quality is a bit lower than needed.

PAL DVD:

720 x 576 x 25 x 4 x 0.136 x 1.2 x 1.0 = 6768230 = ~6.76mbps

average bitrate is 6.5mbps, so its quality is slightly better than the NTSC DVD, yet still a bit lower than needed.

Comments, improvements, corrections are welcome!


References:

PDF documents

The Kush Gauge – H.264 FOR THE REST OF US (page 21)

SUBJECTIVE QUALITY ASSESSMENT OF THE EMERGING AVC/H.264 VIDEO CODING STANDARD

EBU Technical Report 008 – HDTV Contribution Codecs

Using AVC/H.264 and H.265 expertise to boost MPEG-2 efficiency

BBC Guidelines – Technical and Delivery Standards for Worldwide

Comparison of the Coding Efficiency of Video Coding Standards

Future Performance of Video Codecs

Leave a Reply

Your email will not be published. Name and Email fields are required.

AlphaOmega Captcha Cinematica  –  What Film Do You See?