digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: Gibbs effect - how to? (http://www.digitalfaq.com/archives/avisynth/13533-avisynth-gibbs-effect.html)

rds_correia 05-26-2005 03:32 PM

Gibbs effect - how to?
 
Hi guys,
I've been working around with 2 trilogies during the last couple of days.
One is Back to the Future that I had on one and a half KDVD and the other is Star Wars Eps IV, V and VI.
Actually Star Wars is not mine - it's my cousin's - but he has 2 little kids at home and he asked me to make a copy so that he can safely store the original pack.
That puts me working on a 3x movies PAL 16:9 Anamorphic 704x576 (with AC3 5.1 original audio) encodes to a 1x DVD-R.
My problem is that I'm catching a lot of - how shall I say - "ghost" effect or "ringing" effect on the edges of the characters and objects.
I'm not sure if you'll get what I mean with these words but that's about how I would describe the problem.
Appart from the resizing filters I have tried the regular Undot.Deen and Inc's ADS but no luck and scripting has never been my strong side :lol:.
So I was wondering if you guys cared to point me something new (or even old :)) that could give me some help on this matter.
I could go for a non-anamorphic 4:3 encodes but I would rather leave that as my last option.
TIA

Cheers

Dialhot 05-26-2005 04:15 PM

Can you post a snapshot ? I think it's necessary here.

danpos 05-26-2005 04:20 PM

@Rui

I think that the last Fupp's script version has a option for to treat with "ringing" effects ... Take a look at thread that announced the update of such script ... :D

See ya!

rds_correia 05-26-2005 04:55 PM

Hi Phil & Danpos,
Thanks for your suggestions.
@Danilo,
I had already forgotten about FuPP's script.
I'll search for it right away but I'dd like to go with something not as strong.

@Phil,
Since you ask for a picture, here's a picture of yourself :lol:.
I was trying other movies just to see if I could catch the same effect.
And here it is on Matrix 1.
Look at your head contour and also at your shoulders.
Can you see the ghosting that I was mentioning.
This is 704*576 only with resizing. No filters at all and a bitrate around 1500Kbits.
What do you think?
Cheers guys
http://www.digitalfaq.com/archives/i.../2005/05/1.png

Dialhot 05-26-2005 05:56 PM

This appears in hight frequencies (edges) and you can lower the effect with DCTFilter.

Note : this effect is due to too low (max ?) bitrate generally.

rds_correia 05-26-2005 06:35 PM

Hi Phil :),
I'll try DCTFilter and see what I get.
Never experienced this before which is rather strange.
I'm using HC 0.14 and I've tried HC 0.13 but the same happens.
But what even puzzles me the most is that I tried Tmpgenc and I still get the same results :roll:.
I am trying HC in OPV mode with 8000 set as my max bitrate and Q=7.100 and will incorporate DCTFilter after I read it's instructions.
I'll let you know how it goes after that.
TIA
Cheers

Dialhot 05-26-2005 06:43 PM

Quote:

Originally Posted by rds_correia
will incorporate DCTFilter after I read it's instructions.

Use DCTFilters(1,1,1,1,1,1,0.5,0).

If this does not work, then proceed differently : raise the enthropy of the picture by adding noise (a common blockbuster line).

Or, new idea, use GausianResize (new in avs2.56) with a blur factor near 0.75 (I use it to replace lanczos4resize currently, with a factor at .90 but .75 is perhaps too blur).

rds_correia 05-27-2005 03:35 AM

Hi Phil :),
Unfortunately I still haven't found time to test your tips.
I have two questions, though:
1-What's the real name for the kind of effect I'm experiencing?
2-How in the name of the lord haven't I noticed this before?
For the 2nd question I think I have already found at least 1/2 an answer.
Last night I picked up my old KDVD (and even KVCD) encodings mostly done with Tmpgenc and NuEnc.
I raised the brightness on my TV to nearly the max and I could find something not as noticeable as what I've been experiencing but close enough to probably blame the colorspace issues I was noticing a few months ago.
That would mean I have always had this issues but never noticed them because the picture would be a little bit more darker than it should.
Nevertheless it's strange because I was quite sure I had never experienced colorspace issues at that time :roll:.
I'm sure you (Phil) can recall those pictures where you were saying that it was brighter and that I would say it was less brighter.
Well, tonight I'm installing AVS 2.5.6beta and I'll try all your tips to see where I can get.
Also I'll look at ColorMatrix() to check on the colorspace issues.
Thanks for your (and everybody else;-)) support on this matter.
Cheers

Dialhot 05-27-2005 03:48 AM

Quote:

Originally Posted by rds_correia
1-What's the real name for the kind of effect I'm experiencing?

No name that I know. These are artifacts introduced by the rounding in math operation near the edges. Call them "artifacts" :-)

Quote:

2-How in the name of the lord haven't I noticed this before?
Your sources are "too clean". This artifacts come out when there is too much variation near the edges. The cleaner are the areas before and after the edge, the more you will see the artifact. That is what your noticed with your old KDVD.

Boulder 05-27-2005 10:20 AM

Quote:

Originally Posted by Dialhot
Quote:

Originally Posted by rds_correia
1-What's the real name for the kind of effect I'm experiencing?

No name that I know. These are artifacts introduced by the rounding in math operation near the edges. Call them "artifacts" :-)

That's Gibbs artifacts/noise. Appears in places where the contrast is very high (around sharp edges!) and the bitrate is not high enough. No filter can help you much, I'm afraid - the artifacts you see appear during compression.
Quote:

That puts me working on a 3x movies PAL 16:9 Anamorphic 704x576 (with AC3 5.1 original audio) encodes to a 1x DVD-R.
There's your problem. You definitely won't have enough bits to keep the artifacts away. If you use CCE, you can try lowering the flat part priority value to something like 5-10 (quantizer characteristics in some version). However, it will probably make any flat parts look bad :?

rds_correia 05-27-2005 10:33 AM

Quote:

Originally Posted by Boulder
That's Gibbs artifacts/noise. Appears in places where the contrast is very high (around sharp edges!) and the bitrate is not high enough. No filter can help you much, I'm afraid - the artifacts you see appear during compression.

Ok, now I know the name :).
But :arrow: I've been looking very closely at the sources and I can almost swear I can see the same artifacts but that's about it.
The key word is "almost".
So I'm starting to think that I shouldn't be surprised to see this effect on the encoded material too ;-).
Quote:

There's your problem. You definitely won't have enough bits to keep the artifacts away. If you use CCE, you can try lowering the flat part priority value to something like 5-10 (quantizer characteristics in some version). However, it will probably make any flat parts look bad :?
Damn, I'm using HC so I guess I can't do anything else besides going for non-anamorphic, right?
Anyway, I'm still going to try Phil's hints and only then I'll take a decision.
Thanks for the help though.
Cheers

Boulder 05-27-2005 11:01 AM

Quote:

Originally Posted by rds_correia
Quote:

Originally Posted by Boulder
That's Gibbs artifacts/noise. Appears in places where the contrast is very high (around sharp edges!) and the bitrate is not high enough. No filter can help you much, I'm afraid - the artifacts you see appear during compression.

Ok, now I know the name :).
But :arrow: I've been looking very closely at the sources and I can almost swear I can see the same artifacts but that's about it.
The key word is "almost".
So I'm starting to think that I shouldn't be surprised to see this effect on the encoded material too ;-).

You can see the artifacts practically on every DVD if you look closely. It's the nature of the encoding process that causes it. Some commercial DVDs look like crap just because of that nasty ringing.
Quote:

Quote:

There's your problem. You definitely won't have enough bits to keep the artifacts away. If you use CCE, you can try lowering the flat part priority value to something like 5-10 (quantizer characteristics in some version). However, it will probably make any flat parts look bad :?
Damn, I'm using HC so I guess I can't do anything else besides going for non-anamorphic, right?
Anyway, I'm still going to try Phil's hints and only then I'll take a decision.
Thanks for the help though.
Cheers
Yes, not much to do. Blurring the image reduces the effect (less sharp edges and also better compressibility) so bilinear resizing should help. Bilinear is usually a must when doing extreme compression as the difference to a sharp bicubic or Lanczos is huge.

Dialhot 05-27-2005 11:16 AM

Quote:

Originally Posted by Boulder
Yes, not much to do. Blurring the image reduces the effect (less sharp edges and also better compressibility) so bilinear resizing should help. Bilinear is usually a must when doing extreme compression as the difference to a sharp bicubic or Lanczos is huge.

I see you did not discover GausianRezise yet. Try it ;-) It's kinda resizer where you can change the blur strength.

And for Gibbs, I'm quite sure DCTFilters help also (too much filtering with this cause the edges to blur, so it should have an impact on these artifacts).

Boulder 05-27-2005 12:00 PM

DCTFilter does pretty much the same as the quantizer matrix so in theory it might do the trick. With your settings, the higher frequencies are filtered and if I'm not entirely mistaken, that's where the Gibbs noise is. You'll just need to be careful, too strong DCTFilter will actually make the problem more apparent (easily tested with permanent subtitles on the video before DCTFilter).

I'll have to check the Gaussian resizing, sounds interesting. Funny how I didn't notice that it had been added, though I've been a bit busy lately.

incredible 05-27-2005 02:02 PM

Thats why I dropped DCTFilter, ...

It lowers the higher frequencies but anyway .... if high freqs will changed to block"itos" thes blocks also do appear to the encoder as edges. Pong.

So entering the Matrix would help. Like setting the last 2 collumns of notch to 99 at Intra and Inter. :)

kwag 05-27-2005 06:04 PM

Quote:

Originally Posted by incredible
So entering the Matrix would help. Like setting the last 2 collumns of notch to 99 at Intra and Inter. :)

But not exactly at that position :)
The problem is that the frequencies of Gibbs vary, and it will not be a fixed matrix position.
The ideal matrix would be a dynamic matrix, where it would take into consideration artifact ringing and other visual artifacts, and generate a correct value for the matrix weighting. That would be the perfect solution ;)

-kwag

incredible 05-28-2005 04:02 AM

Absolutely right Karl 8)
But I was refering to that dctfilter as its routines should be processed IN the encoding engine and NOT before using avisynth, and so if someone wants to kill high freqs in a static manner he better should cut them off using a "hi-freq-cut-off"-version of the used matrix.

But since I got my new Panasonic 32" CRT 16:9 TV Set, Im away from cutting high freqs. That baby is that sharp and detailed that I recognise a blurrier picture immediately. On the one hand :( but shurely on the other hand :D

OT on/
Mine costed about 600€ incl. shipping. A friend of mine got a Samsung 32" 16:9 LCD TV Set for about 2500€ and there's a clear difference. Sharpiness was the same, both where feeded by a non-composite RGB Signal Output of the SAP. But the Luma/Chroma depth was like if youre comparing a DIA Positive and a Photography. On the LCD Black wasnt really black and the difference from the darkest to less dark areas wasnt recognisable. And that Samsung got some very good reviews on that price range testet devices. So IF buying an LCD I think we still have to spend a lot of money IF quality in case of luma/Chroma will get into the range of a CRT ?!

OT off/

rds_correia 05-28-2005 07:21 AM

Here are my results keeping an avg of 1500Kbit/s.
DCTFilter with Phil's (and TRBarry's? ) recommended values: did a reasonable job on the Gibbs effect of the source but :arrow: it can still be clearly seen on the encoded picture.
GaussResize: tried severall p values from 70 to 50. On the source it did a reasonable job although it bluried too much the picture for my taste.
As for the encoded stream, it looked good with p=70 where the pict didn't look too bluried and the Gibbs was less noticeable but :arrow: still noticeable enough for my taste.
Encoded stream with <60 looked already toooo much bluried and Gibbs was hardly detectable.
This means that apparently, and unless I didn't try hard enough, Boulder was probably right when he said that I will probably have to live with Gibbs.
What I think he wasn't so much right on was when he said that if I raise the bitrate this effect will go away.
Well I tried an avg of 4500Kbit on a 704x576 anamorphic of The Matrix with simple script and I still can clearly see the Gibbs effect.
If nobody has anyother options I'm droping this issue as unsolved.
I only find this strange because noone else complains and I know many of you have similar taste as you also like to put 2 (or 3) 16:9 anamorphic movies in a DVD-R with original AC3 5.1 sound.
We could say that this is only happening because I'm low on bitrate but as I've said it happened with avg 4500Kbit's.
Anyway, it's been educational ;-)
Thanks for your hints.
Cheers

Dialhot 05-29-2005 04:05 AM

Quote:

Originally Posted by rds_correia
If nobody has anyother options I'm droping this issue as unsolved.

You have one last things to test :
Quote:

Originally Posted by Dialhot
If this does not work, then proceed differently : raise the enthropy of the picture by adding noise (a common blockbuster line).

Quote:

I only find this strange because noone else complains and I know many of you have similar taste as you also like to put 2 (or 3) 16:9 anamorphic movies in a DVD-R with original AC3 5.1 sound.
This has few to do with your goal but with your sources. As you had see, even with a high bitrate you have the artifacts.

Note: want to remove them ? Do DVD -> Divx -> KVCD. Only for educational purposes. You will btw discover how and why divx codec screw up the picture.

rds_correia 05-29-2005 05:39 AM

Hi Phil :),
I'll add some noise with the blockbuster to see what I can get.
Nevertheless, if it's visible in the source (high quality source as The Matrix) then it's bound to be present in the encoded clip, right?
I have managed to minimize the problem using Andrej's ADS with very low sharpness and quite a high figure for the softening (1,8).
This way I still see the Gibbs but it is reasonably disguised ;-).
As for thr DVD -> DivX -> KVCD I don't think I'm prepared to do that :).
Even because afterwards I wouldn't be allowed to share the experience with the others here :mrgreen:.
Cheers


All times are GMT -5. The time now is 11:58 AM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.