Log in

View Full Version : FFT3DFilter 2.6


Pages : 1 [2] 3 4

pinterf
21st November 2018, 16:50
Download FFT3dGPU 0.8.4 - pfmod (https://github.com/pinterf/FFT3dGPU/releases/tag/0.8.4)
All 8 bit color spaces, except RGB24 and RGB32. For RGB use planar RGB instead.

**v0.8.4 (20181121)**
- New color spaces besides YV12 and YUY2:
Y8, YV16, YV411, YV24 (all 8 bits), 8 bit Planar RGB (Avisynth+)
- FFT3dGPU filter registers itself as MT_SERIALIZED automatically for Avisynth+: no need for SetFilterMTMode.

**v0.8.3 (20181118)**
- project hosted on https://github.com/pinterf/FFT3dGPU
- source and project files updated to build under Visual Studio 2017 (15.9) using DX SDK June 2010
- Moved to Avisynth Interface 6 (v2.6) - using headers from the Avisynth+ project
- added x64 platform

**v0.8.2 (x86: 2006, x64: 2010)**
- Initial source: 0.8.2

tormento
21st November 2018, 21:17
Download FFT3dGPU 0.8.4 - pfmod (https://github.com/pinterf/FFT3dGPU/releases/tag/0.8.4)
Much better to split this in its own thread or create a new one.

Or not? :D

almosely
30th January 2019, 04:12
Hi,

I just migrated from AVS 2.6.0 x86 MT to AviSynth+ 2772 MT x64 and tested the version 2.5, 2.4 and 2.3 of your FFT3DFilter (with FFTW 3.3.8 AVX).

Do I have to change my colorspace (I am using YUV/YV12) or am I doing anything wrong, because the luma changes dramatically even without setting any value; the same applies for your filter within AVS 2.6.0. Till now I used FFT3DGPU 0.8.2 and there was everything okay; also with 0.8.4 seems everything to be alright.

1. Original
2. FFT3DFilter 2.5 (somewhat dithered, brightened and darkened or something like that; is there a problem with colorspace- or bit-depth-conversion?)
3. FFT3dGPU 0.8.4

These are the corresponding avs-lines:

FFT3DFilter(sigma=0.1, beta=1.0, bw=32, bh=32, sharpen=0.0, scutoff=0.27, plane=0, bt=3)

FFT3DGPU(sigma=0.1, beta=1.0, bw=32, bh=32, sharpen=0.0, scutoff=0.27, wintype=0, plane=0, bt=3, precision=2)

Histogram("luma")

pinterf
31st January 2019, 11:36
Hi almosely,

first, I noticed something. What can you see for this clip? On my machine it's like FFT3dGPU is keeping the left half of the picture untouched.
tested with FFT3DGPU 0.8.2 to 0.8.4

EDIT: my source was not mod4 width, seems that output is corrupted for such width values

Function Diff(clip src1, clip src2)
{
return Subtract(src1.ConvertBits(8),src2.ConvertBits(8)).Levels(120, 1, 255-120, 0, 255, coring=false)
}
c = any yv12 source (non-mod4-width)

clip1=c.FFT3DFilter(sigma=0.1, beta=1.0, bw=32, bh=32, sharpen=0.0, scutoff=0.27, plane=0, bt=3)
clip2=c.FFT3DGPU(sigma=0.1, beta=1.0, bw=32, bh=32, sharpen=0.0, scutoff=0.27, wintype=0, plane=0, bt=3, precision=2)
#clip11=clip1.Histogram("luma")
#clip22=clip2.Histogram("luma")
#StackHorizontal(clip1, c)
#Diff(clip1, c) # FFT3dFilter: OK
Diff(clip2, c) # FFT3dGPU: left half is untouched

almosely
31st January 2019, 11:51
Save the three images to your local drive. Open one in fullscreen and circle through the three. A difference between the original state and the one from FFT3DGPU is almost not existing, as it should be (no parameters were set). But the difference between FFT3DFilter and the other two screens punches you into your face - it's so big, no one can not see it instantly; and there shouldn't be any difference at all.

pinterf
31st January 2019, 13:54
almosely, you were right, you have a human eyesight comparable to an eagle's :), yes, those small dithering-like dots really exist.

Internally all computations are in 32bit float numbers. Integer values are converted to float, making all fft and other stuff, then the result is converted back to e.g. 8 bit integer.
Usually this latter conversion is done with proper rounding, typically: integer_value = truncate(float_value + 0.5).

FFT3dFilter is lacking this rounding, that's why we are seeing the luma difference a bit "busy" instead of a boring flat difference.

Could you please try this build?
https://drive.google.com/open?id=1Q-j7TgvCHYB95KEixDBiEfKn2PrebCVU

EDIT: this fix is also solving an issue - which I never understood - when FFT3DFiltering a simple BlankClip input results in more and more noise over time when bt=0 is used.
orig=blankclip(length=200,width=1920,height=1080,pixel_type="YUV420P8")
new=orig.FFT3DFilter(sigma=3,plane=4,bt=0,degrid=0,pfactor=0.0)
Subtract(orig,new).Levels(120, 1, 255-120, 0, 255, coring=false)

almosely
31st January 2019, 15:56
... and there is a very small amount of blurring too, within the created image by FFT3DGPU ;-) But nothing to worry about. BTW, although I see (and hear and smell etc.) extremely good, I encode never higher than 720p, because nobody is able (when really watching and not searching for insufficiency) to see the difference to higher resolutions in a moving image, if the viewing distance is chosen properly to the human eyes abilities (a 20 degrees angle between our face and the left+right borders of a screen); so I did also reduce the screen resolution of my smartphone from 2560x1440 to 1280x720p, because that is absolutely sufficient (although a very little bit of blurring is noticable because of the high contrast of displayed "still images" there) ...

Thank you very much for the explanation - I suspected something like that. But it's not only "busy", there's a variation of the luma values throughout the whole picture (darker areas are getting brighter and vice versa).

And thank you again, for the pre-build of FFT3DFilter. I will test it as soon as possible - I just uninstalled everything regarding my recent migration from AVS 2.6.0 (x86) to AVS+ (x64) in a moment of doubt and have to reinstall ;-) Oh, and I always resize/crop to get mod4 ;-)

Groucho2004
31st January 2019, 16:28
I just uninstalled everything regarding my recent migration from AVS 2.6.0 (x86) to AVS+ (x64) in a moment of doubt and have to reinstall ;-)You might want to have a look at the Universal Avisynth Installer from my signature.

almosely
31st January 2019, 16:37
I just wanted to add (edit) something to my lines before: If an oculist is attesting ones ability to see as 100% (sharp), than 1280x720p are 111% respectively. That's a fact nearly nobody is aware of (marketing sends regards). Therefore 100% are only 1160x652 (although the human eye is able to see a maximum of 2320x1304 under ideal conditions like still pictures, high contrast, dark environment, young age etc.); normally we just recognize 50%, which would be 596x336 ... And in addition to my earlier posting: Playing games in 720p is mostly satisfying too - therefore it's no problem at all to play triple-A-games with my old GeForce GTX 660 Ti (the last ones were Senua's Sacrifice or Fallout 4) :-)

I noticed your Universal AVS Installer before the very first installation of AVS+, but I decided to make a clean migration; so wether the old 2.6.0 nor AVS+ is installed right now (and no MPC-HC, AvsPmod, AVSmeter, vc_redist2017) :-( Thanks for your hint anyway! :-)

Groucho2004
31st January 2019, 16:58
I just wanted to add (edit) something to my lines before: If an oculist is attesting ones ability to see as 100% (sharp), than 1280x720p are 111% respectively. That's a fact nearly nobody is aware of (marketing sends regards). Therefore 100% are only 1160x652 (although the human eye is able to see a maximum of 2320x1304 under ideal conditions like still pictures, high contrast, dark environment, young age etc.); normally we just recognize 50%, which would be 596x336
Do you have links to scientifically sound research that would support your statements?

almosely
31st January 2019, 17:22
A few years back from now I purpously read a lot of stuff about human eye abilities and discovered all of that, step by step. But I had to calculate a little bit, to get the actual pendants in screen resolutions. There is a lot of information regarding that (e.g. at wikipedia) (I read within the german edition), like ...

Sehschärfe (https://de.wikipedia.org/wiki/Sehsch%C3%A4rfe)
Auflösungsvermögen (https://de.wikipedia.org/wiki/Aufl%C3%B6sungsverm%C3%B6gen)
Blickfeld (https://de.wikipedia.org/wiki/Blickfeld)
Der Gesichtssinn (https://www.controlling21.de/ergonomie/theorie/grundlagen/gesichtssinn.htm)
Werbung und Wahnsinn (http://www.heise.de/foto/artikel/Werbung-und-Wahnsinn-Wieviel-Pixel-braucht-der-Mensch-226854.html) (that one seems "dead", sadly; but I made a screenshot and saved the article locally): Screenshot (https://www2.zippyshare.com/v/IGao9AYq/file.html)
Fernpunkt (Optic) (https://de.wikipedia.org/wiki/Fernpunkt_(Optik))
Gesichtsfeld (Wahrnehmung) (https://de.wikipedia.org/wiki/Gesichtsfeld_(Wahrnehmung))
Wieviel dpi brauchen Druckdaten wirklich (https://www.safer-print.com/de/faq/In-Aufl%C3%B6sung-begriffen_Wie-viel-dpi-brauchen-Druckdaten-wirklich)
Schärfe (Fotografie) (https://de.wikipedia.org/wiki/Sch%C3%A4rfe_(Fotografie))

Maybe there are links to equally informational english editions of the articles; I hope so.

Groucho2004
31st January 2019, 17:25
Maybe there are links to equally informational english editions of the articles; I hope so.Thanks for the links. I was born and raised in Krautland, no problem with the lingo.

almosely
31st January 2019, 17:51
You're are welcome :-) But: If you don't believe in what I've said, then just try it for yourself. Calculate the minimun/optimum distance to your screen and watch the same movie(-scene) once in 720p and once in 1080p. I tested it many times with movies and never saw a difference while watching (not searching, nor pausing). To calculate that, measure your screen width and divide it by 2 (this is the opposite leg). Then take 10 degrees as the alpha angle (= half of the human "Gebrauchsblickfeld", maybe something like "used field of vision") and put that into a formula to calculate the adjacent side (=your optimum viewing distance) of a right-angled triangle. We have chosen the size of our livingroom-tv upon that; a bigger tv would be only stressful to ones eyes. Based on that, apple called his displays "retina" btw. (but meanwhile they are "jumping on the train" of resolution madness, too).

-edit-

And ... Therefore the optimal resolution of a flatscreen-TV for watching moving images should be 1280x720p, because it would be sharper than 720p interpolated to 1080p. 1080p is overkill, same as 4k - but three times 720 is, guess what, 4k (so with these displays, 720p will be just fine again, as it was, when flatscreens used to be "only" hd-ready). But, if it is necessary to focus on smaller areas of a screen, then a higher resolution makes sense. That explanes why the national broadcaster in germany do not use more than 720p too. Of course, one can spend money in pay-tv to get 1080p commercial breaks ;-)

-edit-

"4k - Make HD-Ready great again!" :-)

-edit-

The 20 degrees is a tricky one. As far as I remember, it's the area of our commonly used area of eye movement without moving our head. And something around 20-30 degrees is the area, our eyes are able to see all three, or at least two (red+blue) colors. And: Only exactly in the middle we are able to see 100% sharp. But I had to read everything again, to explain it exactly. I just memorized the 20 degrees as the main issue.

wonkey_monkey
31st January 2019, 21:03
Calculate the minimun/optimum distance to your screen

How do you do that? Surely any such distance is arbitrary. Most people seem to like to sit a lot closer to their TVs (or have a bigger screen) than I do, for example. That's just their preference.

almosely
31st January 2019, 23:04
Maybe they need glasses? ;-) Okay, for real; I don't know why they are doing this. It's not natural, but who cares nowadays? The bigger, the better. Today it seems natural to be unnatural. That explains a lot of drawbacks of our time period. One thing is for sure: One do not get, what's going on (onscreen), not entirely; the closer, the less. But inattention and incomprehension seems to be viral too.

ChaosKing
31st January 2019, 23:25
When your tv is bigger than yourself https://www.youtube.com/watch?v=3BJU2drrtCM

almosely
1st February 2019, 00:20
Ah, great ;-) So sweet to explain the mechanism of a flip-book (about which nearly everybody was aware of as a eight year old, 35 years back in time) with the help of a modern, interstellar-sized prick-replacement; do the kids nowadays know about flip-books at all?

Something I did just remember regarding apples "retina" displays. While I was researching all of that a few years ago I found out, that apple must have taken the golden selection into consideration. That conclusion came after "reengineering" the correlation between apples screen sizes and resolutions of some of their mobile devices regarding vertical display orientation. They did a great job back than, honestly.

Goldener Schnitt (https://de.wikipedia.org/wiki/Goldener_Schnitt)

almosely
1st February 2019, 01:17
Could you please try this build?
https://drive.google.com/open?id=1Q-j7TgvCHYB95KEixDBiEfKn2PrebCVU

EDIT: this fix is also solving an issue - which I never understood - when FFT3DFiltering a simple BlankClip input results in more and more noise over time when bt=0 is used.

Well done! :-) I just reinstalled AVS+ (x64) and corresponding tools and it seems to work perfectly great - I made a quick comparison within AvsPmod GPo and a short testrun through AVSmeter; till now, everything is fine and a few frames faster (0.xx). Thank you!! :-)

pinterf
1st February 2019, 09:11
New release.
Download FFT3dFilter v2.6 (20190131) (https://github.com/pinterf/fft3dfilter/releases/tag/v2.6)
almosely, thank you for the report, a bug which was obvious but nobody noticed in the last decade.
Fix: Proper rounding when internal 32 bit float data are converted back to integer pixel values

StainlessS
1st February 2019, 09:35
Oh WOW, thank you.
Guess no bodiy noticed cos we is all so easily pleased :)

FranceBB
4th February 2019, 02:54
Thank you for the updated version. ^_^

ajp_anton
7th February 2019, 02:48
@almosely

So you're claiming that 720p at 20° is the ideal for TV or a smartphone. I disagree, especially with your comment on this being just marketing.
First, you yourself mentioned well over 1080p for still images. Smartphones are very much still images, and so are a lot of parts in a lot of movies.
Second, you don't need to have the whole screen in your perfect vision at the same time. Your peripheral vision also exists, and you can move your point of interest to a different part of the screen.

edit: removed the gigantic quote.

almosely
10th February 2019, 20:15
@ajp_anton

Everything you described, I described before. So, what is the extra meaning of your post?

almosely
11th February 2019, 04:20
Okay, because it's an affair of my heart, I will try to make that more understandable.

For example, open a .pdf document on your smartphone. I am assuming you own one with a WQHD (1440 x 2560) resolution or higher. Look at what you see: It's crystal clear, but can you actual read it (without your eyes being strained)? Most probably you are going to zoom in a bit. Now do the same with 720p: It is not as crisp and sharp, with a 100% zoom, but that is not relevant at all. You are going to zoom in too. What are you seeing than? Everything without any difference but some little aliasing. If you are paying attention to the content only, you will not pay any attention to that little bit of aliasing at all. You achieve the same result and satisfaction with both resolutions - if you do not push your nose against the display and watch out for fuzziness and tell your buddy next to you about that. It does not have any relevance in real life at all. Same goes for pictures taken by your smartphone camera. There is absolutely no need to be able to see the border of the glasses of the person within the picture 100% crisp because one focuses on the essential content of the image, the composition, the light, the colors, facial expressions and so on. Quickly show any picture to your buddy - he/she will never watch out for sharpness, only pay attention to what's going on substantially. To sit there and compare the capability of one's display againgst another one's is only the "need", that marketing is making up artificially and indoctrinating that into your mind.

The same goes for movies. There are simply no "lot of parts in a lot of movies which are still images". Almost every scene of a moving picture is what?: Moving. Even it is a still life or a quiet landscape scene, there's almost every time a little zooming or panning. Additional to that there is reflection on the screen, surrounding lights or movement next to the screen or even noise or the movie sound track playing - everything is diversion and engaging your mind. You simply pay not that attention to the resolution - normally, but only if someone is telling you to do so (marketing, or marketing speaking through the mouth of your buddy) by disregarding other (essential) things. Movies are telling stories, and that with the help of a lot of different tools - none of them is screen resolution. This is why science (to read within one of my mentioned articles earlier) defines our ability to observe something with our eyes in general somewhere way below 100% (720p=111%!) (exactly at 2 arc minutes, which would be somewhere around 600x340 pixel). It's psychological and physical dependent. The need to focus on the screen resolution is not born within us but by marketing and selling intentions. Actually to focus on that is hurting us badly in a lot of ways. Not only the pollution resulting in constantly buying new devices and throwing the "old ones" away for nothing that matters, as well as the chronological, physical and mental workload put into earning constantly more money to be able to buy those needless things, which is injuring everybody (ourselves, people we should pay more attention to, social relationships etc.), are the results, but the quality of movies itself. Yes, by ridiculously spending our attention to that, movie makers (respectively the big companies, which are only interested in making more money) create their movies in other ways than before. Look at the blockbusters of the last years. They are based upon insane and stressful pace all over the place, nearly in every area of the scene something is moving around, doing something unessentially, the dialogues are dumb as hell, the plot is ... yeah the plot is to show something and mostly not more than that ... and everything is feeding the "need" to look at small areas of the screen instead of the whole picture, a real "scene", telling something essential. When you are talking to somebody, are you paying attention to what he/she is telling you by his/her voice, mimics and gestures or are you constantly looking away, watching out for things going around? Does that imagination ring any bell within yourself? We should pay attention to what really matters, but that has changed a lot. People are getting less focused on essential things, because they are constantly told to do so - by who?: Marketing. And one not negligibly reason for that is this need to pay attention to the resolution of a screen. That's insane. Yourself are telling me to be "not in need to have the whole screen in your perfect vision at the same time, because your peripheral vision exists and you can move your point of interest to different parts of the screen". That is exactly what I define as a big damage/madness of our time, caused by marketing and screen resolution mania. Your point of interest has changed (or is changing constantly) - you are saying that without beeing aware about the consequences followed by that. This is what I mean.

I mentioned earlier that Apples Retina-displays are based upon what I am trying to explain here. Has anybody ever challenged the quality of those displays when they were introduced back in the years? No! Everybody was praising them the hell out of it. Does anybody remember the marketing claim "sharper than reality" which was introduced with full hd? It's simply true and though totally needless. Marketing is audaciously using the plain truth as advertising and makes folks believe nature is wrong or being better than nature! Don't you realize the tremendous mind fuck behind that? People are marketing's helpless sheep, believing what they are told to believe and - to add insult to injury - they are defending those harmful fairy tales and trying to convert those with open eyes and mind to the blind mob. And the very crux of that is, that the ones causing this misery and damage (people who are creating that marketing crap) are hit by the aftermath to the same scale as anybody else.

Maybe it helps to realize/remember that x264 takes that into consideration too and everybody seems to be fine with that (because there's no marketing interest of pointing ones nose straight to the differences between raw and encoded material, which are there (very obvious ones), but not realized while watching and paying not attention to it). Similar goes for mp3/aac vs wav/flac etc and dts is not necessary at all too (btw I am blind testly able to hear differences between mp3 320/v0 and wav and also differences between aac v5 and wav; only aac v6 is transparent to my ears; of course, I am only able to recognize that in some rare situations; with movies, aac v4 is fine and walking outdoors mostly too, but not at night, when its quiet - then I use aac v6).

FranceBB
11th February 2019, 20:28
because there's no marketing interest of pointing ones nose straight to the differences between raw and encoded material

No, it's because of the bandwidth; we can't air on an high enough bandwidth, especially 'cause the encode has to be live, so it's not going to be very complex due to the latency required to air the signal with an acceptable delay.
Keep in mind that we have a delay that goes from 1 second to maximum 20 seconds (but it's not used except on very rare occasions).
As to the offline encoding, such as bluray disks delivered to the people, the bandwidth goes up, but we're still limited by the specifications and the capacity of the disk.
Even if you take professional disks (not for the public) to store mezzanine files, they are quad layer and with an higher speed for write/read access capable of supporting higher bitrates, but they are still limited.
For instance, back in the days, Sony XDCAM Disks were 128 GB capable of reaching 50 Mbit/s for the video and other spare mbit/s for the audio up to about 60 Mbit/s.
You basically said that issues are there but nobody cares about compressed sources, but I disagree, as there are people who do notice them and the fact that we're not releasing lossless sources to people is simply because of the bitrate required: there's NO WAY to deliver a lossless file via Satellite (too much bandwidth, too expensive), nor via IPTV (nobody has the bandwidth available to stream such a content), nor via Disks (seriously, even if the episode of a series of few minutes would fit in an 128 quad layer disk, it wouldn't have the required reading speed to access all the data and playback smoothly).
In other words, we don't use lossy codecs because of marketing, but because infrastructures and practical usage.

I am blind testly able to hear differences between mp3 320/v0 and wav and also differences between aac v5 and wav; only aac v6 is transparent to my ears; of course, I am only able to recognize that in some rare situations; with movies, aac v4 is fine and walking outdoors mostly too, but not at night, when its quiet - then I use aac v6).

The filterbank polyphase in the psychoacustic model of mp3 is no match with the AAC, which has a completely different (and better) implementation, anyway audio is treated with a bit more accuracy compared to video due to the technical ability to have rather small files compared to lossless videos: it is actually possible to deliver to users contents with a good fidelity compared to the original master file on Bluray Disks, but not so much on Satellite, IPTV and OTT as we're forced to use lossy codecs like AC3 and AAC with bitrate between 192 kbit/s and 384 kbit/s due to bandwidth limitation (the extra bits saved on the audio are used for the video which is generally more relevant to the user).

Movies are telling stories, and that with the help of a lot of different tools - none of them is screen resolution.

Yes, movies are telling stories and some of them are really moving and last forever.
Saying that a movie is bad because it was shot in the 80s would be like saying that paintings before renaissance were useless due to the lack of perspective.
Anyway, there's nothing wrong in improving and using the technology we have to make things better.

"Yes, but we're not able to see the difference anyway, so why bother?"
Although that it's arguable, I can make you an example that isn't.
There are cameras nowadays capable to shoot at low-resolutions but at a very high framerate, something like the MIT Media ones, capable of recording at 1,000,000,000,000 frames per second through their special technique.
Of course, the human eye is not able to see so many fps, but it's actually useful for science purposes. http://web.media.mit.edu/~raskar/trillionfps/
http://web.media.mit.edu/~raskar/trillionfps/tomato_lightprop_s.gif

Not only the pollution resulting in constantly buying new devices and throwing the "old ones" away for nothing that matters, as well as the chronological, physical and mental workload put into earning constantly more money to be able to buy those needless things, which is injuring everybody (ourselves, people we should pay more attention to, social relationships etc.), are the results, but the quality of movies itself.

What? Nothing stops you from not buying a new device or a new TV. If you wanna stay - for instance - on an SD TV connected via SCART or Composite cables, you are totally free to do so. TV channels not only still air contents in multiple resolutions (including SD), but HD/FULL HD channels can be decoded by an HD/FULL HD decoder and downscaled to SD if your TV only supports that. (For 4K it's a bit different, 'cause decoders don't offer the option to downscale due to the complex conversion that would need to take place in converting an HDR to SDR in case of HDR contents).

every area of the scene something is moving around, doing something unessentially, the dialogues are dumb as hell, the plot is ... yeah the plot is to show something and mostly not more than that ...

There aren't just action movies and silly comedies these days, though.
The fact that the vast majority of movies is focused on special effects or other things 'cause it *has to look good* has nothing to do with resolutions, it's just because the majority of people like, let's say, action movies with no dialogues and just a lot of shootings and bombs and other special effects, but that has nothing to do with resolution, it would have been the same for SD contents.
I do wanna say one thing, though, and it's about HDR.
I remember that when they introduced Dolby, everybody was exasperated to have effects all over the channels, even when it wasn't needed at all and it ended up "disturbing" the view rather than "enhancing" it, but they eventually got it right later on.
Same thing occurred when 3D was first introduced; I remember people trying to make everything getting into your face, it HAD to come toward the user, even when it wasn't needed at all and it was rather disturbing, but they eventually got it right later on.
Nowadays it's the turn of HDR, in which everybody seem prone to exasperate the colors and the contrast, producing encodes very different from the original natural light of the shot, just because "it has to look good and be stunning to people".
Many people seem to be misusing the HDR, by using it to make images "beautiful" rather than as close to the original as possible, but they will eventually get it right.
For instance, we used PQ when we had to record and encode a show at the theatre, 'cause in theatres the show it's all about people sitting there, it's not for TV, so we had a very dark setup overall but we also had lights in the background that were switched on and off at different times. In the old SDR world, setting the camera with the right black level to get the actors on the stage would have led to severe clipping on the lights in the background, but with PQ we were able to get them both right.
I think that THIS is how people should use HDR and what HDR it's meant to and I think people/colorists will eventually get it right in the future.

"not in need to have the whole screen in your perfect vision at the same time, because your peripheral vision exists and you can move your point of interest to different parts of the screen". That is exactly what I define as a big damage/madness of our time

No, it's really up to the content creators, to be fair.
In TV we use 4mm lens that are always on focus on everything and that are capable of keeping everything in focus, regardless of what you are pointing you camera at.
In movies they use different type of lens and it's the director of photography who chooses what has to be on focus and what doesn't.
For instance, in movies, sometimes they choose to recreate things that are "errors" just because it's the feeling that it's meant to be transmitted to people.
One of the common example is whenever you have to shoot a scene in which there's a car approaching you frontally during the night/evening and then stops and is turned off.
Generally, the director of the photography asks you to shoot it the way that it has a thin horizontal line that goes from left to right and then disappears once the car it's switched off.
That line it's actually caused by the lights and although it can be avoided, most people imagine it that way and it's more common to do it this way.
But again, it has nothing to do with resolution.

almosely
12th February 2019, 00:30
As to the offline encoding, such as bluray disks delivered to the people, the bandwidth goes up, but we're still limited by the specifications and the capacity of the disk. You basically said that issues are there but nobody cares about compressed sources, but I disagree, as there are people who do notice them ...

1280x720 with average P-quantizers of 18 (x264) are enough for the common end user. Of course, exceptions does make sense everywhere.

Anyway, there's nothing wrong in improving and using the technology we have to make things better.

I agree completely.

Of course, the human eye is not able to see so many fps, but it's actually useful for science purposes.

The end user is not a scientist in general. I was referring to that only.

Nothing stops you from not buying a new device or a new TV.

You severely underestimate the power of marketing's omnipresent influence. There are only a very few people able to resist, if at all (including me, of course). Free will is a hoax, regarding that.

The fact that the vast majority of movies is focused on special effects or other things 'cause it *has to look good* has nothing to do with resolutions ... it would have been the same for SD contents.

Do you seriously believe one would like to sit 1,5 meters away from a 85 inch display in sd resolution, looking what's going around in every corner of the screen? Yes, it has nothing to do with resolution if the screen size would be as small as times ago, because we do not see the differences anyway. But higher resolutions gave birth to tvs in the size of a landscape where everywhere everything is sharp. With that you can easily focus on small parts of the scene, sitting very close to the screen. Look to the upper left side, focus on that, and you will miss, what's going on at the opposite. Movies are'nt meant/built to tell multiple stories at one time; they are'nt landscapes, no movies within movies; they need ones focus on the whole scene, otherwise comprehension is lost. That results in people becoming less interested in "complex" stories - they are simply not able to fully recognize a story anymore. That changed they way, many movies are produced nowadays, especially the blockbusters. The focus shifted from mental content to visual because of that, sometimes up to trivial pure visual springkling. And that mirrors in often found common behaviour, especially of the youth nowadays - they are'nt interested in focussing because they simply can't (it's not their fault) - and marketing keeps on telling them, that everything is alright with that, get even bigger screens and higher resolutions, become paying zombies.

Nowadays it's the turn of HDR, in which everybody seem prone to exasperate the colors and the contrast, producing encodes very different from the original natural light of the shot, just because "it has to look good and be stunning to people".

I know. I used HDR (with DCIMs) a lot while studying design (and marketing, sadly, retrospective) around 12 years ago. I saw every mistake possible with that technique. It's a great thing, but has to be used with care.

ajp_anton
12th February 2019, 02:46
Your posts are just so full of things I disagree with, I'm not going to bother answering it all. I'm just going to say that
1280x720 with average P-quantizers of 18 (x264) are enough for the common end user. Of course, exceptions does make sense everywhere.
Who are you to decide what's enough for the common end user? The movie's story doesn't change with resolution, but the experience does change when you see everything clearer. Same with your PDF example earlier, you even said that the aliasing is visible, which kind of proves my point. Why even use 720p, as that's overkill for "being able to read"? Because Higher res, sharper pictures and less aliasing is just more pleasant for the eyes.

almosely
12th February 2019, 03:32
I could be anybody, but time is limited and, of course, there's fate. There's plenty to reflect on by now. Thank you, pinterf, again, for spending your time and skills to give us this gift. I am going to use "your" fft3dfilter nearly everytime I encode :-)

MeteorRain
23rd March 2020, 00:44
Bump for potential bug

https://github.com/pinterf/fft3dfilter/blob/master/fft3dfilter/fft3dfilter_c.cpp#L109

Line 69 and Line 89 are factors for sharpen only and dehalo only.

Sharpen only factor
1 + sharpen*wsharpen[w]*sqrt( psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) )

Dehalo only factor
(psd + ht2n)/((psd + ht2n) + dehalo*wdehalo[w] * psd )

Line 109

Sharpen and Dehalo factor

WienerFactor *=
1 + sharpen*wsharpen[w]*sqrt( psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) )
*
(psd + ht2n)/((psd + ht2n) + dehalo*wdehalo[w] * psd );


However in sharpen_C

sfact =
(1 + sharpen*wsharpen[w]*sqrt( psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) ) )
*
(psd + ht2n) / ((psd + ht2n) + dehalo*wdehalo[w] * psd );


I haven't dig too deep, but this 2 pieces of code look fishy to me. Can you confirm if one of them was wrong?

FYI: I'm refactoring and reorganizing this filter.

pinterf
23rd March 2020, 12:18
Bump for potential bug

https://github.com/pinterf/fft3dfilter/blob/master/fft3dfilter/fft3dfilter_c.cpp#L109

Line 69 and Line 89 are factors for sharpen only and dehalo only.

Sharpen only factor
1 + sharpen*wsharpen[w]*sqrt( psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) )

Dehalo only factor
(psd + ht2n)/((psd + ht2n) + dehalo*wdehalo[w] * psd )

...
FYI: I'm refactoring and reorganizing this filter.
Unfortunately I cannot help, did not dig into the algorithms. I noticed during an mmx asm to sse2 intrinsic rewrite that the C code was a bit different (afaik there was a small sigma addition somewhere)

MeteorRain
24th March 2020, 10:26
I shot a quick email to the original author and see if I can get something.

I finished organizing all Apply*3D*() family and all their SSE2 counterparts. bt=5 shows a significant speed improvement (85539ms -> 13925ms for a short clip). Might start working on AVX part later.

Hopefully I can get an answer soon.

pinterf
24th March 2020, 17:29
Nice. You can check VapourSynth solution, there had been a refactor as well.
https://forum.doom9.org/showthread.php?t=175199

MeteorRain
24th March 2020, 18:45
Thanks! That's ... a lot of diversity in this community.

Hopefully I will finish it with most of the fixes in the other repo and make it a dual interface.

Myrsloik
24th March 2020, 18:47
Thanks! That's ... a lot of diversity in this community.

Hopefully I will finish it with most of the fixes in the other repo and make it a dual interface.

Insanity! The Avisynth developer code dictates that you must create yet another incompatible fork!

MeteorRain
24th March 2020, 18:58
Hi,

It seems, that Sharpen_C code is correct, but

pair of brackets are missed in ApplyWiener2D_C code for non-zero both
sharpen and dehalo.

It is a bug.


So as I expected. Will include that fix also.

MeteorRain
26th March 2020, 03:25
(pfactor=1.0, bt=0) seems to be broken. Can you confirm if that's broken on your side?

MeteorRain
26th March 2020, 04:57
https://github.com/pinterf/fft3dfilter/blob/master/fft3dfilter/FFT3DFilter.cpp#L2811

Is coverpitch * pixelsize supposed to be coverpitch?

pinterf
26th March 2020, 08:14
https://github.com/pinterf/fft3dfilter/blob/master/fft3dfilter/FFT3DFilter.cpp#L2811

Is coverpitch * pixelsize supposed to be coverpitch?
Yes, it worked only for 8 bits! Seems I have not tested all parameter and bit depth combinations.

pinterf
26th March 2020, 08:23
(In general) When you make filters that work for both VS and AVS, parameter handling is different when applied on different bit depth.
Conventionally VS filters require to scale parameters to the appropriate bit-depth at the scripting side. In my AVS filters the same parameter magnitudes will work similarly for all bit depths. E.g. sigmas, smin, smax (https://github.com/pinterf/fft3dfilter/blob/master/fft3dfilter/FFT3DFilter.cpp#L585).

MeteorRain
26th March 2020, 10:53
Yea I saw that when I refactor those part.

Now I can almost ensure it's very bit identical to the before-refactoring, except for some minor difference (such as different order of float additions and subtractions). Moving from ancient C++ to modern C++ really gives a fresh breeze. I have wiped the original caching system and made a LRU template caching, and refactor bt 2..5 into a single block. Should be much easier to maintain now. Duplicate code in Apply family are all eliminated with a more functional programming structure (lambda callback). This is the first time I'm writing C++ code in Ruby style, so will see how it goes.

Next step is to finish the AVS+VS dual interface, then I'll move back to LSMASH-Works Linux porting work, and hopefully I can get it up and running on Debian very soon.

real.finder
26th March 2020, 12:22
maybe parameters scale parameter like paramscale in MaskTools2 will be a good idea, with "none" by Default in vs and Default "i8" in avs

MeteorRain
27th March 2020, 04:20
I think the rule of thumb is -- the same clip in different depth with the same parameters should behave similarly.

real.finder
27th March 2020, 04:35
I think the rule of thumb is -- the same clip in different depth with the same parameters should behave similarly.

I think that too, but it's too late for vs (or all vs scripts must update for that)

so paramscale will be balanced solution for both, and it's also useful in debugging

also sigmas, smin, smax etc... should be float parameter instead of int (if it not float already) and if the old filter/plugin parameter was int, then it better to have dual filter signatures (https://forum.doom9.org/showthread.php?p=1902809#post1902809)

MeteorRain
27th March 2020, 07:00
Since this refactor is going to be a big change, I'm going to ignore full compatibility and try to do things right (at least right according to my mind).

That includes removing of plane / multiplane parameter and use the easier [y/u/v]=[3/2/1] convention, removing YUY2 colorspace support, and a few fixes that might not give bit identical result. I also plan to add a set of window parameters according to my personal need, so only pixels inside window is processed.

pinterf
27th March 2020, 07:01
Forget dual filter signatures please, it's a hack, separate the filter dlls properly, it is just conservating the disorder we see sometimes posted as heap of dlls from the last century.

real.finder
27th March 2020, 07:34
Since this refactor is going to be a big change, I'm going to ignore full compatibility and try to do things right (at least right according to my mind).

That includes removing of plane / multiplane parameter and use the easier [y/u/v]=[3/2/1] convention, removing YUY2 colorspace support, and a few fixes that might not give bit identical result. I also plan to add a set of window parameters according to my personal need, so only pixels inside window is processed.

Forget dual filter signatures please, it's a hack, separate the filter dlls properly, it is just conservating the disorder we see sometimes posted as heap of dlls from the last century.

then in these cases, function name should be changed, FFT3DFilter2 or Neo_FFT3DFilter

pinterf
27th March 2020, 08:21
Yes, if there would be way too different parameters and behaviour then a name separation would help. Like masktools(2), mvtools(2)

MeteorRain
27th March 2020, 08:29
I already changed it to Neo_FFT3D since I forgot to mention that. The original filter was written in 2004/2005 where WinXP and YUY2 were mainstream support. I think now it's a good time to move on. Although there are incompatibilities, it's still pretty easy to move to the new filter with minor changes to scripts.

FranceBB
27th March 2020, 15:18
I already changed it to Neo_FFT3D since I forgot to mention that. The original filter was written in 2004/2005 where WinXP and YUY2 were mainstream support. I think now it's a good time to move on. Although there are incompatibilities, it's still pretty easy to move to the new filter with minor changes to scripts.

I just popped up out of nowhere to say that although nobody uses 8bit 4:2:2 interleave (YUY2) now (since Avisynth has been having yv16 support for years) and I'm totally in favor of removing it if it's an hassle to support, but the same isn't true for XP as there are still people using XP, so unless it's impossible, I would beg you to keep XP support in the new Neo_FFT3DFilter as well. :)

StainlessS
27th March 2020, 15:51
I would beg you to keep XP support in the new Neo_FFT3DFilter as well.
+1 on that.