Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
H.264 VS JPEG and PNG
Author Message
ZiNgA BuRgA
Smart Alternative

Posts: 17,022.2988
Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.1274
Offline
Post: #1
H.264 VS JPEG and PNG
It seems that there haven't been too many (at least known) new image formats over the past few years.
JPEG and PNG are now the image formats predominantly used over the internet (I hope GIF will die, due to it's 256 colour limitations and other patent controversy; it's animation feature is probably the only thing which keeps it alive).

H.264/AVC is currently one of the best video compression codecs currently available, and wasn't established more than a few years ago.

So, which format can compress an image better?
Note that JPEG uses lossy compression - ie, image quality degrades when saving to JPEG.  PNG, on the other hand, is lossless (and also offers an alpha channel; but since alpha is irrelevant in videos, wee will ignore it).

Being bored, I decided to test this.  If you aren't as bored as I am, you should probably look away XD


About H.264: I'm using a raw H.264 stream (.264 file, no container used).  Also, I'm just converting a single frame "video".  Note, for the following pictures, I suspect the H.264 video looking slightly darker due to some DIB » YV12 conversion, or perhaps some dodgey video filter.

Anyway, I used the following image:
[Image: abstractpsphj7.png]

Lossy Compression
JPEG (quality level: 70) - 10,699 bytes
[Image: abstractpsp70lv0.jpg]

JPEG (quality level: 80) - 13,470 bytes
[Image: abstractpsp80mh6.jpg]

JPEG (quality level: 100) - 58,341 bytes
[Image: abstractpsp100ao1.jpg]

H.264 (quantizer level: 30) - 8,003 bytes
[Image: abstractpsp30jl3.png]

H.264 (quantizer level: 26) - 11,305 bytes
[Image: abstractpsp26dn8.png]

H.264 (quantizer level: 20) - 17,898 bytes
[Image: abstractpsp20qs9.png]

H.264 (quantizer level: 10) - 37,922 bytes
[Image: abstractpsp10cm7.png]

Lossless Compression
PNG (compression level 9) - 100,375 bytes
[Image: abstractpsphj7.png]

H.264 (quantizer level 0) - 54,460 bytes
[Image: abstractpsp0jq6.png]

7-Zipped BMP (using LZMA Ultra compression) - 111,334 bytes
[Image: abstractpsphj7.png]




Well, surprising results?  I found it surprising too - H.264 does so well against common compressed image formats.
Since I've tested only one image, I can't exactly conclude anything (too lazy to test different types of images), but this is an interesting indication.

So what?  Nothing really - it's unlikely that H.264 will become an image format.  Though it would be nice to have something similar replace outdated animated GIFs...
28/10/2007 03:07 AM
Visit this user's website Find all posts by this user Quote this message in a reply
squee666
Grand Warlock

Posts: 3,567.1000
Threads: 351
Joined: 4th May 2007
Reputation: 12.17831
E-Pigs: 555.9025
Offline
Post: #2
RE: H.264 VS JPEG and PNG
yeh to bad it more likely won't happen and poor tiff

[Image: IuZelj2.png]
Spoiler for anime watched:
[Image: squee666.jpg]
28/10/2007 03:25 AM
Find all posts by this user Quote this message in a reply
Wolf
Frolicking towards Zinga

Posts: 2,411.1780
Threads: 277
Joined: 4th May 2007
Reputation: -2.56923
E-Pigs: 51.9285
Offline
Post: #3
RE: H.264 VS JPEG and PNG
you had time for this? 0_o


JPEG is always for me.


[Image: 5mmh08.png]
WolfLand, PSP ISO's and Full downloads! Visit now.
Spoiler for Houses Burned Down - UPDATED:
- diego (Your dog was inside your Tibet residence...win)
- metalgear (That ranch you had in Santa Monica...poof)
- Games like a Grrl (Soon...very soon)
- Senseiseito Sakura (Got your house in the Hamptons...BURN!)
- MehHakker (I hope you didn't leave anyone in your house in Africa)
28/10/2007 04:15 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Assassinator
...

Posts: 6,646.6190
Threads: 176
Joined: 24th Apr 2007
Reputation: 8.53695
E-Pigs: 140.8363
Offline
Post: #4
RE: H.264 VS JPEG and PNG
It seems H.264's spacial compression capabilities are quite good. (meh, it's temporal would be good too)
28/10/2007 06:01 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

 Quick Theme: