Jump to content

Mac app to resample GH4 8 bit 4:2:0 to 10 bit 4:4:4


Thomas Worth
 Share

Recommended Posts

EOSHD Pro Color 5 for Sony cameras EOSHD Z LOG for Nikon CamerasEOSHD C-LOG and Film Profiles for All Canon DSLRs

Tested it my self a while back and found no benefit to grading so far. Although I haven't tested anything from this particular app since I am on windows. It was done using floating point pixel summing though.

What did you use for this?  Did it result in a 10-bit luma channel?

Link to comment
Share on other sites

Yes it did result in 10bit, 1024 potential values. I am a CG artist and TD so I actually did this in animation software, 3DS Max. It has a scripting language that supports per pixel image manipulation and I find it is the fastest way for me to whip something up for testing, slow to process though. It looks to me like the footage grades well as is and the conversion just artificially increases color precision, but since it doesn't add any more dynamic range it doesn't make a very large difference. My initial impressions, could still be proven wrong. 

Link to comment
Share on other sites

So I have come to the conclusion that while it is mathematically possible to convert 4k 8bit to HD 10bit this 10bit is artificial and therefor doesn't offer the same grading benefits as true 10bit would. I will try to explain why.

 

8bit has 256 possible values 10bit has 1024 values, 4 times more. Going from 4k to 2k you are reducing the number of pixels by 4 hence 4 pixels are merged to make 1. If you take 4 8bit values and average them in floating point then multiply that value by 4 to transform it into a 10 bit range you will get the same result as if you just add all 4 values together. (p1+p2+p3+p4)/4 * 4 = p1+p2+p3+p4.

 

Example.

 

If I had a perfectly evenly lit scene and filmed it to true 10 bit it may end up with a 10bit value of 801.

Convert 10bit 801 to 8bit: 801/4 = 200.25 this becomes 200 since values must be integers.

Take 4 8bit values and make 1 10bit: 200+200+200+200 = 800.

 

So by down sampling and converting to 10bit I would be getting a value of 800 when that value would have been 801 if it was originally recorded to 10bit. This means that there is an error when performing this down sampling and my initial impression is that this error is equal to the gained precision you get from going 8bit to 10 bit, +- 3.

 

My conclusion is that while there is an increased numerical precision there is not a increased color accuracy therefore there is no real benefit for color grading. The resulting 10bit image does not more accurately represent what was recorded than the original 8bit did, same amount of error. 4:4:4 is the only benefit I can see.

Link to comment
Share on other sites

My conclusion is that while there is an increased numerical precision there is not a increased color accuracy therefore there is no real benefit for color grading. The resulting 10bit image does not more accurately represent what was recorded than the original 8bit did, same amount of error. 4:4:4 is the only benefit I can see.

 

Which begs the question if there's any benefit at all.  If it's not more gradable, if it doesn't significantly reduce macroblocking and other compression artifacts, if it doesn't significantly reduce digital noise then what are you left with?  Chroma smoothing and interpolation to some approximation of a full color signal can be done without a reduction in spatial resolution.  The resize technique was more or less a cheap/fast way to get there that really only ticks the box for smoother, interpolated chroma.  It trades capture resources for a simplistic but still multi-step pre-grade workflow.  

 

I'm all for being clever, but this isn't really that.  At least not yet.  Half of what folks are observing, as far as chroma smoothness goes, has to do with gh444 transcoding in a, I think it's safe to assume, very 5DtoRGB way which already does a better job than Adobe does, for instance.  Then a reduction of spatial resolution makes error near problem edges that much smaller and filtered again.

Link to comment
Share on other sites

Convert 10bit 801 to 8bit: 801/4 = 200.25 this becomes 200 since values must be integers.

Take 4 8bit values and make 1 10bit: 200+200+200+200 = 800.

 

I see no reason why we would be constrained to integers...

 

Sorry, I didn't understand what you were getting at initially.  This is a good point.

Link to comment
Share on other sites

So I have come to the conclusion that while it is mathematically possible to convert 4k 8bit to HD 10bit this 10bit is artificial and therefor doesn't offer the same grading benefits as true 10bit would.

 

This is correct.  I commented on this in a couple other threads. I'm not on a mac and I didn't want to keep hammering the point w/o posting some sort of test that uses this app, to show what really happens with visible 4:2:0 artifacts.

 

It's not so useful to start with good looking footage, a gradient or color chart would be better.

 

The confusion is in thinking that all we need to do is re-sample pixels to get "true 10bit 4:4:4", but in fact what we would really need to do is re-sample the original light, which of course is not possible...  You WILL get a little anti-aliasing from this technique, which might help reduce the appearance of noise, or it might make the scene too soft. This is not a good way to capture 10bit 2k though... you still want to use the HDMI out on the GH4, or some other solution, to have footage that contains 1024 levels of luma information (or close) from the original scene.

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...

Ok, so the app by Thomas and GUI by James_H works really well. But if we have to take the dpx files to Resolve isn't it just the same thing taking the original 4K footage from GH4 to resolve and convert to ProRes (after color correction etc)?

 

Sure, the app might make a wonderful 10-bit conversion, but the other way you have the advantage to color correct the original 4K footage and only then convert to ProRes for editing. I'd love to hear about a proven workflow with the GH4 from 4K to FHD. Because also if you have a lot of footage it makes much more sense to grade only after editing (which on the other hand is easier in FCPX with ProRes format...)

Link to comment
Share on other sites

Ok, still no replies. Let me rephrase the question:

 

What is the best method to convert GH4 4K footage to 1080p ProRes? And has anybody managed to convert the dpx from Thomas's Mac App to a 10-bit ProRes 444?

There are many ways to convert either DPX or the native 4K h.264 .mov files to 1080p. Most good software will allow you to select the reduction algorithm for best possible results. Personally I use Nuke or Adobe Media Encoder CC or Apple Compressor or After Effects or alternatively you can just set up a NLE timeline for 1080p and scale the clip to fit the sequence - like in Adobe Premiere CC. The quality of the transcode is determined by the scaling algorithm used: Cubic, Lanczos4 or Lanczos6 are good depending on the sharpness you require. You can even use Photoshop CC to import the DPX sequence, downscale using the Bicubic Sharper algorithm and render out a ProRes file.

Link to comment
Share on other sites

Ok, thanks guys! So, just to be sure: first convert the 4K files to DPX with Thomas's great app, then use Resolve to make ProRes files out of the DPX sequences? And the ideal settings in Resolve are ProRes 444? Also, should I do the grading and color correction in Resolve before the ProRes conversion?

Link to comment
Share on other sites

Which begs the question if there's any benefit at all.  If it's not more gradable, if it doesn't significantly reduce macroblocking and other compression artifacts, if it doesn't significantly reduce digital noise then what are you left with?  Chroma smoothing and interpolation to some approximation of a full color signal can be done without a reduction in spatial resolution.  The resize technique was more or less a cheap/fast way to get there that really only ticks the box for smoother, interpolated chroma.  It trades capture resources for a simplistic but still multi-step pre-grade workflow.  

 

 

 If you run the 4K image through a suitable low pass filter (blur it a bit - something like a .6 pixel gaussian blur should be about right) before downsampling to 2K, you will reduce the noise in the image and enhance the dynamic range (which is limited by the noise you can tolerate in the shadows).  I can't say if there will be a benefit in color bit depth and color grading, but I'm pretty sure about the noise issue. I've verified this in the past with still images from digital cameras and the principles are the same.

When you downsample an image without first using a low pass filter, a lot of the image noise gets passed through as aliasing rather than getting reduced by pixel averaging as it should be.  Most downsizing algorithms place an emphasis in preserving perceived sharpness and will introduce aliasing in images where it wasn't there before downsizing.

Link to comment
Share on other sites

BTW, you can trade resolution for bit depth.  I did this experiment some time ago, converting a 2bit black and white image of very high spatial resolution (10,000 pixels wide I think) to a much lower resolution 8 bit full tone image.  You can get a true continuous, full tone 8 bit image that way. 

Remember folks, that black and white film has no gray tones.  It simply has different densities of opaque silver embedded into a largely transparent film base.  If you've ever used a grain focuser in a darkroom, you are well aware of the true "black" and "white" nature of film.

 

How this applies to the GH4 and 4K to 2K conversions remains to be seen.  After all, the GH4 4K image is created from a CFA (Bayer Mask) array that only has one red, one blue and two green pixels for every quad of pixels on the sensor.  So each 4K image sensor is already borrowing/interpolating from neighboring pixels.  Plus, There's an AA filter that softens the image before hitting the sensor, and the luminance needs to be interpolated from the four colored pixels.  A native, full resolution image from such a sensor isn't exactly information dense like you might get from a  3CCD video camera.

 

But when converting from a 4K to 2K image, You have two green, one red and one blue color sample for each pixel.  So if the encoding of the 4K image doesn't do too much damage, the resulting 2K image should be of a fairly high quality.  Of course, information is lost and we shouldn't expect a converted 4K from an AVC/.h264 codec to equal what could be captured directly via either HDMI or SDI without such a compression stage. I'd strongly suspect that anybody shooting 4K with the intent of downrezzing to 2K seriously consider using as little sharpening as possible since sharpening actually removed information, introduces artifacts, accentuates noise, and generally makes it more difficult for the compression CODEC to do a good job.

It will be interesting to see which workflows turn out to be the best.  For me, my main interest is in getting a good quality 1080p image for the green screen work that we sometimes do.  I'm pretty hopeful that the GH4 will do well with that. I'll be doing some testing soon. 

 

The image on the right is the same exact 2 bit image you see in the middle.  It is just reduced for display by a factor of 25.

 

quantum_sensor_simulate.jpg

Link to comment
Share on other sites

  • 1 month later...

Hey Guys

 

 

Anyone have figure out how to do this on  windows?

 

Cant find a way to do pixel summing thing

 

I tried the apps on a mac and it really works...but cant get that result on a pc

 

would appreciate a solution!

 

Thanks

Link to comment
Share on other sites

Thanks for creating this App Thomas, really like how it's quick and easy to use. I found the color the app is putting out better than what I'm getting from After Effects. 

 

Some other people mentioned they found frames being dropped, I also found this was happening. On a 732 frame clip I ended up with a total of 728 dpx images. This was a 24fps clip. 

 

If the frame dropping issue was fixed and it could out put ProRes 4444, this is an app I would be happy to pay for. 

 

Thanks again for taking the time to build this!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • EOSHD Pro Color 5 for All Sony cameras
    EOSHD C-LOG and Film Profiles for All Canon DSLRs
    EOSHD Dynamic Range Enhancer for H.264/H.265
×
×
  • Create New...