View Full Version : 4:2:0 becomes 4:4:4 when scaled?
kolak
1st June 2015, 10:56
Hi,
Does 4:2:0 UHD provides close to 4:4:4 HD file when scaled to HD?
Bloax
1st June 2015, 12:09
If you store the original UV channels to separate Y channels and store then in YV24, halve the resolution of the UHD source, convert it to YV24 and then use the original UV channels then yes, it should be pretty close to 4:4:4.
source()
ou=utoy().converttoyv24()
ov=vtoy().converttoyv24()
Spline36Resize(Width()/2,Height()/2)
YToUV(ou,ov,last)
Converting it to YV24 and downscaling apparently doesn't give the same results. Hehe.
Reel.Deel
1st June 2015, 13:00
Assuming MPEG2 chroma placement, one correct way to do it is like this:
Y = ConvertToY8().Spline36Resize(width/2, height/2, src_left=-0.50, src_top=0)
U = UToY8()
V = VToY8()
YToUV(U, V, Y)
With this method only the luma plane is resampled and it's also correctly shifted to coincide with the original chroma. If you're dealing with MPEG1 chroma placement (for example a JPEG picture) then just set src_left=0. For more information read this thread (http://forum.doom9.org/showthread.php?t=170029) I started some time ago, it really turned out to be quite informational.
kolak
1st June 2015, 13:00
Thanks, so it's possible to be close to 4:4:4, but not with "standard" downscale approach.
Reel.Deel
1st June 2015, 13:15
There's quite a few people doing this with the Panasonic GH4 (http://www.eoshd.com/2014/02/discovery-4k-8bit-420-panasonic-gh4-converts-1080p-10bit-444/). For probably better results you can substitute Spline36Resize for Dither's gamma aware resizing.
foxyshadis
1st June 2015, 13:18
Converting it to YV24 and downscaling apparently doesn't give the same results. Hehe.
If you correctly convert to YV24 in the first place, then there is no difference! Even if you have wrong offsets, the difference is so minute when downsizing that you'd need a microscope to tell, especially in motion.
Reel.Deel
1st June 2015, 13:19
Thanks, so it's possible to be close to 4:4:4, but not with "standard" downscale approach.
What do you mean by "standard" downscale? 4k YV12 --> 1080P YV12 --> 1080P YV24?
Edit: or do you mean 4k YV12 --> 4K YV24 --> 1080P YV24?
Reel.Deel
1st June 2015, 13:28
If you correctly convert to YV24 in the first place, then there is no difference! Even if you have wrong offsets, the difference is so minute when downsizing that you'd need a microscope to tell, especially in motion.
That may be true but converting to YV24 first and then downscaling to 1080p just adds unnecessary processing to the chroma. That's why I prefer the method in post #3.
kolak
1st June 2015, 13:48
What do you mean by "standard" downscale? 4k YV12 --> 1080P YV12 --> 1080P YV24?
Edit: or do you mean 4k YV12 --> 4K YV24 --> 1080P YV24?
Hmmm, I think I assume: 4k YV12 --> 1080P YV12 --> 1080P YV24?
kolak
1st June 2015, 13:53
There's quite a few people doing this with the Panasonic GH4 (http://www.eoshd.com/2014/02/discovery-4k-8bit-420-panasonic-gh4-converts-1080p-10bit-444/). For probably better results you can substitute Spline36Resize for Dither's gamma aware resizing.
My question is actually related to GH4.
8bit becoming 10bit is "not so easy" :) I assume you can interpolate and improve bit depth, but it will never be real 10bit and you need to know how to do it. David talks about Cineform codec (which has such an option), but this info spread over the net as GH4 4K 8bit 4:2:0 footage, can became 4:4:4 HD 10bit :)
Reel.Deel
1st June 2015, 14:14
For 4k YV12 to 4K YV24 try Nnedi3_resize16 (http://avisynth.nl/index.php/Nnedi3_resize16). This will upscale the chroma with nnedi3 and Dither_resize16. You can even output RGB48 and then save it to 16-bit PNG with AvsPmod.
nnedi3_resize16(width, height, output="YV24", tv_range=true, lsb_in=false, lsb=true, cplace="MPEG2", matrix="709", dither=6)
kolak
1st June 2015, 14:50
Is that the best to create fake 10bit?
How much improvements for grading can some cleaver 8->10bit conversion bring for 50Mbit h264 source?
feisty2
1st June 2015, 15:55
a cool way to fake 10bpc is denoising slightly, convolution, kinda (obviously not the exact) the reverse process of rounding/dithering from high bit depth
Reel.Deel
1st June 2015, 19:08
How much improvements for grading can some cleaver 8->10bit conversion bring for 50Mbit h264 source?
That's a loaded question, there are lots of variables at play here. Without a sample, we really can't give you an accurate answer. 50Mbit for 4k? Wow, that's kinda low, my hacked GH2 does 1080p at 150Mbit.
Anyways, like feisty2 already said, I would try lightly denoising, at 50Mbit I would image that there's probably some light compression artifacts. The following plugins/scripts can turn 8-bit into 16-bit by denoising.
dfttest (http://forum.doom9.org/showpost.php?p=1386559&postcount=3)
KNLMeans (http://forum.doom9.org/showthread.php?t=171379)
SMDegrainMod (http://forum.videohelp.com/threads/369142-Simple-MDegrain-Mod-v3-0d-A-Quality-Denoising-Solution)
MVTools (mod16) (http://forum.doom9.org/showpost.php?p=1386559&postcount=3)
After denosing you can even do some light debanding also (if needed).
flash3kyuu_deband (http://forum.doom9.org/showthread.php?t=161411)
GradFun3 (part of the dither package)
There's is lot of possibilities to go about this. But as always, the most important factor is the condition of the source.
Can you please upload a small sample, if not possible maybe just a picture of the source with Histogram("luma")? I would like to see how the gradients look.
kolak
1st June 2015, 23:33
Thanks. Here is some HD sample:
http://we.tl/KN7x5ATzqW
low contrast/saturation and sharpness. Comes from Sony RX-100M3, which is a great camera. You can push it quite a bit, but I wonder if it can be improved even further, by "making it 10bit". I'm mainly interested in improving gradation in shadows, skies etc. after heavy lift.
50Mbit is quite generous (as you said- yours is hacked). Typical value would be <30Mbit for HD.
Asmodian
2nd June 2015, 00:05
I like the results from dither tools. This also allows 16 bit output which can be fed to x264 to keep a tiny bit of the extra data from the UHD luma.
Dither_convert_yuv_to_rgb (matrix="709", output="rgb48y", lsb_in=true)
Dither_y_gamma_to_linear (tv_range_in=false, tv_range_out=false, curve="709", sigmoid=true)
Dither_resize16nr (1920, 1080, kernel="spline36")
Dither_y_linear_to_gamma (tv_range_in=false, tv_range_out=false, curve="709", sigmoid=true)
r = SelectEvery (3, 0)
g = SelectEvery (3, 1)
b = SelectEvery (3, 2)
Dither_convert_rgb_to_yuv (r, g, b, matrix="709", output="YV24",lsb=true)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.