PDA

View Full Version : Macroblocking issues, need suggestions


Chainmax
27th September 2004, 22:37
I am trying to upsize a small stream to an absurd resolution (832x624) in order to see how Lanczos4Resize and LimitedSharpen deal with it. After that, I plan to use AddGrain or Blockbuster to see which one of them can give a better sense of detail. The problem is that the stream is full of macroblocking, and no combination I tried has been able to completely remove it. Also, some of the captions at the beginning have a lot of some kind of colored mosquito noise which is very hard to remove as well. This is the script I had best results with so far:

ConvertToYV12()
Lanczos4Resize(832,624)
RemoveGrain(mode=2)
FunkyDeblock(th=5)
LimitedSharpen(ss_x=2.0,ss_y=2.0,Smode=2,strength=100,
Lmode=1,overshoot=1,wide=false,soft=false,radius=1,edgemode=0)
AddGrain(5,0,0)

It looks ok in most places, but some frames still show quite a lot of macroblocking. What would you recommend me to use in order to get rid of it while removing the least detail from the source video? Also, is there anything better than AddGrain for creating the illusion of detail, other than blockbuster or detailillusion? I can't upload samples or screenshots for now, so we'll have to keep this a theoretical question.

Soulhunter
28th September 2004, 14:25
Originally posted by Chainmax

Also, is there anything better than AddGrain for creating the illusion of detail, other than blockbuster or detailillusion? I can't upload samples or screenshots for now, so we'll have to keep this a theoretical question.

You know that Blockbuster is thought for preventing blocks while encoding ???

Maybe try LimitedSharpen -> UnSmooth -> AddGrain...


Bye

Mug Funky
28th September 2004, 15:41
you might want to give mf's HQdering a try. i've not tried it, but i imagine on such bad footage anything is worth a try.

Chainmax
29th September 2004, 02:09
Originally posted by Soulhunter
You know that Blockbuster is thought for preventing blocks while encoding ???

Maybe try LimitedSharpen -> UnSmooth -> AddGrain...


Bye
I didn't know that BlockBuster is meant for preventing the creation of blocks during encoding :o. Maybe it's a good idea to include it so that no more blocks than the ones present in the source appear. About the second part of your post, do you think it would be better to use UnSmooth and AddGrain separately or together (like the way you tried in the UnSmooth thread)?

Mug Funky: I don't think HQDering would be a good filter for this task (the clip is not the Verano Azul one, BTW) since my script is too slow already and I'm already using RemoveGrain for mosquito noise removal. What I really need is a block remover that eliminates as little detail as possible, which is the reason why I don't just raise FunkyDeblock's th parameter.

Soulhunter
29th September 2004, 13:58
Originally posted by Chainmax

About the second part of your post, do you think it would be better to use UnSmooth and AddGrain separately or together (like the way you tried in the UnSmooth thread)?


Try n' see what you prefer visually... ;)


Bye

Chainmax
30th September 2004, 01:23
Hmm, UnSmooth seems to make the clip look worse, and the first quarter of the stream reported a bitrate of 15000+kbps when being encoded at q2 :eek:. I am going to try an alternative that seems to look better and report back.

Chainmax
1st October 2004, 01:23
I tried IIP and the result was disastrous, it looked like an (to partially quote one of the posters in the IIP thread) ol painting mosaic, plus sometimes the borders of a character were way too defined and sharp. I used the call posted by Didée when he posted v0.5a of the script. Going for a more reasonable resize (576x432) didn't make it much better, which by the way also happens with the method I've been trying so far. I'm stumped, maybe the source is just too crappy to be upsampled?

Soulhunter
1st October 2004, 01:53
Same as UnSmooth, IIP is too enhance* details...

Means -> They need some details to work with !!!

* Yeah, I know that IIP reduces detail by denoising...


With a crappy source, this filters wont work properly...

Btw, you could try to diable IIP's warp-processing !!!

Maybe it reduces this "oil painting" effect... :rolleyes:


Bye

Manao
1st October 2004, 07:54
Did you try Deblock() from the MVTools package ? If not, you find a link to the filter and the documentation of Deblock here :

http://forum.doom9.org/showthread.php?s=&threadid=82015&perpage=20&pagenumber=2

Didée
1st October 2004, 08:45
Originally posted by Chainmax
I'm stumped, maybe the source is just too crappy to be upsampled?
Well, if only we could see something of that source.

Chainmax
1st October 2004, 13:20
Soulhunter: disabling the warps didn't reduce the oil painting effect too much.

Manao: wow, Deblock() worked almost perfectly. Together with FunkyDeblock they leave almost no blocking even when resizing to 832x624 :eek:. Now I have to fine tune the settings on each so that as the detail removal is kept to a minimum. What is the default quant in Deblock()?

Didée: like I already said, I can't upload clips or screenshots for now.

Everyone: regarding detail illusion, are there any other filters than AddGrain or DetailIllusion?

Mug Funky
1st October 2004, 13:28
funkydeblock is really just an "emphasis/deemphasis" wrapper for blindPP. it's made to separate the lows and the highs, and only deblock the highs. to tweak it, just set the quant to a different value (changing the settings on the de-pumping wont affect the detail too much , because the de-pumping only touches the lows).

i'd set its quant to something quite small (2 or 3? don't know how much the source can handle), and let manao's deblock handle the rest.

i wish there were some kind of high-frequency fakers available for video like there is for sound... i don't know if they'd work or not, but it would be interesting to see detail faked by referring to lower frequencies (think audio plugins that add extra harmonics to compensate for crappy bandwidth, or even the SBR technique of HE-AAC).

Manao
1st October 2004, 13:31
Chainmax : deblock's default quantizer is 25.

Didée
1st October 2004, 14:46
Originally posted by Chainmax
regarding detail illusion, are there any other filters than AddGrain or DetailIllusion?
Currently not. And the mentioned ones won't really create the illusion of detail. The noise they add is *just random* - what is a characteristic that does not apply to *detail*. For the wanted effect, they are almost worthless.

I have thought of the following (but won't script it currently, so someone else make it):

- create a single frame with static noise (e.g. AddGrain)
- gather motion vectors from the source (MVTools)
- pertube the noise frame by the vector field for every source frame
- add the motion compensated noise frame to the source

That are the basics. Probably the noise can't be moved over a long series of frames before it gets distorted too much, so [the noisy part of] the method should work on short sequences, and "dissolve" them together.

Theoretically, this is much more what I would call "detail illusion". Everything else is just noise, nothing but noise.