Announcement

Collapse
No announcement yet.

Mozjpeg 2.0 Improves JPEG Encoding

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

  • #21
    Originally posted by quikee View Post
    This is similar as first compress with JPEG, decompress and then compress with PNG. The size of PNG will be smaller than original but not even close to that of the intermediate JPEG file. Using approaches like this will never be as efficient as a designed lossy codec.
    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.

    Comment


    • #22
      Originally posted by BSDude View Post
      I've had a 24" and a 27" monitors side-by-side, both 1080. I can tell you that I noticed the difference. 32" and maybe even 40" is ideal for 4k. As a comparison, for a 27" monitor with 1920x1080 resolution the pixel density amounts to 81.59 PPI (pixel per inch) while a 40" 3840x2160 resolution gives you 110.15 PPI. 32" for the same resolution would give 137.68 PPI and let's not get into 8k territory!

      I would think that even for Jumbotrons it doesn't make sense having something above 8k. But you never know, new uses could be found. They were saying 640kilobytes should be enough for everybody a while back.
      [still offtopic]
      I meant, do we even WANT 8K? It seems like it would be a complete waste of hardware/electrical power to run those displays, and your math only supports that claim. If, at 32', the resolution is 137.68PPI then I don't see a real reason to go beyond that amount of pixels (especially since, like I said, most people won't go up to 32' monitors (let alone even bigger)). Wouldn't the time it would take to make 8K a thing be better spent improving monitor tech some more? It seems like that's one of the areas that gets highly overlooked throughout computer history...
      Though, with the recent stuff like IPS, DisplayPort, and Variable Refresh Rate, things are kicking up

      Comment


      • #23
        Originally posted by Imroy View Post
        PNG uses deflate/LZ, not Huffman.
        And JPEG also converts RGB images into a YUV colour space, which allows for chroma sub-sampling, saving even more space.
        Look up DEFLATE Compressed Data Format Specification and try again...

        Comment


        • #24
          Originally posted by quikee View Post
          Do you mean JPEG LS - which is a different standard and is not supported by any JPEG decoder (it is a different format altogether) or the libjpeg 9 lossless compression mode which is a non-standard extension that will probably never be supported by anything else than libjpeg (for example libjpeg- turbo which is the most used implementation of a JPEG decoder). Also both use a different approach to lossless compression than lossy JPEG does.

          It is similar for WebP - it uses a different approach for lossy and lossless.
          Thanks for the correction, JPEG-LS and WebP don't use transformation as I've assumed.

          This is similar as first compress with JPEG, decompress and then compress with PNG. The size of PNG will be smaller than original but not even close to that of the intermediate JPEG file. Using approaches like this will never be as efficient as a designed lossy codec.
          No, I was more thinking along http://pngquant.org/

          Comment


          • #25
            If anyone wants one more reason, decoding JPEG files is also a lot faster than decoding PNG.

            Comment


            • #26
              Originally posted by DebianLinuxero View Post
              Why is so important JPEG over more modern formats like PNG?

              Why camera and video-camera brands don't use it in its products if they could save royalty's money?

              Is so bad PNG?

              Please, educate me.
              PNG is actually older format afaik and it uses data compression (delta encoding into compression) and is losless, while jpeg actually uses lossy compression.
              Jpeg works in much different manner too, first it converts RGB into Y'CbCr and then uses human eye properties to optimize from there (human eye detects changes in color shade much easier than one bright pixel in dark picture).
              Jpeg does further compress YCbCr via discrete cosine transformation and finally it uses huffman encoding to compress results of DCT into jpeg file. Decompression works in reverse.

              Comment


              • #27
                Originally posted by ssvb View Post
                If anyone wants one more reason, decoding JPEG files is also a lot faster than decoding PNG.
                Because AFAIK it is often done by the GPU (depends on the architecture of course).
                Also the bigger size of PNG naturally leads to longer decoding time ...

                I call strawman ... because raw bitmaps take absolutely no time to decode, and are thus faster ... doesn't mean they should be used everywhere ...

                Why are we even discussing this? These two format have completely different purposes. This is like discussing whether FLAC is better than MP3.

                Comment


                • #28
                  Originally posted by log0 View Post
                  Look up DEFLATE Compressed Data Format Specification and try again...
                  Damn, alright. But DEFLATE uses LZ77 first, before Huffman. It's not just Huffman on its own.

                  Comment


                  • #29
                    Originally posted by Daktyl198 View Post
                    [offtopic]
                    As somebody who's never seen a 4k monitor, but owns a 1080p 21' monitor, is there even a reason for 8K? It seems like 4K would be perfect up to ~32', at which point the screen size is just unruly. I think most people would just go for dual-27' monitors or something.
                    They where talking about 4K at 15" for laptops, which I'm all for, the cellphone market keeps getting all of these really high DPI screens, desktops and laptops have actually downgraded over the years...

                    8K is for the larger screens, think 30+" in size. I'd love to get an 8K screen at 65", thats still 135.56 DPI, on a good IPS panel it'd still look good sitting in close to the screen in the living room.
                    Last edited by Kivada; 16 July 2014, 07:10 PM.

                    Comment


                    • #30
                      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.
                      You are right - it is not the similar. What you typically do is reduce the number of colors and use dithering to compensate but this will not win (or even come close to) size/quality battle against JPEG when used at a typical color rich photo either.

                      Originally posted by CrystalGamma View Post
                      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 am all for it.. but Mozilla is still didn't integrate any of the new formats into Firefox. Daala is still far away but it would be cool if they made an image format in parallel - just to test and tune their lapped transform, intra prediction, chroma from luma and other techniques that are useful for still images.

                      Comment

                      Working...
                      X