5 Reasons Why BPG Will Eventually Replace JPEG 6

There’s a new player in the image compression scene: BPG (Better Portable Graphics), a format based on a single video frame of the new HEVC video codec. BPG was developed by Fabrice Bellard, a very well-known software engineer who also created ffmpeg, a comprehensive and widely used platform for media processing. With no apparent marketing campaign or industry backing, BPG has quickly gained comprehensive media coverage, including articles in Forbes, The Register and DPReview.

After comparing BPG to other image compression formats using the nice online demo, we’ve downloaded the Windows binaries and played around with them a bit, achieving very nice results in compressing images. Based on these results and on evaluating the technical and market advantages of the new format, we believe that in the long run BPG will be able to replace JPEG as the standard format for image compression, gaining support across the whole value chain from cameras and phones through photo editing software, printing and web publishing. Why do we think BPG will succeed where JPEG-2000, JPEG-XR and WebP have failed? Read below…

BPG is Open Source

The original JPEG standard, and its successors JPEG-2000 and JPEG-XR were developed by international standardization bodies such as ITU and ISO. Developing a technical standard in a committee is a lengthy process, that requires dozens of meetings (each one lasting several days), thousands of “contributions” (technical documents proposing various features of the standard), and takes several years to complete. The original JPEG standards group was formed in 1986, but Part 1 of the standard was approved only 6 years later, in 1992. Then it took two more years to approve Part 2 (Compliance Testing), and 4 more years for Part 3 (Extensions).

BPG on the other hand is an open source implementation that was created in a few months, based on an existing video compression standard (HEVC). As a community-sourced project, there is no need to wait for a standards body to approve or ratify it. Changes can be proposed at any time, and if they benefit the whole community, they are integrated into the main branch. The availability of the source code implementing the standard from day one ensures the wide distribution of software to support the standard across different platforms, and the compatibility of these software implementations with each other. This is in contrast to “the old days” of standardization, where a standard would define the specification only, and then all vendors would implement the spec on their own, and meet again for interoperability testing (also known as “Plug Fests”) to ensure that their implementations are in fact compatible with each other.

One thing to keep in mind is that if a codec is open-source doesn’t mean it is free from IP constraints. There is a patent pool for HEVC managed by MPEG-LA, and there may be additional “essential patent” holders. But that was the situation for H.264 as well, and it didn’t prevent H.264 from becoming the leading video compression standard.

BPG was developed by Fabrice Bellard

Fabrice Bellard, as described in a wonderful profile article by Cameron Laird, is an icon in the open source development community. In addition to developing the ffmpeg media software, he also developed the QEMU hypervisor for hardware virtualization, The Tiny C optimized compiler, a PC-based DVB-T Digital TV transmitter, and many more projects. As a widely respected software engineer, often referred to as a “Super Programmer”, it is only natural that his image compression project will be adopted by the open source community, followed by the industry as a whole.

Previous attempts to replace the JPEG standard were associated with very large companies: The JPEG-XR standard was based on HD Photo technology developed by Microsoft, while the WebP format was developed by Google. In both cases, other major industry players were reluctant to technologies developed by their competitors. The fact that BPG was developed by an individual that is highly respected in the industry, and free from any commercial interests, is sure to increase its chances of market success.

BPG is based on HEVC

BPG is based on HEVC (previously known as H.265), the latest video compression standard that is up to twice as efficient as the previous standard (H.264). In most video compression techniques, there are 3 types of frames: I-frames, which are frames encoded as a whole, independently from other frames; P-frames, which are encoded as differences from previous frames; and B-frames, which are encoded as differences from previous and later frames. BPG is essentially an I-frame of HEVC, with a reduced header to make it even more efficient.

HEVC encodes I-frames more efficiently than JPEG: While in JPEG each 8×8 block in the image is encoded independently, HEVC I-frames utilize redundancy between different blocks, and can encode only the differences between blocks instead of the full block information. It is clear that in uniform areas of the image, where blocks are similar to each other, such encoding (called “Intra Prediction”) can be much more efficient than coding each block independently. This is one of the main contributors to the efficiency of the BPG vs. JPEG. Another important feature of HEVC that is utilized by BPG is CABAC encoding: This is the final entropy encoding of all the HEVC parameters describing an image. CABAC encoding is more efficient that the older Huffman entropy coding used in the JPEG standard.

The fact that BPG is based on HEVC also means that no special hardware needs to be developed to enable quick and power-efficient encoding and decoding of BPG on mobile devices such as phones and tablets. HEVC hardware support is already included in the high-end devices that were released in 2014, and it is expected that more and more devices will include hardware support for HEVC during 2015 and beyond. This creates a huge install base of devices that can efficiently encode and decode BPG in hardware.

BPG is supported now in all main browsers

One of the reasons that BPG will be able to proliferate quickly to many websites is that Fabrice Bellard also implemented the BPG decoder in JavaScript, a language that is suported in all major browsers. This small (56 KB) piece of code can reside on a web page, and quickly download and execute in the browser. This means that in order to support BPG, there is no need to update the version of the browser or install a browser plug-in – just by hosting the small piece of JavaScript on your website, you can put BPG images on your page that any user can view. Many smartphones already support JavaScript in their browser – try browsing to the online demo with your phone to check if it supports BPG playback out of the box.

JPEG is old

The JPEG standard was approved a quarter of a century ago – that’s a very long time in the technology world… During this period, video compression has developed through 5 generations: From MPEG-1 through MPEG-2, MPEG-4, AVC (H.264) to today’s HEVC. So its time to move on, and say goodbye to the JPEG standard that has served us well for a long time.

So what about JPEGmini? Well, you can rest assured that BPG support will not be missing in future versions of our product, and we have already verified in our labs that our optimization algorithm can also do wonders for BPG… But as long as JPEG is still here – you can use JPEGmini today to reduce the file size of your photos by up to 80% with no quality loss.

What do you think about BPG? Let us know in the comments section below.