Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
![]() |
|
Thread Tools | Search this Thread | Display Modes |
![]() |
#1 | Link |
Registered User
Join Date: Feb 2011
Posts: 11
|
colorspace - DVD with odd luma range 16 to ca. 215 - how to correct?
I'm working with a DVD which has even the brightest luma values a bit low. Bright scenes look toned down, like the material is a little underexposed. I used
Code:
ColorYUV(analyze=true).Histogram("levels") Code:
Levels(0,1,235,0,255,coring = false) Here are some pictures of bright scenes. Original frame 533 (this frame seems to be an exception, see my explanation below): ![]() Corrected frame 533: ![]() Original frame 3890: ![]() Corrected frame 3890: ![]() Original frame 4454: ![]() Corrected frame 4454: ![]() Original frame 30368: ![]() Corrected frame 30368: ![]() Frame 533 is a rare exception. After the correction, the upper luma value extends well beyond 235, being 252 max. and 239 loose max. However, if I understand it correctly, the luma range is just a flag and the restricted range from 16 to 235 is used so that there is some overhead. Already the lower luma end does not stop at 16 but can be found at 11, 12 14, etc. The other bright scenes look alright with this correction, in my opinion. The maximum values are at 230, 231, 232. So still below but close to 235. Question 1: Is this just some film material with low brightness values deliberately used or am I seeing things correctly and this is a badly mastered DVD that is worthy of correction? Question 2: Is my way of correcting this the way to go about this or is there some better way to do it? Quesiton 3: The graphs of the corrected frames show some gaps. Can this be done without such gaps occuring, for example by converting to 16 bit or something like this? Question 4: Is it okay that the corrected frame 533 has a max. value way beyond 235? Will this be clipped when encoding as MPEG2 and the range set to 16 to 235? Last edited by Lariel22; 10th April 2021 at 17:58. |
![]() |
![]() |
![]() |
#2 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,216
|
1) +2) Some of it might be subjective, but you could argue some of those shots like explosion should be "brighter".
3) for gaps - levels(dither=true) , or smoothlevels 4) depends on the mpeg2 encoder. Overshoots are often seen on retail DVD's. You can adjust per scene too; you don't have to use 1 set of values for everything |
![]() |
![]() |
![]() |
#3 | Link |
Registered User
Join Date: Feb 2021
Posts: 119
|
I use OutRange to find the maximum and minimum luma values.
My simplified version of OutRange: Code:
Function OutRange2(clip c, float "thr", bool "Y", bool "U", bool "V", int "borders", string "filename") { thr = String(Default(thr, 0.0)) Y = Default(Y, true) U = Default(U, false) V = Default(V, false) br = Default(borders, 0) FN = Default(filename, "OutRange.log") Assert(Y || U || V, "OutRange: One of channel Y or U or V mast be true") Yeval = Y ? "ymax=YPlaneMax("+thr+") ymin=YPlaneMin("+thr+")" : """ "" """ Ueval = U ? "umax=UPlaneMax("+thr+") umin=UPlaneMin("+thr+")" : """ "" """ Veval = V ? "vmax=VPlaneMax("+thr+") vmin=VPlaneMin("+thr+")" : """ "" """ wriY = Y ? """ "YMax = " + String(ymax) + "; YMin = " + String(ymin) """ : """ "" """ wriU = U ? """ "UMax = " + String(umax) + "; UMin = " + String(Umin) """ : """ "" """ wriV = V ? """ "VMax = " + String(vmax) + "; VMin = " + String(vmin) """ : """ "" """ expe = Yeval + Chr(10) + Ueval + Chr(10) + Veval expw = wriY + String(Y && (U || V) ? """ + "; " + """ : """ + "" + """) \ + wriU + String(U && V ? """ + "; " + """ : """ + "" + """) \ + wriV c.Crop(br, br, -br, -br) FrameEvaluate(expe) WriteFile(last, FN, "current_frame", """ ": " """, expw) } Code:
LWLibavVideoSource("C:\MV02\VideoFile.mkv") Import(C:\AVS\OutRange.avsi") OutRange2(thr=0, Y=true, U=false, V=false, borders=10, filename="OutRange.log") To smooth the levels on the graphs use the SmoothLevels filter, this is the easiest way. Or a combination of filters after Levels(...): Code:
UnDot() MiniDeen(radiusY=1, radiusUV=1, thrY=10, thrUV=12, y=3, u=3, v=3) f3kdb(preset="low/nograin", sample_mode=2) Last edited by Arx1meD; 11th April 2021 at 12:37. |
![]() |
![]() |
![]() |
#6 | Link |
Registered User
Join Date: Nov 2004
Location: Poland
Posts: 2,831
|
Yep, no idea why you assume it has to be pushed to the edge. Final look was established during grading process. You just create your own version. I don't see anything better there (brighter doesn't mean better).
Overshoots are basically always there when you use lossy compression. Even intermediate codecs like ProRes, DNxHR do it. It's not that big deal (unless you sending it to broadcast). You could have whole 90 minutes movie with max luma at eg 200. It can happen and no need to "fix it". Last edited by kolak; 11th April 2021 at 16:34. |
![]() |
![]() |
![]() |
#7 | Link |
Big Bit Savings Now !
Join Date: Feb 2007
Location: close to the wall
Posts: 1,356
|
And to add to that, lariel22, Levels made holes in your histogram.
no dither -> unpopulated values -> banding. If you must stretch you may consider SmoothAdjust, this dithers well. frame 533 looks already blown out to me after your stretch, well this depends on mapping of the display anyway.
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain) "Data reduction ? Yep, Sir. We're working on that issue. Synce invntoin uf lingöage..." |
![]() |
![]() |
![]() |
#8 | Link |
Registered User
Join Date: Feb 2011
Posts: 11
|
Sorry for the late reply and thanks a lot for all your input!
So I guess I will use SmoothLevels. I was pondering why I think that the levels are off. I simply remember them being brighter when seeing this show on TV. I remembered that I also have TV recordings of the show, even from two different countries. Both confirm my assumption. See for yourself. The following is the exact same frame (despite the frame numbers being slightly apart). ![]() ![]() The first is from DVD, the second from TV capture. In the first you can hardly guess what the color of the barrel on the right is, while in the second you can clearly see that it is blue. |
![]() |
![]() |
![]() |
#9 | Link |
Registered User
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,378
|
I think you are correct, stretching the the range with dithering is probably a good idea. I would be careful to not overdo it though, less is more.
![]()
__________________
madVR options explained |
![]() |
![]() |
![]() |
#10 | Link |
Registered User
Join Date: Mar 2009
Location: Germany
Posts: 5,769
|
I would rather keep the TV capture, it certainly has a better resolution (details) however, then, one has to be careful when using screenshots to compare various videos (there is first the 16-235 vs 0-255 issue, then, for US NTSC the issue of pedestal).
The "reds" are washed out in the TV capture, though. Probably a hue issue, easily to be corrected.
__________________
Born in the USB (not USA) |
![]() |
![]() |
![]() |
#11 | Link |
Registered User
Join Date: May 2006
Posts: 3,964
|
It's problematic to make judgements based on a single frame only, but for archiving I would definitely keep the retail (DVD) variant and make any tweaks (brightness, contrast, saturation) during viewing on the PC or TV as you prefer.
The TV version has clipped blues (e.g. the sky), and the black level of the active picture appears to be offset too high. The picture looks washed to me (e.g. the red light on the police car). The TV variant also tends to producing illegal RGB triplets when decoded to RGB (sky for example), although it's minor for this picture, and it depends on the player how 'smart' these violations will be dealt with for playback. Edit: The TV variant looks perhaps sharper but it has sharpening artefacts like halos, best seen on vertical edges. I don't see more real details. Last edited by Sharc; 15th May 2021 at 08:54. |
![]() |
![]() |
![]() |
Tags |
colorspace, luma |
Thread Tools | Search this Thread |
Display Modes | |
|
|