Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 29 Mar 2015, 19:59
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Graphics
BPG file
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [5 Posts]  
Author Message
labbe5

Joined: 13 Nov 2013
Posts: 236
Location: Canada

PostPosted: Mon 05 Jan 2015, 12:53    Post subject:  BPG file
Subject description: BPG is likely to take over JPEG
 

Time will tell, but BPG might take over JPEG format. Here's why :

JPEG Just Got Some REAL Competition

by Paul Arnote

The JPEG group (Joint Photographic Experts Group) was originally formed in 1986, and it was charged with creating a "standard" for digital still picture coding. The first formal JPEG standard was approved in September 1992. Yes, almost 23 years ago.

Over those two-plus decades, the JPEG file format has become universally accepted in the digital graphics world. You can scarcely visit any website that doesn't have some JPEG graphics files on its page. The JPEG file format has become the defacto standard for the storage of graphics files on digital cameras. There are a lot of positive aspects to the use of the JPEG file format.

But as with everything, there are aspects of the JPEG format that aren't so good. Sure, using its lossy compression algorithm, it can compress images 10:1, making the images 1/10th of the size of their uncompressed counterparts. But it is within that ability that the JPEG file format falters. If you compress it too much, or if you resave the image over and over again using the same compression settings, too much of the image information is discarded. This results in a loss of detail in the image, and can result in pixelation and bad color reproduction. Sure, you can circumvent this image degradation by first saving a first generation JPEG file as a PNG file (which uses lossless compression, and doesn't discard any of the image information), performing your edits, and then re-saving the PNG file as a JPEG file again. While not a huge deal breaker, it illustrates the problems inherent with the JPEG file format.

Despite preserving 100% of the image quality, the PNG file format never really emerged as a strong threat to the JPEG file format's dominance. Without a doubt, it has managed to carve out its niche in the digital graphics world, and most web browsers support the display of PNG graphics. But it never really gained the momentum to unseat JPEG files from the "throne." This is because of the JPEG file format's ability to produce much smaller file sizes, and in a world where speed counts when visitors access a website, the smaller JPEG files download much faster than the larger, but albeit higher quality, PNG files.

Now, fast forward nearly 23 years, and finally there is a bona fide competitor to the JPEG file format. Unless you run in certain small circles, you most likely have never heard of Fabrice Bellard. For those who are unfamiliar with him (and I suspect that's the vast majority of people reading this article), Bellard is the genius behind the immensely successful FFMPEG multimedia library, and the genius behind the QEMU virtualization hypervisor. He has now lent his talents to creating a better graphics format with compression as good as or better than the stalwart JPEG file format.


JPG on the left, BPG on the right, with similar levels of compression and similar file sizes. Notice the pixelation of the image background on the JPG side, and the total lack of pixelation on the BPG side. Also take note of the increased clarity and detail on the BPG side of the image.


Bellard's new format is called BPG, which is short for Better Portable Graphics. While the older JPEG format uses 8 bits per channel, Bellard's new BPG format uses 14 bits per channel, and even supports transparency and alpha channels. As a result of the higher bit count per channel, Bellard is able to achieve the same level of compression as the JPEG file format, but without the significant image detail loss that besieges the JPEG format. Additionally, there is an option in the BPG format for lossless compression, similar to how the PNG format works.

Bellard's BPG format is based on a subset of the HEVC (High Efficiency Video Coding), the slated successor to the H.264/MPEG-4 AVC format currently used by Blu-Ray discs. Besides supporting all of the same chroma formats as the JPEG format, it also supports RGB, YCgCo and CMYK color spaces.

Here are some other examples comparing MozJPEG to BPG. JPEG is on the left side of the divider, BPG is on the right side of the divider. Both formats are set to display images of a small file size, which translates into higher levels of compression.

Don't expect to see much of BPG around, at least here at first. There are a few reasons. First, BPG is so new that there are little to no software titles that support it. Bellard hopes that browser and graphics application developers will include support for it in the future. Bellard has written an open source encoder and decoder for Linux and Windows, along with a small JavaScript decoder that can be used in most modern day browsers. Bellard is also hopeful that the HEVC support that is being included into some chipsets will allow for hardware decoding of the BPG images, allowing software vendors to skirt around any licensing issues.

Second, there are the licensing issues themselves. HEVC is controlled by MPEG LA, the patent consortium of content providers -- 23 companies in the case of HEVC -- who will undoubtedly be pursuing royalties from any vendor who includes HEVC support. Since MPEG LA holds the licensing reins for HEVC, it is demanding a $0.20 royalty per HEVC product after the first 100,000 units, per year, with an annual cap. This is the reason that hardware decoding becomes so attractive. Instead of each graphics application developer and each browser developer having to pay royalties, the royalties would (conceivably) be paid only when a graphics card with HEVC support is purchased. Of course, the royalties would be embedded into the price that the end user pays for the graphics card, and the end user would be none the wiser.


Not The Only Competitor

There are other competitors working to supplant the JPEG format as the de facto go to graphics format. Google has its WebP format, which is based on the VP8 video compression codec Google inherited when it purchased On2 Technologies in February 2010. WebP is a subset of Google's WebM multimedia codec, and is released under a BSD license.

WebP supports both lossy and lossless compression. Google claims that WebP images are 40% smaller than the same file stored in the PNG format, and 28% smaller than a PNG that has been optimized with pngcrush and pngout. Since WebP also supports animation, Google claims a 64% reduction in file size using lossy compression over the same animated GIF, and a 19% reduction in file size when using lossless compression.


WebP (left side of the divider) comes closest to matching the quality of BPG files (right side of the divider), but there is still a noticeable difference. BPG files still come out on top with superior quality.

Google Chrome and Opera already have native support for the display of WebP graphic files, as do most other browsers based on WebKit. On Linux, ImageMagick and XnView have native support among graphics programs. GIMP supports WebP via a plugin. As you can imagine, nearly every Google service (Gmail, Google+, Picasa, Google Image Search, etc.) supports the use of the WebP format.

Meanwhile, over in the Mozilla camp, they have abandoned trying to support WebP. Instead, they have sunk their efforts into producing a superior JPEG encoding library, called MozJPEG. Originally released in March 2014, a much improved MozJPEG 2.0 library was released in July 2014. The original version shaved 10% off of file sizes, and version 2.0 cut file sizes by another five percent. Mozilla achieves its results by utilizing trellis quantization, which improves compression for baseline and progressive JPEGs, without sacrificing compatibility. Originally, version 1.0 of the MozJPEG library only worked on JPEG files that were progressively encoded. Facebook has contributed $60,000 (U.S.) towards the development of MozJPEG.


Summary: Explore The Differences Yourself

Overall, BPG outperforms any of the other graphics formats, which is what makes it newsworthy. But you don't have to take my word for it. You can go take a look yourself. Point your browser over to the BPG sample page, and you can directly compare files encoded with MozJPEG, WebP, JPEG2K, BPG and the original image. Moving your cursor over the picture moves a reference line across the image. On one side of the reference line is one graphic format, and another graphic format is on the other side. This allows you to make direct comparisons between the formats.

Let's all hope that a way can be found around the licensing obstacles that are bound to crop up. Sad though it might be, the greed of the MPEG LA members may succeed in hindering its widespread adoption, at least until those applicable patents expire. Still, it's nice to know that something exists on the horizon to give us much improved rendering of our digital images.

The link to compare file formats :

http://xooyoozoo.github.io/yolo-octo-bugfixes/#cologne-cathedral&jpg=s&bpg=s

Paul Arnote wrote for The PCLinuxOS Magazine :
http://pclosmag.com/index.html
Back to top
View user's profile Send private message 
solo


Joined: 14 Nov 2013
Posts: 165

PostPosted: Mon 05 Jan 2015, 14:14    Post subject:  

Personally, I'm pretty satisfied with the PNG format. And I am not yet willing to believe those who are ready to write this format off as unsuccesful.
File size is much less of an issue nowadays than in the past.
We are living in a world where people are streaming and downloading entire movies.

You know what would really make a difference?! If BPG could do this:

https://en.wikipedia.org/wiki/APNG

because Internet.
Back to top
View user's profile Send private message 
step

Joined: 04 May 2012
Posts: 272

PostPosted: Mon 05 Jan 2015, 17:45    Post subject: Re: BPG file
Subject description: BPG is likely to take over JPEG
 

labbe5 wrote:

The link to compare file formats :

http://xooyoozoo.github.io/yolo-octo-bugfixes/#cologne-cathedral&jpg=s&bpg=s

I could appreciate a dramatic quality difference in the Zoo bird tiny sample. For larger samples the difference was less noticeable.

_________________
FatDog64 631|Blue Pup 4|DebianDog+OpenMediaVault stick

Last edited by step on Tue 06 Jan 2015, 04:03; edited 1 time in total
Back to top
View user's profile Send private message 
Dingo


Joined: 11 Dec 2007
Posts: 1426
Location: somewhere at the end of rainbow...

PostPosted: Mon 05 Jan 2015, 18:28    Post subject:  

BGP could be interesting for colorful images to include in a pdf (scanned color books); Do you know if there are available wrapper to wrap (without recompression) BGP images in a pdf, so you can take advantage of better appereance at high compressed ratio?

I only know a freeware program (freepic2pdf) working with wine, able to put jpeg-2000 images in a pdf. I don't know any software able to put BGP images in a pdf keeping original compression

_________________
replace .co.cc with .info to get access to stuff I posted in forum
dropbox 2GB free
OpenOffice for Puppy Linux
Back to top
View user's profile Send private message Visit poster's website 
Jan99

Joined: 01 Jan 2013
Posts: 7

PostPosted: Fri 27 Mar 2015, 13:35    Post subject: BPG file
Subject description: Compile in Precise Puppy - 5.7.1
 

Looks promising but was not able to compile in Precise Puppy - 5.7.1

Depends on libpng V1.5 ore later puppy has V1.2 .
Compiling that from source did not help.
No ./configure file
Keep massage :

# make
gcc -Os -Wall -MMD -fno-asynchronous-unwind-tables -fdata-sections -ffunction-sections -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_REENTRANT -I. -DCONFIG_BPG_VERSION=\"0.9.5\" -g -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DHAVE_AV_CONFIG_H -std=c99 -D_GNU_SOURCE=1 -DUSE_VAR_BIT_DEPTH -DUSE_PRED -c -o libavcodec/hevc.o libavcodec/hevc.c
In file included from ./libavutil/atomic.h:29:0,
from libavcodec/hevc.c:26:
./libavutil/atomic_gcc.h: In function ‘atomic_int_get_gcc’:
./libavutil/atomic_gcc.h:32:5: warning: implicit declaration of function ‘__atomic_load_n’ [-Wimplicit-function-declaration]
./libavutil/atomic_gcc.h:32:33: error: ‘__ATOMIC_SEQ_CST’ undeclared (first use in this function)
./libavutil/atomic_gcc.h:32:33: note: each undeclared identifier is reported only once for each function it appears in
./libavutil/atomic_gcc.h: In function ‘atomic_int_set_gcc’:
./libavutil/atomic_gcc.h:43:5: warning: implicit declaration of function ‘__atomic_store_n’ [-Wimplicit-function-declaration]
./libavutil/atomic_gcc.h:43:32: error: ‘__ATOMIC_SEQ_CST’ undeclared (first use in this function)
./libavutil/atomic_gcc.h: In function ‘atomic_int_add_and_fetch_gcc’:
./libavutil/atomic_gcc.h:54:5: warning: implicit declaration of function ‘__atomic_add_fetch’ [-Wimplicit-function-declaration]
./libavutil/atomic_gcc.h:54:41: error: ‘__ATOMIC_SEQ_CST’ undeclared (first use in this function)
libavcodec/hevc.c: In function ‘pred_weight_table’:
libavcodec/hevc.c:148:13: warning: unused variable ‘chroma_weight_l1_flag’ [-Wunused-variable]
libavcodec/hevc.c:147:13: warning: unused variable ‘luma_weight_l1_flag’ [-Wunused-variable]
libavcodec/hevc.c: In function ‘decode_nal_unit’:
libavcodec/hevc.c:2727:5: warning: case value ‘48’ not in enumerated type ‘enum NALUnitType’ [-Wswitch]
libavcodec/hevc.c: At top level:
libavcodec/hevc.c:285:12: warning: ‘get_buffer_sao’ defined but not used [-Wunused-function]
make: *** [libavcodec/hevc.o] Error 1
#


If there is no native support for it in my linux i don't gonna use it.
First post is from 5 Jan 2015 and puppy install is showing nothing so probably not in ubuntu as well.

I think if they are not making it easy to install natively most users will simply not use it and keep at JPG and PNG .
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [5 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Graphics
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0859s ][ Queries: 11 (0.0054s) ][ GZIP on ]