GH4 Can someone explain the 4:2:2 output from GH4?

the more RGB pixels within a given area, the greater the possible varitety of colors in that area.

That doesn't sound right. Whether you have 1 or 1,000,000 pixels in any given area, the range of colors possible is defined by the bit depth. It may well be that you can only create a very small square with just 1 pixel, but the possible color values of that square would be the same for the much larger 1,000,000 pixel square, assuming both had the same bit depth.
 
Last edited:
Such summing necessarily increases the scale of values in each color channel, and, thus, we automatically have increased bit depth (per channel) in each of our new HD RGB pixels.

I get the theory of summing and averaging here, but I'm not sure it's an 'automatic' process. The result would depend on the bit depth you were averaging to. If you average in a 10 bit environment coming from an 8 bit original, then it works. If you average to an 8 bit from an 8 bit, then the new color values may change a little from the original, but the overall color pallete, the total range of possible colors, would remain the same.
 
Last edited:
Jim Simon said:
That doesn't sound right.
Which is understandable -- as I mentioned, color depth and its fundamental relationship with resolution is largely misunderstood (or unkown).


Jim Simon said:
Whether you have 1 or 1,000,000 pixels in any given area, the range of colors possible is defined by the bit depth. It may well be that you can only create a very small square with just 1 pixel, but the possible color values of that square would be the same for the much larger 1,000,000 pixel square, assuming both had the same bit depth.
Nope. The number of pixels (resolution) in a given area of a digital image also determines the color range.

For simplification, let's consider only non-color images, in which each pixel gives a range of "grey scale" values, but no color. Let's say that we first start with a digital image having a resolution in which (at a given viewing distance) the human eye cannot discern anything smaller than a group of 16 (4x4) pixels. Each group of 16 pixels "blurs" together in the viewer's eye to effectively form a single grey pixel. (Of course, human vision is much more complicated than this example, but let's keep things simple for the sake of comprehension and brevity.)

Now, let's compare this digital image with one that has the identical bit depth but that has a resolution that is 1/16 coarser. In other words, each pixel in this second image corresponds to each 4x4 group of 16 pixels in the first image. In this second image, the maximum number of possible shades within each pixel area is limited by the bit depth. However, the same is not true in the first image that has 16 times the resolution.

Let's say that we increase a single pixel in each image by one shade of bit depth. In the first image, the shade of the blurred pixel group is increased by roughly 1/16 of a bit depth shade, but the lager pixel in the second image necessarily jumps a full bit depth shade. The first image with higher resolution has 16 times more possible shades than that of the second image with lower resolution.

So, higher resolution in black & white images provides increased shade depth.

Likewise, higher resolution in color images provides increased color depth. However, when increasing the resolution in a color digital system, the resulting rise in color depth is "exponential," because we must multiply the color channels against each other to get the total color depth.
 
Last edited:
Jim Simon said:
I get the theory of summing and averaging here,..
No. No averaging.

I said "summing."

Averaging implies that we retain the same number of possible shades per pixel (the same bit depth) after the conversion into the new, lower resolution.


Jim Simon said:
but I'm not sure it's an 'automatic' process.
If you sum the number of possible shades from adjacent pixels in the original image, do you not then get a greater number of possible shades in the final, converted pixel in the second image?



Jim Simon said:
The result would depend on the bit depth you were averaging to. If you average in a 10 bit environment coming from an 8 bit original, then it works. If you average to an 8 bit from an 8 bit, then the new color values may change a little from the original, but the overall color pallete, the total range of possible colors, would remain the same.
No averaging.

The idea is that we are swapping resolution for bit depth, so the bit depth would necessarily increase.
 
Last edited:
Jim Simon said:
That doesn't sound right either.

"Color depth, also known as bit depth, is either the number of bits used to indicate the color of a single pixel, in a bitmapped image or video frame buffer, or the number of bits used for each color component of a single pixel."

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

I don't see where it's a factor of resolution, only bit depth.
Again, it is not surprising that it doesn't sound right and that Wikipedia would get the facts wrong. As I have mentioned, color depth is largely misunderstood.

In the case of the Wikipedia page, there are two fundamental omissions about color depth:
1. that resolution is a crucial factor;
2. and that color depth in analog images does not involve bit depth in any way.

The blanket statement that color depth is bit depth with no mention of how color depth relates to analog images (which have no bit depth) indicates that the author lacks a complete understanding of the subject.
 
The first image with higher resolution has 16 times more possible shades than that of the second image with lower resolution.

It really doesn't. Bit depth alone determines the number of shades for any pixel, and hence the image as a whole. The higher resolution of the first may well provide smoother gradients between shades, but it will not allow any more of them than the lower resolution image (assuming the same bit depth for both).

Keeping it very simple, in a 1 bit image, the pixels can be either on or off, either white or black. Adding more pixels won't allow any shades of grey in between. Only adding additional bits can do that.

The same applies to digital audio. Bit depth alone determines the possible values for the loundess of the signal. Sampling is not a factor.
 
Last edited:
Let's say that we increase a single pixel in each image by one shade of bit depth. In the first image, the shade of the blurred pixel group is increased by roughly 1/16 of a bit depth shade, but the lager pixel in the second image necessarily jumps a full bit depth shade. The first image with higher resolution has 16 times more possible shades than that of the second image with lower resolution.

So, higher resolution in black & white images provides increased shade depth.
Hmmm. I can see what you're getting at - and I suppose in a way it's exactly what newspaper photos were in the olden days..... (When I were't lad... :) )

In which case, they could only print black or white - so each "pixel" was 1 or 0 in todays language - but an impression of tone was given by how many dots were in a given area. It worked - as long as you didn't get too close. So I suppose you can say you were trading resolution for tonal range in principle.

But.... it may work for display purposes, but not necessarily the other way round. If we take your hypothetical group of 16 (4x4) pixels, then assuming again they can take one of 2 values (0 or 1), you're assuming that they start off all at zero, then as the light increases they go one by one to 1, all ending at 1 for the brightest value? Yes? But practically that's not likely. It's more likely they will ALL stay at 0 as the light increases, then ALL go to 1 at the same time - which wouldn't be very useful...... :)

I do see what you're getting at, and in a way it's what's behind the other side of the principle of being (theoretically) able to downconvert 8 bit 4k 4:2:0 to 10 bit 1080 4:4:4 - the 8 bit to 10 bit part. But it relies on an element of noise to "dither" the original values to stop a cliff effect (as in the paragraph above) happening - which may mean that with a given level of noise, what's the point of 10 bit encoding anyway? It's also one thing to talk about the luminance, but as far as the chrominance goes then the original 8 bit 1920x1080 can either go towards 8 bit 4:4:4 chroma OR 10 bit 4:2:0 on the downconversion.

Practically, I'm inclined to go along with the Wikipedia definition (that colour depth is defined by bit depth) as a more straightforward definition. That said, excess definition can certainly give an IMPRESSION of higher colour depth - which brings us exactly back to old newspaper photos.
 
Jim Simon said:
It really doesn't. Bit depth alone determines the number of shades for any pixel, and hence the image as a whole.
Certainly, bit depth determines the number of possible shades for any single pixel in a digital image/system. However, just as certainly, bit depth alone does not determine the number of possible shades in an" image as a whole" -- resolution is fundamental to the number of possible shades in the image.


Jim Simon said:
The higher resolution of the first may well provide smoother gradients between shades, but it will not allow any more of them than the lower resolution image (assuming the same bit depth for both).
Well, if the higher resolution image has smoother gradients between shades than the lower resolution image of the same bit depth, doesn't that mean that the higher resolution image has more in-between shades (color/shade depth)?

On the other hand, smoothness of gradients in a captured digital image is often determined by bit depth, which relates to the banding caveat that I mentioned earlier in this thread. Nevertheless, the banding/pattern phenomenon of digital imaging does not preclude the fundamental fact that higher resolution yields greater color depth.


Jim Simon said:
Keeping it very simple, in a 1 bit image, the pixels can be either on or off, either white or black. Adding more pixels won't allow any shades of grey in between. Only adding additional bits can do that.
Actually, the opposite is true -- 1-bit images can create incredible ranges of grey, given enough resolution! Thank you for reminding me of the classic proof of how resolution affects color depth.

The Wikipedia color depth page which you linked has a 1-bit image (containing only black or white dots) demonstrating that resolution gives more shades (increased color/shade depth):

1_bit.png

If 1-bit images cannot produce grey shades but only white or black, how is it that this 1-bit image is producing grey shades? The answer is... RESOLUTION.

There are countless other examples of 1-bit images with grey tones (with and without dithering). In fact, imaging in the printing industry is almost entirely based on the principle of producing grey tones from black ink dots on white paper. The technique is called "screen printing," and it is used in every newspaper, magazine and book that contain images with shading. Here is a screen printing example that shows how higher resolution yields more shades of grey. Note that the coarser screen has the fewest grey tones.


Jim Simon said:
The same applies to digital audio. Bit depth alone determines the possible values for the loundess of the signal. Sampling is not a factor.
Not sure if that digital audio example is "analogous" to digital imaging.
 
So, a Bayer pattern 3840x2160 sensor definitely gives more than 1920x1080 worth of chrominance or color resolution.
Joshua, I've looked at your link and diagram and I think you're misinterpreting what it's saying somewhat. It starts off by saying that *in the simplest case* you would take 2x2 blocks of photosites, and form an "output pixel" from each block. That would give half sensor resolution on each axis - but each "output pixel" would have unique values for R,G,B - so resolution would be colour independent (4:4:4 if you like) - I think we're agreed here?

It goes on to say fundamentally that "but we can do better", and with more sophisticated deBayering, then yes, we can. But it's assuming monochrome white illumination - all the red, green and blue photosites being used - when it talks about how better than half resolution can be achieved. In other words luminance resolution. And in that case, with relatively simple deBayering, I agree with the sq rt 2 figure - it works out to about 70% of sensor resolution. But the article does go on to say: "Other demosaicing algorithms exist which can extract slightly more resolution, produce images which are less noisy, or adapt to best approximate the image at each location" - and that's where the 75-80% figure I quoted earlier comes from. But it's for LUMINANCE - it's only valid when the scene is effectively a monochrome pattern. The black boxes, the "output pixels" construct their luminance output from the four photosites within them (shared with their neighbours) - but they rely on each giving a contribution, be it red, green or blue. That will only be the case if we talk about luminance

Looking again at your diagram, then if the black boxes represent "output pixels", then if you take (say) the group of four top left, they all share the same value for blue. Move along, and the next four all share the same value for red, and this is at the heart of why chrominance resolution must be only about half the sensor resolution (and so why 4:2:0). I find it easiest to visualise if I think of a chart being lit only by red or blue light. As far as the sensor is concerned then only those photosites give any response, each one only has 1920x1080 sites, so in this case the resolution cannot be higher.

As far as actual resolution of a normal picture goes, it follows that OVERALL resolution will depend on it's colour and saturation. If mostly monochrome it'll be higher than if saturated colour. Which is a function of max luminance resolution being 70-80%, chrominance around 50%, they'll each play their part.
 
harddrive said:
Hmmm. I can see what you're getting at - and I suppose in a way it's exactly what newspaper photos were in the olden days..... (When I were't lad... :) )
That's screen printing. Of course it is still in use today, as it is the only practical way to mass print images. Same with magazines, books, pamphlets, etc.


harddrive said:
It worked - as long as you didn't get too close.
Actually, there were several high-end photo magazines that utilized very fine printing screens, and one would be hard-pressed to tell whether or not they were looking and a continuous-tone photographic print or a screened print. The higher resolution screens gave incredible photographic ranges of tones -- all from black and white dots! Such quality from screen printing can still be seen today in some high-end photography books.


harddrive said:
So I suppose you can say you were trading resolution for tonal range in principle.
You could say so, and you would be telling it like it is!


harddrive said:
But.... it may work for display purposes, but not necessarily the other way round. If we take your hypothetical group of 16 (4x4) pixels, then assuming again they can take one of 2 values (0 or 1), you're assuming that they start off all at zero, then as the light increases they go one by one to 1, all ending at 1 for the brightest value? Yes? But practically that's not likely. It's more likely they will ALL stay at 0 as the light increases, then ALL go to 1 at the same time - which wouldn't be very useful......
I think that you have hit upon what is essentially the "smooth pattern" phenomenon (which I mentioned earlier in the thread) that appears when image banding remains after the image is converted to a higher bit depth with a lower resolution. The bit depth has been increased, but the banding was part of the original image. Keep in mind that the color depth has remained the same (or has decreased slightly) -- the color depth can never increase.

The less smooth and more broken that the pattern is in the subject, the less we see the phenomenon.


harddrive said:
I do see what you're getting at, and in a way it's what's behind the other side of the principle of being (theoretically) able to downconvert 8 bit 4k 4:2:0 to 10 bit 1080 4:4:4 - the 8 bit to 10 bit part.
I make no claims regarding the math on specific bit depths nor on specific chroma sample ratios. However, yes, resolution can be swapped for bit depth in digital imaging, and folks have been doing it for years.


harddrive said:
But it relies on an element of noise to "dither" the original values to stop a cliff effect (as in the paragraph above) happening
Only if the original capture system uses an extremely low bit rate (1-bit, for example). With 8-bit systems, you will still see some banding, but only in areas with very smooth patterns (or when the contrast is pushed after capture).

By the way, diffusion dithering is probably better than noise dithering.


harddrive said:
Practically, I'm inclined to go along with the Wikipedia definition (that colour depth is defined by bit depth) as a more straightforward definition.
In that case, I would ask two questions:
1. Do analog images have no color depth (since they have no bit depth)?;
2. How is it that 1-bit images can exhibit a tonal range of photographic quality?


harddrive said:
That said, excess definition can certainly give an IMPRESSION of higher colour depth - which brings us exactly back to old newspaper photos.
Just as primary red, blue and green pixels can give the viewer's eye the "impression" of billions of colors...
 
Last edited:
In that case, I would ask two questions:
1. Do analog images have no color depth (since they have no bit depth)?;
2. How is it that 1-bit images can exhibit a tonal range of photographic quality?
To 1 - not really relevant. The Wikipedia item is specifically talking about the digital world in this respect.

To 2 - they only APPEAR to exhibit "a tonal range of photographic quality" to the human eye, and if viewed from far enough away. Scientifically, they are always 1-bit images, period.
Just as primary red, blue and green pixels can give the viewer's eye the "impression" of billions of colors...
Well, yes, though for 24 bit it's "only" 16.7 million, and the human eye can't even resolve that many variations. (If you're feeling bored, try http://www.xrite.com/online-color-test-challenge :) )

I'd also distinguish between display technologies (with separate r, g, b phosphors) and the video signal with values for Y,U,V for each pixel. Technically, we take the pixel to be a entity in it's own right with a given colour depth - even if that's not how it gets engineered in reality.
 
ima jump in quick with a possible layman's version I experienced. This may or may not apply.

Last year, I experimented with expanding colors by UPSCALING a 1080 file up into 4K. The object was to see what it did with the pixels that didn't exist. Rather than simply multiplying and repeating the exact same color pixels, it SEEMED like it created GRADIENT pixels for the ones inbetween. I did not SCOPE it, but just eye balling it from point A to point B, where there were TWO shades, now, there were in between shades of pixels. (zoomed in, pixel peeping)

Sure, it didn't create 4:2:2 out of nothing, but it could have filled in the blanks during render with averaging or some scaling voodoo. And I believe the 4K 4:2:0 down to 1080 4:2:2 or 444 whatever, probably does the same thing: averaging tweens and filling in with shades of TWEEN color that didn't exist.
 
No - not the same, and I'm increasingly wishing it was possible to ban the whole 4:x:x nomenclature. It's obviously widely misunderstood and causes confusion through misunderstanding.

I'll try once more.

4k 4:2:0 means by definition:
Luminance - 3840x2160 samples Chrominance - 1920x1080 samples

1080 4:4:4 means by definition:
Luminance - 1920x1080 samples Chrominance - 1920x1080 samples

OK? So if you downsample the 4k luminance from 3840x2160 to 1920x1080 * and don't alter the chrominance * you end up with 1920x1080 samples for each.

In other words, 1080 4:4:4, it's as simple as that.
 
First I will say this, YCC chroma subsampling absolutely relies on bit depth, there is always an RGB colour space associated with it, and there is a fixed number of colours within that colour space. We also have to remember that chroma subsampling is a method of lossy compression.

Think of it like this.

Let's say you have a Foveon camera, or 3CMOS/3CCD camera that shoots 4k UHD. So no debayering involved. Each pixel has its own RGB values. The camera grabs a frame, and encodes it as YCC 4k 8bit 4:4:4, so in the resultant frame, every single pixel has a unique 8bit value for each colour channel, a maximum of 256 possible shades/tints for each channel.

If you then re-encode it to 4k 8bit 4:2:2, you have now lost half the colour information. You can't get it back. That colour information is gone.

By resampling at 4:4:4, all you are doing now is looking at each pixel individually, instead of blocks of pixels. So you won't lose anymore information, but you won't gain any new information either.

Even if you downsample to 1080p, only 1 of 2 things will happen, either pixels will be discarded completely, or a new pixel will be created which is a form of mathematical average of the other pixels surrounding it based on the algorithm used. Regardless of the algorithm used to downsample, information is lost.

As a 4:4:4 image, each pixel may have its own independent information, but that information is less than the original 4:4:4, and most likely less than the 1st re-encoding to 4:2:2.
 
harddrive said:
To 1 - not really relevant. The Wikipedia item is specifically talking about the digital world in this respect.
Really? I didn't see one word specifying/qualifying that they were only referring to digital systems.

In fact, the title of the page is simply "Color Depth."

Furthermore, the first sentence is an unqualified, blanket statement: "Color depth, also known as bit depth, is either the number of bits used to indicate the color of a single pixel, in a bitmapped image or video frame buffer, or the number of bits used for each color component of a single pixel." No where on that page does it state that color depth applies to analog imaging.

Obviously , the author has an incomplete understanding of the realm of color depth.


harddrive said:
To 2 - they only APPEAR to exhibit "a tonal range of photographic quality" to the human eye, and if viewed from far enough away. Scientifically, they are always 1-bit images, period.
Digital RGB monitors always show only red, green or blue, but they APPEAR to exhibit cyan, magenta and yellow. Scientifcially, they always show red, green or blue, period.

Both a 1-bit image and a 10-bit RGB monitor use the same perceptual mechanism to create tones and colors that do not "technically" exist in the image. So, when one views a high-end 1-bit image (or a 10-bit RGB image), they are not hallucinating those colors/shades -- that color/shade information is actually inherent in the 1-bit (or 10-bit) image, and human perception makes those colors/shades appear.



harddrive said:
Well, yes, though for 24 bit it's "only" 16.7 million, and the human eye can't even resolve that many variations. (If you're feeling bored, try http://www.xrite.com/online-color-test-challenge :) )
A 10-bit (per channel) RGB pixel can yield 1,073,741,824 possible colors.

Thanks for the link.



harddrive said:
I'd also distinguish between display technologies (with separate r, g, b phosphors) and the video signal with values for Y,U,V for each pixel. Technically, we take the pixel to be a entity in it's own right with a given colour depth - even if that's not how it gets engineered in reality.
Yes. There are various digital imaging systems.
 
Last edited:
atarijedi said:
Even if you downsample to 1080p, only 1 of 2 things will happen, either pixels will be discarded completely, or a new pixel will be created which is a form of mathematical average of the other pixels surrounding it based on the algorithm used. Regardless of the algorithm used to downsample, information is lost.
Actually, you can sum the values of an adjacent block of pixels (of the same color channel), and then jam that sum into a single pixel of higher bit-depth in the "down-sampled" image, with no loss of color depth information.
 
Even if you downsample to 1080p, only 1 of 2 things will happen, either pixels will be discarded completely, or a new pixel will be created which is a form of mathematical average of the other pixels surrounding it based on the algorithm used. Regardless of the algorithm used to downsample, information is lost.
That ignores the point I made above, and even put in bold as it's such a key point. I'll try using bigger type as well.

"......if you downsample the 4k luminance from 3840x2160 to 1920x1080 * and don't alter the chrominance * you end up with 1920x1080 samples for each."

So as well as the 2 things you mention, a third can happen - downsample luminance (and yes, luminance resolution will be lost) but don't downsample the chrominance.
 
Actually, you can sum the values of an adjacent block of pixels (of the same color channel), and then jam that sum into a single pixel of higher bit-depth in the "down-sampled" image, with no loss of color depth information.

Technically you can just sum the values, and throw it into a larger bit space. But it would look wrong. You would be losing colour information. Which is why that simplistic method isn't used.

Think of it like this, you have 2 pure (saturated) red channels, so each one has a value of 255. You sum them together for a value of 510 and put them into a 10bit space, which can support 0 to 1024. Now your pure red only looks ~50% as "bright".

You could do it with 4 pixels instead, so you would have 4 8bit numbers, but you would still be losing information because you are essentially replacing 4 independent pixels with 1 pixel that is trying to approximate the information from those 4. It can't do that as accurately as having those 4 pixels, thus information is lost.

That ignores the point I made above, and even put in bold as it's such a key point. I'll try using bigger type as well.

"......if you downsample the 4k luminance from 3840x2160 to 1920x1080 * and don't alter the chrominance * you end up with 1920x1080 samples for each."

So as well as the 2 things you mention, a third can happen - downsample luminance (and yes, luminance resolution will be lost) but don't downsample the chrominance.

Chroma subsampling does not touch Luma, at all, with the exception of gamma correction which is related but separate. (Luminance and Chrominance aren't technically used, as they are different than Luma and Chroma). So if you want to alter the Luma, than you won't be using Chroma subsampling.

If you are simply down-resing from 4k to 1080p, you are just resizing using some algorithm that works similar to debayering, but handles multiple channels across multiple pixels.

What you described is some form of Luma subsampling, and I don't know if that is something people do, because you want each pixel to have its own independent luma information. This is more of a theoretical thing you could do, but no one actually does.
 
Back
Top