GH4 : Convert 4K 8bit to 1080p 10bit?

Lee, what tool would you choose at this moment to convert the GH4 4k to 1080 prores HQ.
Good question! What we're discussing here is how a virtually lossless 4K->1080p conversion could ideally be done. I don't know whether a transcoder like this is yet available.

My plan for 4K is to use it with a super wide-angle lens to capture an entire scene with a GH4 locked-down on a tripod. I'll then pre-process each clip in After Effects, scaling and panning into a 1080p window that's keyframed to the camera moves I want to make. After doing a technical grade and any needed sharpening, the 1080p clips would be exported to 10-bit 4:2:2 Cineform for editing in Premiere Pro. I like Cineform because it uses wavelet compression instead of packing the scaled video frames back into H.264 macroblocks.

I've already used this locked-down A-cam approach on numerous 1080p projects. With 4K resolution, I'll be able to zoom in twice as far in post, without softening up the image too much.
 
That's true only when all ten original pixels contain precisely the same numerical value. In real life, due to minute variations in light dispersion and sensor noise, a cluster of photosites will only rarely produce identical readings. When you sum them all together, those variations are combined without loss in precision, which effectively filters out the high-resolution noise just as a single large photosite would have done.
4/12 3/10 2/8
2340 234 23
2341 234 23
2342 234 23
2343 234 23
2344 234 23
2345 235 23
2346 235 23
2347 235 23
2348 235 23
2349 235 23
---- --- ---
2345 234 230

If you downscale to 2 digits and add those 10 values, you will get 230. If you average your 10 3-digit values, you will get either 234 or 235.
You lose precision.

This may be an extreme case, but you risk losing precision in any case. There may be cases where you do not lose, but you can't say you don't.
And it's not true that adding the values (back) averages out the error. You add errors.
 
@Fool4UAnyway - Hard to believe you keep beating this dead horse with simplistic arithmetic. Of course you lose precision when converting down from 12-bit sensor photosites to 8-bit H.264 pixels. That's true by definition and no one disputes that. What you can't seem to comprehend is that you gain precision (in exchange for losing spatial resolution) when summing pixels into larger bins without discarding any of the summed bits. Your claim that rounding errors will accumulate is simply wrong. Rounding (rather than truncating) produces equal amounts of under-estimates as over-estimates, and when those errors are summed together they statistically cancel out. You are basically claiming that Digital Signal Processing theory doesn't work!
 
Rounding (rather than truncating) produces equal amounts of under-estimates as over-estimates, and when those errors are summed together they statistically cancel out.

Your statistical claim doesn't hold. The values above show this.

You may have a lot of knowledge, but I am surprised at how easily you put aside simple mathematics. Yes, they may be simple, but that does not mean they are not true and you can just ignore them to your liking.

Your alleged 10-bit values just aren't real 10-bit values.
 
Your statistical claim doesn't hold. The values above show this.

You may have a lot of knowledge, but I am surprised at how easily you put aside simple mathematics. Yes, they may be simple, but that does not mean they are not true and you can just ignore them to your liking.

Your alleged 10-bit values just aren't real 10-bit values.

@Fool

Its not just "simple" mathematics as you imply. Digital signal processing is anything but simple. It is not a matter of just adding values together and it requires use of Sin, root values etc in very complex mathematical equations like those used in Fourier transforms etc

If people with vast knowledge on this subject like LPowell and David Newman CEO of Cineform say its possible I tend to believe them....

http://www.dvinfo.net/forum/cineform-software-showcase/521594-panasonic-gh4.html

"4:2:0 maps to an effective 4:4:4 with root-2 the image size. So 2.7k 4:2:0, is a nice 1920x1080 4:4:4"

Also..... compressed 100Mbit 4K from the GH4 can then convert to CineForm 2K/1080p, with Luma boosted to 10bit. “As long as you up-convert to RGB and 10/16-bit first, you get the benefits,” Newman concludes.

How incredibly arrogant of you to dismiss their expertise so easily...

PS: I thought it best to just truncate your user name using simple maths to a 2 bit value for the sake of argument....it seemed appropriate.
 
Last edited:
"4:2:0 maps to an effective 4:4:4 with root-2 the image size. So 2.7k 4:2:0, is a nice 1920x1080 4:4:4"

I'm not saying that is untrue.

It's those 8 bit values you take 4 of and then treat them as a 10 bit value. Those 8 bit values may have a rounding error in the least siginicant bit. So it may be 0 while it might (better) have been 1, or the other way around. If you add 4 of those, and they are all rounded to the same value, you deviation will be 4 instead of (still) 1. This means you don't get any better values and you only, more or less, shift your bytes two bits to the left.

If you take 10 bit values first, all the way, or as least precision, you don't lose those 2 bits those 8 bit values do not contain.

That is just simple mathematics, regardless of what else is going on.

The biggest error, of course, is in debayering a pattern that doesn't capture all the information you would want to have, making up 2/3 of the image anyway.
 
I'm not saying that is untrue.

It's those 8 bit values you take 4 of and then treat them as a 10 bit value. Those 8 bit values may have a rounding error in the least siginicant bit. So it may be 0 while it might (better) have been 1, or the other way around. If you add 4 of those, and they are all rounded to the same value, you deviation will be 4 instead of (still) 1. This means you don't get any better values and you only, more or less, shift your bytes two bits to the left.

If you take 10 bit values first, all the way, or as least precision, you don't lose those 2 bits those 8 bit values do not contain.

That is just simple mathematics, regardless of what else is going on.

The biggest error, of course, is in debayering a pattern that doesn't capture all the information you would want to have, making up 2/3 of the image anyway.

It could turn out that what you say is entirely true and there is no way to get accurate 10 bit colour values (luma and chroma) from an 8 bit source...I aint no maths genius thats for sure ;-) However, having recently filmed a series of lectures on digital signal processing and seeing that the maths behind these processes is indeed very involved requiring integration, differentiation and complex algebra - something I failed dismally at school .... I wont argue with them. Hence my skepticism at your seemingly rather simplistic take on this subject.

Having said that it does seem from my very limited knowledge on this particular subject that no matter how many bits you are dealing with in respect to acquisition you will never retrieve clipped highlight detail through up-scaling and artifacts such as banding produced by 8 bit source material might not be fixable by up-scaling colour space to 10 bit....hope I am wrong about that.

More likely it seems to me that converting 4k to 1080P 10 bit 4:4:4 may just give more latitude for extreme grading in post. But until someone proves conclusively that the processes described by Mr Newman etc are flawed I will listen to their expert opinions and take them at their word...in much the same way I listen to the 97.2% of climate scientists who are 95% sure we are heading for serious trouble. That is just my scientific background coming to the fore....

Whatever the outcome of all this the GH4 looks to be an awesome 4K for 1080p camera in many respects and I plan on utilizing it in much the same way Lpowell is looking to use it....unless Nikon bring out something similar in spec very soon (highly unlikely) - all the best and apologies if I sounded a tad harsh :happy:
 
The reason why an example using "simple arithmetic" can be misleading is because the 8-bit pixel values are quantized. When dealing with summed quantization errors, the results are non-deterministic and you must use statistical analysis rather than linear mathematics to evaluate them. In this case, the pixels are quantized by a rounding function whose cummulative statistical error approaches zero. That is why it is valid to claim that there is no statistical loss in precision when summing clusters of four adjacent 8-bit monochrome pixels into a single 10-bit result.

There are intuitive ways to understand the process as well. Say you want to measure the amount of rainfall in a one-foot square area, but all you have are four 6-inch-wide 2500 ml cylinders you can use to collect it. So you arrange the cylinders in a 2x2 array inside the one-foot square and let it rain. Afterwards, you measure the amount of water collected in each cylinder, which is calibrated in 100 ml increments. To calculate the total amount of rainfall in the one-foot square area, you add together the measurements of the four cylinders, each of which is accurate to a precision of 100 ml. Is the precision of the 4-cylinder sum then 100 ml as well?

Yes, statistically speaking, there is no loss in precision. The statistical precision of the summed result is 100 ml out of a maximum result of 10000 ml (4 x 2500 ml cylinders). While it's true that the worst-case summed measurement error could be close to 200 ml, it's statistically unlikely to be that large. If you collect many such measurements over time, the statistical likelihood of cummulative measurement error will come close to zero.

With the four-cylinder array, another source of measurement error is the uncollected rain that fell in the corners of the one-foot square. In that case, however, there is a consistent under-estimate of the total amount of rainfall and it can be corrected by a simple scaling adjustment.
 
Last edited:
The reason why an example using "simple arithmetic" can be misleading is because the 8-bit pixel values are quantized. When dealing with summed quantization errors, the results are non-deterministic and you must use statistical analysis rather than linear mathematics to evaluate them. In this case, the pixels are quantized by a rounding function whose cummulative statistical error approaches zero. That is why it is valid to claim that there is no statistical loss in precision when summing clusters of four adjacent 8-bit monochrome pixels into a single 10-bit result.

There are intuitive ways to understand the process as well. Say you want to measure the amount of rainfall in a one-foot square area, but all you have are four 6-inch-wide 2500 ml cylinders you can use to collect it. So you arrange the cylinders in a 2x2 array inside the one-foot square and let it rain. Afterwards, you measure the amount of water collected in each cylinder, which is calibrated in 100 ml increments. To calculate the total amount of rainfall in the one-foot square area, you add together the measurements of the four cylinders, each of which is accurate to a precision of 100 ml. Is the precision of the 4-cylinder sum then 100 ml as well?

Yes, statistically speaking, there is no loss in precision. The statistical precision of the summed result is 100 ml out of a maximum result of 10000 ml (4 x 2500 ml cylinders). While it's true that the worst-case summed measurement error could be close to 200 ml, it's statistically unlikely to be that large. If you collect many such measurements over time, the statistical likelihood of cummulative measurement error will come close to zero.

With the four-cylinder array, another source of measurement error is the uncollected rain that fell in the corners of the one-foot square. In that case, however, there is a consistent under-estimate of the total amount of rainfall and it can be corrected by a simple scaling adjustment.

Thanks...that analogy simplifies the theory enough for even a maths dummy like me.

Will banding artifacts originating in 4K 8 bit 4:2:0 sources like those seen in sky gradients be eliminated using this method of colour depth re-processing when down rezzing to 1080P? TIA.
 
Will banding artifacts originating in 4K 8 bit 4:2:0 sources like those seen in sky gradients be eliminated using this method of colour depth re-processing when down rezzing to 1080P?
In 4:2:0 sky gradients, banding artifacts occur primarily in the chroma channels, which are subsampled at half the horizontal and vertical resolution of the luma channel. That means that what you're seeing in 4K is effectively 1080p in chroma resolution. If you do an 8-bit 4:2:0 4K virtually lossless conversion to 10-bit 4:4:4 1080p, the 8-bit numerical precision and spatial resolution of those chroma banding artifacts is preserved unchanged. So in this particular case, banding artifacts are not improved since the chroma channels remain 8-bit and the 10-bit 1080p luma channel provides no additional detail in the sky gradients.
 
For what it's worth, shot some high altitude blue skies this weekend and in 4k there is little to no perceptible banding once scaled to 1080.
 
In 4:2:0 sky gradients, banding artifacts occur primarily in the chroma channels, which are subsampled at half the horizontal and vertical resolution of the luma channel. That means that what you're seeing in 4K is effectively 1080p in chroma resolution. If you do an 8-bit 4:2:0 4K virtually lossless conversion to 10-bit 4:4:4 1080p, the 8-bit numerical precision and spatial resolution of those chroma banding artifacts is preserved unchanged. So in this particular case, banding artifacts are not improved since the chroma channels remain 8-bit and the 10-bit 1080p luma channel provides no additional detail in the sky gradients.

Thanks....that was what I suspected. Looks like the only effective way to eliminate this problem is to source 4K via 10 bit 4:2:2 HDMI output to an external 4K recorder....at least we have that option now.
 
For what it's worth, shot some high altitude blue skies this weekend and in 4k there is little to no perceptible banding once scaled to 1080.

Thanks for the info.....I find this issue generally rears its ugly head during blue hour/twilight lighting conditions. Hopefully the new 4k 100Mbs codec retains a decent amount of sharpness at this time of day too as it can really turn to mush on 1080P GH1/GH2 footage I have shot in these conditions...even with hacked cameras.
 
So in summary it seems we do get the benefit of 10 bit luminance after a scaling down from 4K to 1080p but chroma information is essentially unchanged from the original 8 bit source material....can I use simple arithmetic and call it 9 bit 4:4:4? Hehe just kidding :thumbsup:

Thanks for the clarification Lpowell.
 
So in summary it seems we do get the benefit of 10 bit luminance after a scaling down from 4K to 1080p but chroma information is essentially unchanged from the original 8 bit source material...
Yes, chroma channels remain 8-bit, but instead of being subsampled in 4:2:0 format, the virtually lossless downscaling from 4K to 1080p converts the chroma channels into full-resolution 4:4:4 format.
 
Yes, statistically speaking, there is no loss in precision. The statistical precision of the summed result is 100 ml out of a maximum result of 10000 ml (4 x 2500 ml cylinders). While it's true that the worst-case summed measurement error could be close to 200 ml, it's statistically unlikely to be that large. If you collect many such measurements over time, the statistical likelihood of cummulative measurement error will come close to zero.

With the four-cylinder array, another source of measurement error is the uncollected rain that fell in the corners of the one-foot square. In that case, however, there is a consistent under-estimate of the total amount of rainfall and it can be corrected by a simple scaling adjustment.

http://en.wikipedia.org/wiki/Kahan_summation_algorithm

"In particular, simply summing n numbers in sequence has a worst-case error that grows proportional to n, ..."

"This example will be given in decimal. Computers typically use binary arithmetic, but the principle being illustrated is the same. Suppose we are using six-digit decimal floating point arithmetic, sum has attained the value 10000.0, and the next two values of input(i) are 3.14159 and 2.71828. The exact result is 10005.85987, which rounds to 10005.9. With a plain summation, each incoming value would be aligned with sum and many low order digits lost (by truncation or rounding.) The first result, after rounding, would be 10003.1. The second result would be 10005.81828 before rounding, and 10005.8 after rounding. This is not correct.
However, with compensated summation, we get the correct rounded result of 10005.9."

Now, realise you already lost 2 bits in precision to start with.

In the cylinder example, the worst case error could be 200 ml, because you either truncate all (near) 50 values or round them up to 100.
You end up with either 0 or 400.

http://en.wikipedia.org/wiki/Accuracy_and_precision

So, if I understand correctly, your accuracy is plus or minus 200, so the range is 400.
 
In the cylinder example, the worst case error could be 200 ml, because you either truncate all (near) 50 values or round them up to 100.
You end up with either 0 or 400.

http://en.wikipedia.org/wiki/Accuracy_and_precision

So, if I understand correctly, your accuracy is plus or minus 200, so the range is 400.
You're still focusing on arithmetic and ignoring the dominant role that statistical analysis plays in processing of quantized image data. As I pointed out in my rainfall collection example, the worst-case cumulative error in summing four calibrated containers is close to 200 ml. But the distribution of errors across that +/-200 ml range is far from uniform, and it's the standard deviation of that distribution that counts, not the maximum range. Here's an intuitive way to appreciate this principle:

With a six-sided die, the range of results is 1-6 with a uniform distribution of results across that range. When you sum the rolls of a pair of dice, however, the distribution of results is no longer uniform. The range is doubled, from 2-12, but as any Craps player knows, the odds of rolling 2 or 12 are much lower than rolling 6, 7, or 8. The latter result is actually 8 times more likely than the former. If you roll 4 dice at once, the range of results doubles again, but the distribution of results is clustered even more closely around the numerical average.

Statistically, this variation in distribution of results can be measured as the standard deviation, and in this case it becomes narrower as the number of summed dice increases (even as the maximum range of results increases). In the case of a camera sensor, that is why there is no statistical loss of precision in losslesly summing a cluster of 4 pixels together. And with thousands of 4-pixel clusters across the area of the sensor, the aggregated statistical measurement error is close to zero.
 
Last edited:
Back
Top