cantsin Posted February 19, 2018 Share Posted February 19, 2018 Here's an approach to high-quality upsampling of 8bit to 10bit video material that I haven't seen mentioned before. We had several discussions on this forum whether 4K 8bit footage could be converted to 2K footage with higher color depth, but my approach is different, and doesn't result in loss of pixel resolution. First brought it up as a hypothesis on the German Slashcam forum, tested it, and voilà, it worked even better than I had expected: High-quality video noise filters (such as Neat Video Pro and the built-in noise filter of Resolve Studio) can do temporal denoising, by comparing several neighboring video frames and averaging pixels between them. If these filters internally work with 10bit or more color depth, they should average/interpolate these color values with more subtle gradations than available in 8bit, producing a picture with more than 8bit color depth. (The logic is the pretty much the same as with super resolution algorithms that compute a higher image resolution from adjacent frames. Only that this method affects color resolution instead of spatial resolution.) So I did the following: Downloaded Luke Neumann's out-of-the-camera test files of the GH5 from here, the ones that were shot with 180fps in 8bit 4:2:0 in V-log; imported the clip "Pete Fire Hand.MP4" into Resolve and dropped it into the time without applying any corrections; exported one frame as a 16bit uncompressed TIFF; ran Imagemagick's "identify" command on the command line to determine the number of its unique colors. It identified 17,210. [command syntax: "identify -format %k xy.tif"] applied Neat Video Pro (OFX plugin) to the clip, using only temporal noise reducation, with 5 reference frames and in the highest quality setting. exported the same frame as a 16bit uncompressed TIFF; ran Imagemagick's "identify" on the denoised frame; it now identified 1,194,446 unique colors. Both TIFF files can be downloaded from here: http://data.pleintekst.nl/chroma-upsampling.zip (13 MB) 1,1 million colors is still much less than the 24 million colors available with 8bit color depth. So, to check whether the temporal denoising had really interpolated the colors into a higher bit depth, I exported an uncompressed 8bit TIFF in Resolve and, in addition, used Imagemagick to convert the denoised 1.1 million color-16bit TIFF into a second 8bit TIFF. The two images contained 39.471 respectively 39.473 unique colors. This was the proof that most of those 1.19 million unique colors of the denoised 16bit TIFF were outside the 8bit color/gradation range. (This can already happen if you have a monochrome gradient with more than 256 gradations. So, theoretically, an image with only 257 unique colors can exceed 8bit color resolution.) 1.19 million is about 69 times 17,210. When jumping from 8bit to 10bit, there are two bits=2^2=4 times the values per color channel. In total, this amounts to is 4^3=64 times as many color values. So the jump from the original image to the denoised image is even slightly bigger than from 8bit to 10bit. If we take the noise-filtered 8bit image with its 39.473 unique colors as a reference instead, then the increase is still by factor 30=5bits, which would mean 9.67 bits per color channel. In other words, it's fair to call this a high-quality 8bit to 10bit upsampling. As opposed to dithering into higher bit depth, noise isn't added but even removed! Quote Link to comment Share on other sites More sharing options...
Mark Romero 2 Posted February 19, 2018 Share Posted February 19, 2018 Thanks for posting this. In the steps above you mentioned Neat Noise, but you also stated that the built-in nosie reduction of Resolve should work as well. Have you been able to test that out yet just to confirm? Also, in a real world workflow, would one apply the noise reduction effect on the Edit page to EVERY clip and then just go about grading on the color page as usual? I am not familiar with Neat Noise and I don't have the studio version of Resolve (just the free version), and am not sure if noise reduction is applied on Edit page or on Color page. Quote Link to comment Share on other sites More sharing options...
cantsin Posted February 19, 2018 Author Share Posted February 19, 2018 Justed tested temporal denoising with the built-in noise filter of Resolve Studio: This results in even 1.6 million unique colors, but with rather aggressive filter settings. (Neat yields higher image quality, in my opinion. It's not worth upgrading to Studio for the noise filter. The Neat plugin also works in the free version.) You apply the noise filter to nodes in the Color menu, no matter whether you use Neat Video Pro as an OFX effect or Resolve Studio's built-in denoiser. You get the best results if you set the filter parameters for each clips individually. But you can also define a group node, use one filter setting for all footage, and have that group node at the beginning of your color correction chain. (You should always denoise the ungraded footage first and apply all other corrections afterwards.) The group node work method also makes it easier to turn noise reduction on and off for all clips with a single click, for example, when you need realtime playback in editing. Quote Link to comment Share on other sites More sharing options...
majoraxis Posted February 19, 2018 Share Posted February 19, 2018 @cantsin, if you could post before and after images for the same frame, that would be appreciated. Thanks! Mark Quote Link to comment Share on other sites More sharing options...
cantsin Posted February 19, 2018 Author Share Posted February 19, 2018 4 minutes ago, majoraxis said: @cantsin, if you could post before and after images for the same frame, that would be appreciated. I already did, see the download link in my original post. The difference is only contained in the 16bit TIFFs and not really visible to the human eye (since these are ungraded log images). It wouldn't make sense to post the images here in the forum, since they would be downconverted to highly compressed 8bit JPEGs.... Quote Link to comment Share on other sites More sharing options...
cantsin Posted February 19, 2018 Author Share Posted February 19, 2018 To illustrate, here are two extreme grades of the same frame - the one with temporal noise reduction applied, the other without. You mostly see macroblocking from the codec (with the noise filter also somewhat reduces). But if you pay attention to color gradients such as the underside of the stair or on the surface of the kitchen drawer, you see where the 8bit color breaks apart and the noise filter smoothes it out. [View in 1:1 pixel size.] Quote Link to comment Share on other sites More sharing options...
Mark Romero 2 Posted February 19, 2018 Share Posted February 19, 2018 Thanks for all this. Would love it if anyone can do sort of a real world demo on a clip shot in slog with a sky that might have suffered from banding where this upsmapling is not used. (I would do it but I don't have neat noise nor resolve studio). Quote Link to comment Share on other sites More sharing options...
anonim Posted February 19, 2018 Share Posted February 19, 2018 Just to confirm that this orientation indeed have sense. In one of the topics about new lowlight capability of GH5s I upload the same shot done with GH5 but with Resolve's temporal NR, both at iso6400 - result is near identical. So, I expect that it is possible to smooth-up macroblocking artefacts, but, of course, result is - smooth. Neat Video temporal reduction is better, but much much slower than Resolve. Spatial NR of Resolve is extremely slow and demands very powerful computer to work. Quote Link to comment Share on other sites More sharing options...
Don Kotlos Posted February 19, 2018 Share Posted February 19, 2018 I dunno cantsin. I can't get past the codec limitations. For me, all this process doesn't really add anything. If you look at the hand there are terrible compression artifacts in both images, without any differences in color. Here is a comparison of few places with boosted saturation (top orig, bottom neat): I see mostly different compression. Here is the difference between the two frames: Orangenz and tellure 2 Quote Link to comment Share on other sites More sharing options...
hyalinejim Posted February 19, 2018 Share Posted February 19, 2018 In the denoised version there are a lot of macroblocks that simply don't get removed at all. AFAIK Neat Video has options to remove codec nasties - have you tried playing with those settings? Quote Link to comment Share on other sites More sharing options...
cantsin Posted February 19, 2018 Author Share Posted February 19, 2018 @Don & @hyalinejim - my post was actually not about compression artifacts and macroblocks. (Could have used Neat's spatial denoising to tackle them...) But it's only about how to best upsample 8bit to 10bit. Maybe the test footage wasn't wisely chosen, and I should rather have picked 8bit footage without these artifacts. Quote Link to comment Share on other sites More sharing options...
Attila Bakos Posted February 19, 2018 Share Posted February 19, 2018 For the banding removal mentioned earlier, when you have massive banding, it can be useful to add grain and then apply temporal noise reduction. I applied a very strong grade to one of my X-T2 F-Log clips here, to show some nasty banding (view in full size): Then I created a mask for the sky in Resolve, applied some heavy grain and then some heavy temporal noise reduction in Resolve's denoiser, and voilá. Obviously this will only work if you can mask out the problematic area and if there's no real detail there. deezid and Mark Romero 2 2 Quote Link to comment Share on other sites More sharing options...
Mark Romero 2 Posted February 19, 2018 Share Posted February 19, 2018 5 minutes ago, Attila Bakos said: For the banding removal mentioned earlier, when you have massive banding, it can be useful to add grain and then apply temporal noise reduction. I applied a very strong grade to one of my X-T2 F-Log clips here, to show some nasty banding (view in full size): Then I created a mask for the sky in Resolve, applied some heavy grain and then some heavy temporal noise reduction in Resolve's denoiser, and voilá. Obviously this will only work if you can mask out the problematic area and if there's no real detail there. Thank you! Quote Link to comment Share on other sites More sharing options...
Don Kotlos Posted February 19, 2018 Share Posted February 19, 2018 @Attila BakosThis looks like a very good solution for banding. I had been trying just noise, but now I know that temporal noise reduction can clean it up nicely. Quote Link to comment Share on other sites More sharing options...
Attila Bakos Posted February 19, 2018 Share Posted February 19, 2018 Yeah, and btw it can be used in more difficult situations as well. Again, F-Log, very strong grade, banding and nasty pink patch: : Now there are the rooftop edges, branches, whatnot, and you don't want them to be affected. In Resolve I was able to do a very precise selection with the HSL selection tool. Just make sure you use zero or very minimal softening. Then I applied grain and then noise reduction. You have to play with the grain and noise reduction amount until it looks the best. At this step the pink patch was already better, but I changed it's hue to match the rest of the sky, then applied some midtone detail in the same mask, and arrived at this: Like it was shot in 10 bit Quote Link to comment Share on other sites More sharing options...
HockeyFan12 Posted February 19, 2018 Share Posted February 19, 2018 This is way above my head, but doesn't this have more to do with denoising being able to reduce macroblocking than it does with bit depth? The banding and color problems in all these shots seem to be from color profiles and compression artifacts, not bit depth. None of these image problems are primarily correlated with an 8 bit codec. They're far more to do with macroblocking. Both of the shots of the guy by the stairs, for instance, look awful and riddled with compression artifacts. Admittedly, the sunset does look a lot better, improved by what's a pretty clever trick. Generally, I feel like there's some "10 bit magic" that I don't see. My experience has always been that the strength of the codec and the color space and gamma assigned it is far more important than bit depth. The F5, for instance, still had a lot of banding in 10 bit XAVC or whatever the codec is, because the bit depth is too low and gamma too flat. (This has been improved upon since in future updates.) Denoising is definitely powerful! I've used it before to remove compression artifacts in similar situations. I just don't understand what bit depth has to do with it. It's macroblocking that's a far far bigger issue in all these examples. Unless my eyes deceive me... Inazuma 1 Quote Link to comment Share on other sites More sharing options...
cantsin Posted February 19, 2018 Author Share Posted February 19, 2018 I will make a better test with CinemaDNG source material from a Blackmagic Cinema Camera, downconvert it to a high-quality 8bit codec (DNxHR HQ), upsample it to 10bit with Neat, and see how it solves banding when grading the material. However, give me some time - this might take me a week to do. But that temporal NR spreads 8bit colors into 10bit by greatly increasing the number of unique colors, is a fact. Quote Link to comment Share on other sites More sharing options...
Attila Bakos Posted February 19, 2018 Share Posted February 19, 2018 My samples are from ProRes 422. 492Mb/s at 2160p25. Quote Link to comment Share on other sites More sharing options...
cantsin Posted February 19, 2018 Author Share Posted February 19, 2018 15 minutes ago, Attila Bakos said: My samples are from ProRes 422. 492Mb/s at 2160p25. Recorded with an external recorder, I guess? (So 8bit 4:2:2 ProRes without transcoding?) Quote Link to comment Share on other sites More sharing options...
Attila Bakos Posted February 19, 2018 Share Posted February 19, 2018 1 minute ago, cantsin said: Recorded with an external recorder, I guess? (So 8bit 4:2:2 ProRes without transcoding?) Yes, the frames are directly exported from Resolve. I believe banding would be much less visible in 10bit. The pink patch might not be related to 8bit though, but to some problem with the F-Log implementation in the X-T2. The red channel is very noisy and from the footage I've seen so far they fixed this problem with the upcoming X-H1. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.