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. |
5th May 2009, 19:10 | #881 | Link | |
Registered User
Join Date: Jul 2004
Location: ILLINIOS
Posts: 50
|
Quote:
MAK |
|
5th May 2009, 19:14 | #882 | Link | |
Registered User
Join Date: Jan 2009
Location: UK
Posts: 403
|
Quote:
|
|
5th May 2009, 21:23 | #884 | Link | |
Registered User
Join Date: Feb 2006
Posts: 293
|
Quote:
On other note, I use Bilinear with madVR (on both) right now because that's the only way I can get smooth playback fullscreen. If I had a choice, I probably go with lanczos4 or one of spline. Mainly because I mainly watch anime, so I prefer it sharp (but not with sharpening). madVR 0.9 certainly improve to the point that I can use Softcubic for SD contents (~35-38ms render time). So not all my hope is lost yet, maybe
__________________
Spec: Intel Core i5-3570K, 8g ram, Intel HD4000, Samsung U28D590 4k monitor+1080p Projector, Windows 10. |
|
5th May 2009, 21:40 | #885 | Link | |
Registered Developer
Join Date: Sep 2006
Posts: 9,140
|
Quote:
Interestingly the colors in your madVR 0.9 screenshot are now similar to EVR. So probably your EVR settings were correct all the time... |
|
5th May 2009, 21:53 | #886 | Link | |||
Registered User
Join Date: Apr 2009
Posts: 1,019
|
Quote:
Quote:
Quote:
Here's a few examples taken from the same images. (at 10x) 4, then 8: |
|||
5th May 2009, 21:58 | #887 | Link |
Registered User
Join Date: Apr 2008
Posts: 1,106
|
Just butting in to say keep up the good work. Great stuff being done in here. madshi did you manage to get a dvd sample yet, my bb has been slowed due to going over my download limits so might be 3-4 days until I can upload a dvd (requested by testuo) for you to test / fix the macrovision errors people get playing dvd's from hdd.
EDIT: With all of the discussion about different algorithms, when madVR is being improved / finalized, if different algorithms are generally agreed to be best (produce closes to original) for upscaling and downscaling, will madVR have a smart setting or some sort of Auto, which can select the best method based on what is being done. I am always concerned with new work like this, that an auto setting is put in there for those of us who want the benefits, without having to do lots of research on the best settings. Would a type of auto setting be a good idea out of the bag? Cheers. Last edited by mark0077; 5th May 2009 at 22:02. |
5th May 2009, 22:34 | #888 | Link | |
Hi-Fi Fans
Join Date: Dec 2008
Posts: 222
|
Quote:
And it's a commerce software. You can learn from here: http://www.nvidia.com/object/dvd_decoder.html |
|
6th May 2009, 00:01 | #889 | Link |
Registered User
Join Date: Sep 2004
Posts: 1,295
|
Maybe it's a good idea...
From the formulas: Y' = Kr*R' + Kg*G' + Kb*B' Pb = B' - Y' Pr = R' - Y' Cb = 0.5 + Pb Cr = 0.5 + Pr then Cb = 0.5 + B' - Y' Cr = 0.5 + R' - Y' You could try this, considering 2x2 pixels in YV12: 1)Using the Y' values from all 4 pixels, calculate the equivalent Y'eq value using the same method that is used for the chroma downsampling (this could be a problem, because there are more than one method...). 2)Calculate B' = Cb + Y'eq - 0.5 and R' = Cr + Y'eq - 0.5. 3)Upsample B' and R' values instead of Cb and Cr like you are doing now. 4) Calculate the Cb and Cr values using the upsampled B' and R' and the Y' values of each pixel. This is just a quick thought, so maybe it's just a very dumb idea... Last edited by yesgrey; 7th May 2009 at 11:37. Reason: Correction of the formulas in 2) |
6th May 2009, 07:50 | #890 | Link | |
Registered User
Join Date: Apr 2007
Posts: 220
|
Quote:
Destination_chroma_for_pixel_p=Sum(Ci*(Sum_up_to_i(L)/Sum_all(L))) p is in the middle of the tap window. This ensures that the weights are monoton increasing and normalized in total to 1. Then the chroma info is resampled using these weights. Naturally this should be extended to the vertikal res as well, and it one could refine it by subsampling on a 0.5 pixel raster as the luma deltas are shifted by 0.5 pixels. Also the linear interpolation can easily be extended to bicubic, lanczos etc. The last thing to think about is how to actually weight the chroma channels: do in rgb light, or UV or normal RGB. But i hope you get the idea... NOTE: It just occured to me that the designers of YUV were pretty clever in coding chroma as differentials. When upscaling these with anything better than point sampling to 4:4:4 one could get the same results as above much easier. So an alternative pipeline would be to upscale YUV 4:2:2 to YUV 4:4:4 and only then convert/upscale to the target RGB resolution. Or directly upscale the chroma differentials to the target res. This might be easier then the above. So i might just have reinvented the wheel. Any thoughts on that? Other ideas? Last edited by Casshern; 6th May 2009 at 08:18. |
|
6th May 2009, 08:25 | #891 | Link | ||||
Registered Developer
Join Date: Sep 2006
Posts: 9,140
|
Quote:
No. Quote:
Quote:
(1) I understand Cb and Cr in your math above are still from the gamma corrected Y'CbCr, right? Maybe we should designate them Cb' and Cr', although that's wrong. Or maybe we should find a new name for them? (2) What is "Pb" and "Pr" and "Kr/g/b"? (3) You seem to be calculating B' and R' (gamma corrected blue/red), but without using any of the Rec601/709 coefficients. Wouldn't that result in incorrect results? (4) You totally ignore G'. How can you recalculate Cb and Cr without using G'? I just don't fully understand what your formulas are doing and why. Could you please explain? Thanks! Quote:
But more importantly: I still don't see the physical/scientific reasoning for doing what you suggest. Now I don't have free time to spare. So I can't really afford to spend hours and hours on an algorithm without even understanding *why* it should be better in theory. So could you please spend a few lines on explaining why your formula should produce better results? Well, that is exactly what all the better chroma upsampling algorithms out there (including madVR) are already doing! |
||||
6th May 2009, 08:29 | #892 | Link | |
Registered User
Join Date: Aug 2008
Posts: 176
|
Quote:
And if we did like this: 1) See above (downsample Y' --> Y'eq) 2) Transform between Y'eqCbCr --> R'G'B' (1/4 of source pixels) 3) Upsample B', R' and G' values R'G'B' --> R"G"B" (back to initial number of pixels, we could call it upscaling in gamma corrected RGB space) 4) Correct R"G"B" luminance using exact Y' values from the source Rc"=R"+d, Gc"=G"+d, Bc"=B"+d: Kr*(R"+d) + Kg*(G"+d) + Kb*(B"+d)=Y', d=(Y'-(Kr*R"+Kg*G"+Kb*B"))/(Kr+Kg+Kb) 5) Degamma Rc"Gc"Bc" --> RGB 6) Scale 7) Gamma it RGB-->R'G'B' Last edited by nlnl; 6th May 2009 at 10:05. |
|
6th May 2009, 09:56 | #893 | Link |
Registered User
Join Date: Apr 2008
Posts: 1,106
|
madshi, I would have to disagree (albeit with my limited knowledge) that there is no "best" method out of a group of scaling techniques for a certain operation. How can this be. Isn't there something wrong with this statement.
If we are trying to create an image thats as close to the original as possible, then (maybe with the use of a camera or some other method) to compare the original image with the various scaled ones and do some sort of comparison on those to see which is closest. I can't think of a good way of doing this, maybe using a CRT, but to say there isn't a best method I think is wrong. One technique, at least for one specific image would be closer to the original (percieved by our eyes) than other methods. |
6th May 2009, 10:10 | #894 | Link |
Registered Developer
Join Date: Sep 2006
Posts: 9,140
|
@Mark, all the resampling filters are a compromise between aliasing, sharpness and ringing. There is no filter which is best in every category. E.g. Lanczos is the sharpest filter (good), but has the most ringng (bad). Look here:
http://forum.doom9.org/showthread.ph...90#post1272990 If ringing artifacts don't bother you, Lanczos is "best". If you hate ringing artifacts, Lanczos is "worst". So obviously there is no overall "best" filter. You may also want to reread the forum rules, especially rule 12. |
6th May 2009, 10:19 | #895 | Link |
Registered User
Join Date: Apr 2008
Posts: 1,106
|
Well thanks for the reply and link but mathematically one image WILL be closer to the original than another right? I am not breaking rule 12, I am just discussing something....... anyways, one image will be closer to the original than another I think, whether it would have one of the many negative effects you talk about. If part of the aim / point of madVR is to get us the original image in all of its glory, and as accurately as possible, then the whole idea of a users preference goes out the window.
OK fair enough when it comes to something that can't be done perfectly / exactly like resizing users will always have a preference, but I still think strongly that user preference should have as little impact / effect as possible if there is a way to measure how close to the original a scaled image is perceptually (and I'm sure your away of some technique for doing such a thing?). I hope you see what I am saying here. Last edited by mark0077; 6th May 2009 at 10:34. |
6th May 2009, 10:41 | #896 | Link |
Registered Developer
Join Date: Sep 2006
Posts: 9,140
|
Lanczos is nearer to the original, I believe. But it adds artifacts to the image which other filters don't (or do less). So regardless of whether you like it or not, it still is a matter of taste.
This is my last post about this topic for now. |
6th May 2009, 13:43 | #897 | Link | ||||
Registered User
Join Date: Sep 2004
Posts: 1,295
|
Quote:
From my understanding: Kr, Kg and Kb are the contributions or R', G' and B', when all they are equal to 1.0, that gives the white point as Y' = 1.0. (This in [0.0 1.0] range). Pb' and Pr' (they are not primed, but I will also use the prime symbol to avoid confusion with Pb, Pr when converting from linear RGB) are analog values. Cb' and Cr' are the designations when using them in the digital format. Pb' and Pr' are defined in the range [-0.5 0.5], so we need to add 0.5 to them to be defined in the range [0.0 1.0] and allow them to be used in the digital format Cb' Cr'. Quote:
The Rec601/709 only define the Kr and Kb coefficients. Kg is calculated from Kr+Kg+Kb = 1. The coefficients that we are used to, are calculated based on the formulas I gave above. Those three formulas can be translated into a matrix of coefficients. If you want more details on how to get the coefficients, see here: Quote:
Quote:
I think that my method should be pretty simple to try, because does not require significative changes by madshi. Then, if it gives any improvement, maybe we can think on more complex methods. |
||||
6th May 2009, 14:06 | #898 | Link |
Registered Developer
Join Date: Sep 2006
Posts: 9,140
|
But your formulas don't list any coefficients! You list Kr, Kg and Kb in the first line and then you just drop them and never use them again. Also your line "Pb = B' - Y'" doesn't match what I read in Wikipedia. There the "Pb" formular is much more complicated. You seem to have simply dropped the whole Kb coefficient! I'm confused...
|
6th May 2009, 15:10 | #899 | Link |
Registered User
Join Date: Apr 2007
Posts: 220
|
Good! I only proposed this because you wrote that chroma and luma upsampling is completely unrelated. If you do it on the chroma differentials (heres the "hidden" connection) everything is fine - and the result should be the same. The only room to improve would be to use a psychovisually more "accurate" definition of Y and the chroma components (maybe through RGB light - then something like i proposed might be necessary again), but i doubt it would make perceptible differences. So everything is good enough for me- keep up the good work!
Last edited by Casshern; 6th May 2009 at 15:14. |
6th May 2009, 16:30 | #900 | Link | |
Registered User
Join Date: Sep 2004
Posts: 1,295
|
Quote:
Pb' = B' - Y' Pr' = R' - Y' If you substitute Y' in Pb' and Pr' you'll get: Pb' = B' - (Kr*R' + Kg*G' + Kb*B') Pr' = R' - (Kr*R' + Kg*G' + Kb*B') But since Y' is already known, you can use it directly. The coefficients are used to calculate Pb' and Pr' from R', G'and B'; from Y' it would be a lot simpler. Also, Rec BT709 defines Kr = 0.2126 and Kb = 0.0722, and Rec BT601 defines Kr = 0.2990 and Kb = 0.1140. If you want to give it a try, just trust me for now, the formulas are correct. If you prefer to understand it first, I will continue to explain it to you. If you feel this is too off-topic let me know and I will PM you instead... I only think that the method I explained above should be pretty simple to try, because you already have all the math written; is just using it with different values, nothing more. |
|
Tags |
direct compute, dithering, error diffusion, madvr, ngu, nnedi3, quality, renderer, scaling, uhd upscaling, upsampling |
Thread Tools | Search this Thread |
Display Modes | |
|
|