Page 4 of 4 FirstFirst ... 234
Results 31 to 40 of 40

Thread: Mozjpeg 2.0 Improves JPEG Encoding

  1. #31
    Join Date
    Feb 2009
    Posts
    165

    Default

    Quote Originally Posted by tpruzina View Post
    ... (human eye detects changes in color shade much easier than one bright pixel in dark picture)...
    It's actually the other way around. The eye is much more sensible to changes in brightness than in color. This is the reason why the chroma components are often subsampled (to reduce bandwidth without losing much detail).

    Quote Originally Posted by CrystalGamma View Post
    Because AFAIK it is often done by the GPU (depends on the architecture of course).
    I never saw an implementation that did decode on the JPEG on the GPU. Not saying it's impossible, but considering the advantages vs disadvantages I doubt anyone would implement that other than for educational purposes.

    JPEG encoding/decoding is faster than PNG because the algorithm is just less expensive in computational resources.

    Quote Originally Posted by CrystalGamma View Post
    Also the bigger size of PNG naturally leads to longer decoding time ...
    Certainly plays a role, however it's irrelevant.

    Quote Originally Posted by CrystalGamma View Post
    Why are we even discussing this? These two format have completely different purposes.
    Because someone asked why is JPEG more prominently used over PNG and why not use PNG for everything

  2. #32
    Join Date
    Oct 2013
    Location
    Canada
    Posts
    469

    Default

    Quote Originally Posted by CrystalGamma View Post
    It is not similar. JPEG uses a Discrete Cosine Transform to decorrelate the pixels, while PNG uses pixel predictors.
    Therefore, if someone was to write a specifically lossy encoder to PNG (whyever one would do that), it would be a more efficient compression than JPEG->PNG.
    It would remain to be seen if it is more efficient than storing it as JPEG in the first place.

    Meanwhile we could start using more efficient lossy formats for cases where the lossy model is preferable, like WebP or, if - hopefully - it takes off, a Daala-based still image format.
    I'm going to jump in here. Daala, like Opus is aiming at being an all encompassing codec, and JPEG is actually first in their 'to beat' list.

  3. #33
    Join Date
    Apr 2013
    Posts
    42

    Angry

    What is the friggen point, PNG is lossless with very good compression already, JPEG is (very very very) lossy with just a little bit higher compression than PNG.

    And those of you arguing that JPEG is the best format for compressing images, you're just dead wrong, as "lossless" implies, quality degradation for PNG is 0% whereas for JPEG it is something much higher (My eyes would estimate 20-50% depending on the image)

    The quality difference is very noticable on any sort of image with PNG always with superior quality.

    It's essentially the same as MP3 vs FLAC, except the size differences between PNG and JPEG are much less than between MP3 and FLAC, however the quality difference between PNG and JPEG is significantly more easily noticable than between MP3 and FLAC.

    If Mozilla wanted a cookie, they should be working to increase the resulting quality of JPEG compressed images or increasing the compression rate of PNG compressed images, that would be something to praise them for. This is worthless. With multiple gigabytes of free space on the vast majority of storage devices in modern devices (from smartphones and cameras to desktops) JPEG is not worth it anymore and should be marked obsolete

    What makes me sad in relation to this is the stunning amount of digital artists who do not seem to realize this and upload their artworks in jpeg format on the net instead of the lossless png format. PNG only seems to be used when people want the transparency from it, which is not even it's most remarkable feature (but certainly a step over jpeg)
    Last edited by rabcor; 07-18-2014 at 01:34 PM.

  4. #34
    Join Date
    Sep 2012
    Posts
    792

    Default

    Quote Originally Posted by rabcor View Post
    What is the friggen point, PNG is lossless with very good compression already, JPEG is (very very very) lossy with just a little bit higher compression than PNG.

    And those of you arguing that JPEG is the best format for compressing images, you're just dead wrong, as "lossless" implies, quality degradation for PNG is 0% whereas for JPEG it is something much higher (My eyes would estimate 20-50% depending on the image)
    You do know that there is a "quality" parameter in the jpeg format right?

  5. #35
    Join Date
    Jul 2013
    Posts
    22

    Default

    Quote Originally Posted by rabcor View Post
    What is the friggen point, PNG is lossless with very good compression already, JPEG is (very very very) lossy with just a little bit higher compression than PNG.

    And those of you arguing that JPEG is the best format for compressing images, you're just dead wrong, as "lossless" implies, quality degradation for PNG is 0% whereas for JPEG it is something much higher (My eyes would estimate 20-50% depending on the image)
    This is ridiculous - JPEG (currently) is the best format (quality/size/compatibility/price) for photos used on the web (and for everyday photo shoots) and there are a lots and lots of photos used all over the web. Providing a better compression is thus very important and especially when the way how is already known - they just added the techniques that are used in video coding for years but currently no free JPEG compressor used them. They can't use anything currently known to reduce the size of PNG images. Google provided zopfli which is better in some cases but with a drastically increased compression time however I doubt you can go anywhere further than that.

    Quote Originally Posted by rabcor View Post
    If Mozilla wanted a cookie, they should be working to increase the resulting quality of JPEG compressed images or increasing the compression rate of PNG compressed images, that would be something to praise them for. This is worthless. With multiple gigabytes of free space on the vast majority of storage devices in modern devices (from smartphones and cameras to desktops) JPEG is not worth it anymore and should be marked obsolete
    As I already said they are working on increasing the quality and why increasing the compression rate of PNG can't be done (unless if you make PNG lossy). Also bandwidth is not cheap! Smartphones multi gigabyte storage is not so big as you promote and there is also the question of decoding speed where PNG is in disadvantage compared to JPEG + bigger size more (storage) bandwidth you require at loading. Cameras use its own raw format for anyone who wants this and it is far better than PNG. Another aspect is also that with bigger images you require more SD card bandwidth in continuous shooting and/or you deplete the camera memory faster.

    Quote Originally Posted by rabcor View Post
    It's essentially the same as MP3 vs FLAC, except the size differences between PNG and JPEG are much less than between MP3 and FLAC, however the quality difference between PNG and JPEG is significantly more easily noticable than between MP3 and FLAC.
    I really wondered about this so I did a experiment to see.I used one of my photos that I converted from raw to 8bit BMP:

    original BMP - 48314502 B (46 MiB) [4916*3276*3 = 48314448 B + header]
    PNG @ 9 - 25089229 B (~23.9 MiB) - compressed to 51.9 %
    PNGcrush - 24791373 B (~23.6 MiB) - compressed to 51.3 %
    JPEG @ 90q 4:4:4 - 4670718 B (~4.4 MiB) - compressed to 9.6 %
    JPEG @ 80q 4:4:4 - 3001440 B (~2.8 MiB) - compressed to 6.2 %
    JPEG @ 90q 4:2:0 - 3453199 B (~3.3 MiB) - compressed to 7.1 %
    JPEG @ 80q 4:2:0 - 2254630 B (~2.1 MiB) - compressed to 4.6 %

    Typical FLAC compression is about 50-60%, typical MP3 compression 1/11 = 9% - so the numbers for PNG vs. JPEG are very similar.

    (With arithmetic coding the ratio goes down for ~0.3% without any additional loss, but arithmetic isn't enabled in a lot of decoders)

    JPEG compression was done with a typical libjpeg-turbo that you find in most linux deistros and with a typical 90 and 80 quality setting, with and without chroma down-sampling. I was not even trying to push it lower than. When comparing with the original there was no apparent visual difference - only at zoom you could see the changes in the red areas (which is expected as chroma down-sample is visible the most on red areas) but still nothing that you could point to unless you were comparing it with the original.

    I also tried mozjpeg 2.0.1 but there was just marginal size and practically no visual difference between 80q & 90q 4:2:0 samples. Probably mozjpeg would show its strength with lower quality settings.

    This is only about photos as JPEG is used mostly for that. Compared to other less color rich graphics then PNG has the (quality and size) advantage and on the web PNG is mostly used for such graphics (all the other stuff were you can't use SVG for).

  6. #36
    Join Date
    Sep 2012
    Posts
    369

    Default

    Quote Originally Posted by quikee View Post
    Typical FLAC compression is about 50-60%, typical MP3 compression 1/11 = 9% - so the numbers for PNG vs. JPEG are very similar.
    320 kbit is 23%. 320 kbit is necessary for decent hardware and many music genres.

  7. #37
    Join Date
    Mar 2013
    Location
    Hungary
    Posts
    190

    Default

    Quote Originally Posted by JS987 View Post
    320 kbit is 23%. 320 kbit is necessary for decent hardware and many music genres.
    Sounds like a testable claim, so where are the tests that prove people can hear the difference? Your magic ears do not count.

  8. #38
    Join Date
    Jan 2013
    Posts
    157

    Default

    Quote Originally Posted by mdias View Post
    I never saw an implementation that did decode on the JPEG on the GPU. Not saying it's impossible, but considering the advantages vs disadvantages I doubt anyone would implement that other than for educational purposes.
    Actually, it's become the norm with the latest software. GPU-accelerated decoding of images has been around for ages in Windows under the general term of "hardware acceleration". There are ASICs - media processors - that have been used in media boxes, tablets/phones, DVD players, and other electronics to accelerate JPEG decoding on embedded Linux platforms, so that host CPUs can be free for other uses. Once better OpenCL support hits on Linux, you'll see more use of the GPU along the lines of what Windows has had for some time.

  9. #39
    Join Date
    Sep 2013
    Posts
    125

    Default

    Quote Originally Posted by psychoticmeow View Post
    Sounds like a testable claim, so where are the tests that prove people can hear the difference? Your magic ears do not count.
    And how do you propose to objectively test what people can and/or cannot hear? You'll find plenty of tests agreeing with him around the interwebs, but I guess you can simply dismiss every single one of them as a case of magic ears as well.

    Then again, mp3 is all but obsolete now that there are several superior audio codecs around, and every relatively modern device supports at least one of them. Not that jpeg isn't old as well, but as a codec it has aged much better.

  10. #40
    Join Date
    Oct 2013
    Location
    Canada
    Posts
    469

    Default

    Quote Originally Posted by psychoticmeow View Post
    Sounds like a testable claim, so where are the tests that prove people can hear the difference? Your magic ears do not count.
    I find that if you listen to it with an amp, or at least with enough volume, those extra bits really make a difference because in every song that's at 192 usually has some odd sound somewhere.

    Now that being said, I'd say, just go with a lower bitrate than that with Opus and call it a day. If you want that clarity or no loss then just use FLAC.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •