Main Page | Report Page

 

  Computers Forum Index » Computer Compression » Common sampling factor in JPEG

Author Message
Manhattan
Posted: Wed Jun 30, 2004 12:33 am
 
Hi,

I'd like to know what are the common sampling factor used in JPEG files. I'm
talking about the values H and V defined in the frame header. For the Y
component, are there a lot of files with H and V different from 2 ? Any site
with sample files ?

Thanks in advance
DM.
 
Severian
Posted: Wed Jun 30, 2004 12:49 am
 
On Tue, 29 Jun 2004 22:33:47 +0200, "Manhattan"
<manhattan95@wanadoo.fr> wrote:

Quote:
Hi,

I'd like to know what are the common sampling factor used in JPEG files. I'm
talking about the values H and V defined in the frame header. For the Y
component, are there a lot of files with H and V different from 2 ? Any site
with sample files ?

I think I can dig up samples of each valid sub-sampling combination,
which I used to show their effects. E-mail me (my email address is
valid) and I'll hunt for them and send them to you.

Beware if you're writing them that MacOS prior to X could not read
many of them.

--
Sev
 
Tarmo Palm
Posted: Wed Jun 30, 2004 11:16 am
 
"Manhattan" <manhattan95@wanadoo.fr> wrote in message news:<cbsjg9$5in$1@news-reader1.wanadoo.fr>...
Quote:
Hi,

I'd like to know what are the common sampling factor used in JPEG files. I'm
talking about the values H and V defined in the frame header. For the Y
component, are there a lot of files with H and V different from 2 ? Any site
with sample files ?

Thanks in advance
DM.

In JPEG there are 3 components Y, Cb and Cr. Most information for
Human eye contains Y component, therefore is this sampling factor
usualy 4. Both H and V. While color difference signals contain less
information, are these sampling factors usualy smaller.

Tarmo Palm
 
Guido Vollbeding
Posted: Wed Jun 30, 2004 11:33 am
 
Manhattan wrote:
Quote:

I'd like to know what are the common sampling factor used in JPEG files. I'm
talking about the values H and V defined in the frame header. For the Y
component, are there a lot of files with H and V different from 2 ? Any site
with sample files ?

Common sampling factors used are 2x2, 2x1, 1x2, and 1x1.
2x2 is the default setting used in the IJG library and is therefore quite
common.
2x1 is the "traditional" setting coming from video. Nearly all digital
camera firmwares today still use this setting. Note also that the sample
quantization tables given in the JPEG standard where derived with this
setting.
1x2 is the result of lossless rotation of 2x1 sampled JPEG files.
1x1 is the recommended setting for higher quality JPEG images.

For more recent results see also

http://jpegclub.org/foveon/
http://kb-bmts.rz.tu-ilmenau.de/gcg/GCGMAT1.HTM (-> first paper)

Another recent result is that the subsampling can be resolved directly
via modified DCT processing in the encoder and decoder (using partial
16x16 FDCT/IDCT - no extra resample procedure necessary!). This is
used in the updated IJG library:

http://jpegclub.org/djpeg/
http://jpegclub.org/cjpeg/

Regards
Guido
 
Guido Vollbeding
Posted: Thu Jul 01, 2004 11:37 am
 
Manhattan wrote:
Quote:

Thanks for your answer. Do you know if the result of the IDCT combined with
upsampling are better than the "fancy" upsampling used in the IJG library ?

With the new method, you won't find the blurring artifacts of bilinear
methods, and you won't find the pixelation artifacts of nearest neighbor
methods. What you *might* find if watching closely and depending
on image type and size of upscale are slight blocking artifacts,
but I think it's overall much better than the other.

I have also measured that the new methods are FASTER! This is
because there is no extra resample processing necessary - it's
all done in a single FDCT/IDCT routine.

Other methods commonly used are nearest neighbor (box, pixel replication),
or bilinear interpolation (triangle), which both have problems
(first has pixelation artefacts, other has blurring artifacts).

The original IJG decoder uses the bilinear method per default.
A big problem with this method, beside the mentioned blurring artifacts,
is that the methods for encoding (color downsampling) and decoding
(color upsampling) are NOT complementing, and thus repeated encoding/
decoding cycles are NOT stable! The simpler nearest neighbor
method is at least complementing and thus stable in repeated
encoding/decoding cycles.
The new methods with the 16x16 FDCT/IDCT are BOTH high-quality AND
stable, because obviously the FDCT/IDCT are complementing (inverse
of each other - IDCT after FDCT gives same source values - at least
mathematically with sufficiently high accuracy - the mentioned
bilinear methods are not inverse mathematically - you could probably
find an inverse of the used bilinear upsample, but it would obviously
not be the used simple averaging downsample).

While there should be no much quality difference visible in the
downsample case, you can verify the upsampling quality via 16x16
IDCT by upscaling a JPEG 200% with new djpeg -scale 2/1 or Jpegcrop
200% zoom. It is the same algorithm which is used for the color
upsampling in the normal decoding case (said 16x16 IDCT).
You will at least not find the obvious blurring artifacts
compared with a bilinear upsampler or pixelation artifacts
compared with a simple nearest neighbor upsampler...

Regards
Guido
 
Flavius Vespasianus
Posted: Mon Jul 05, 2004 6:24 pm
 
"Manhattan" <manhattan95@wanadoo.fr> wrote in
news:cbsjg9$5in$1@news-reader1.wanadoo.fr:

Quote:
Hi,

I'd like to know what are the common sampling factor used in JPEG
files. I'm talking about the values H and V defined in the frame
header. For the Y component, are there a lot of files with H and V
different from 2 ? Any site with sample files ?

I would just add that what is common is dictated by what the IJG software
supports. I you check the MNG specification you will see exactly what is
supports.

Technically, the JPEG standard supports sampling at 3:2 and 4:3. However,
few, if any, software application support it.
 
 
Page 1 of 1    
All times are GMT
The time now is Tue Sep 02, 2014 9:59 pm