Announcement

Collapse
No announcement yet.

Mozjpeg 2.0 Improves JPEG Encoding

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    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).

    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.

    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.

    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

    Comment


    • #32
      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.

      Comment


      • #33
        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; 18 July 2014, 12:34 PM.

        Comment


        • #34
          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?

          Comment


          • #35
            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.

            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.

            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).

            Comment


            • #36
              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.

              Comment


              • #37
                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.

                Comment


                • #38
                  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.

                  Comment


                  • #39
                    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.

                    Comment


                    • #40
                      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.

                      Comment

                      Working...
                      X