hello, i am current in the process of finding some kind of deblocking filter that i can use in avisynth 2.5 in conjunction with megui to encode a blu-ray video that honestly looks like crap. this blocking becomes an issue anytime the video fades in or out of something. now i do not want to use just some random filter that will destroy quality, lol well whats left of it. i would like to find a filter built specifically for deblocking and will only effect areas that have this issue. here are 2 pics directly from the source at its native resolution with a 3rd just pointing out areas of interest:
Less obvious and more like what is normal for this source with blocking is small amounts in the background:
Pointing out areas in which i would like a filter that would help correct these areas:
now if you did take a look at the pics you'll see what im talking about. these the boxes in question are about 6x6 pixels in size and the video source is an animation if that helps for anything.
now for something not specifically correlated with deblocking but i have recently noticed that most filters dont work too well with large images as the scale on which they work are too small. is there anything that is built around filtering these larger images? just curious.
+ Reply to Thread
Results 1 to 18 of 18
Last edited by Cman21; 8th Nov 2010 at 20:33.
The reason you are getting blocking on fades is because the bitrate being used is too low. Fades affect every pixel on screen, and therefore require high bitrates. Filtering will not help you if you are trying to squeeze the size too much.Read my blog here.
i dont think you get it. those pics above are from the video source and the specs on that source is:Code:
Video Format : AVC Format/Info : Advanced Video Codec Format profile : High@L4.1 Format settings, CABAC : Yes Format settings, ReFrames : 4 frames Format settings, GOP : M=2, N=26 Bit rate mode : Variable Maximum bit rate : 40.0 Mbps Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate : 23.976 fps Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive
This is very soft, low resolution, low detail content that has been upscaled (it's barely SD)
1920x1080 will be a waste of resolution and bitrate on this source if you intend for blu-ray - I wouldn't use more than 1280x720
What is the original source?
Can you post a 1:1 picture instead of a crop ? or better yet an unprocessed video sample - it's unclear if you have processed the screenshot from resizing by a media player etc... It's important to get the pixel size and spatial relationships of the artifacts. (the screenshot is 1892x1008)
One approach is to downscale then upscale to get rid of the artifacts (or don't even bother upscaling, it's a waste)
I appended an example, view them at 100%. The fact that you can downscale (I reduced the size by by 60%) and upscale, and barely any loss of detail shows how poor the source really is
Maximum bit rate : 40.0 Mbps
BTW - This means nothing.
1) mediainfo is innaccurate - it only reads the header information
2) maximum bitrate is the vbv-maxrate in the blu-ray context : ie. it's the maximum that can enter the buffer , not the maximum instantaneous bitrate, or even the average bitrate
Last edited by poisondeathray; 8th Nov 2010 at 21:21.
lol, i know what you mean but this is a blu-ray 1080p source that im taking down to 720p as the quality is so shoty. i just want some deblocking filter to help minimize this effect on the 720p, because without anything it is still noticeable on the 720p encode. i'll upload some full pics here shortly but those pics are directly from the source as i just took a screen shot and grabbed what i could for the sake of simplicity.
EDIT: WOW that is crazy... but i really only want to downscale this once to 720p i dont want to go lower if at all possible. also which resize functions did you use?
Last edited by Cman21; 8th Nov 2010 at 21:29.
Well I said I downscaled by 60% but I based it on your incorrectly scaled screenshot. If you were to adjust it on a proper 1920x1080 framesize it would have been 768x432 - that's hardly SD
It's important to post original source, because if you distort the pixel w:h then some deblocking filters might not work optimally - macroblocks occur in 16x16 px . It's unclear how your processed your examples screenshots, but they weren't 1920x1080.
The code will have to be adjusted for video (instead of an RGB screenshot), because different colorspace (YV12 for video) and final resolution (fwidth and fheight), and you can use better sharpeners that function in YV12 colorspace.
The other screenshot you gave is more difficult - you have to reduce it even more to get rid of the artifacts ; but it would be better to post a video sample because there maybe other (better) approaches to this problem
ok here is a link to the 1080p not cropped:
but if you could recommended a deblocking filter what would you use? as i would like to filter it and then only down scale it once to 720p. and your right it is too close to really tell.
also if you could write the code as if it was to be used for video as i dont understand what is going on in that 3rd line at all.
Last edited by Cman21; 8th Nov 2010 at 22:00.
Can you zip them up and upload it directly here to videohelp
Or a hosting site where there isn't a few sentences you have to type in e.g. sendspace, mediafire
lol that would take me yet another 20 min but i will if you insist.
ok, there ya go the are attachments, hope i did that right...
also i thank you for all your effort on this as you seem like you actually care to help, i am truly grateful.
crap well good thing i put the link to it in the post too, that works. i'll try that and see what happens.
EDIT: well the link for the 2 plugins i need dont work... DeBlock & DCTFilterand the main Deblock_QED.avs also doesnt work... google time!
no getting basically the same results as before :/ well it looks like your initial proposal is the only way around this annoyance...
EDIT: wow after comparing multiple shot of you resize method to the source i am utterly baffled at how similar they are. i guess this is what i'll just have to do. thank you for your time and effort.
Last edited by Cman21; 8th Nov 2010 at 22:58.
Attachment still doesn't work, and I'm not going to type a fricken sentence with a stupid capchta, I keep on getting it wrong.
If you wanted to use that script, just change the fwidth=1280, fheight=720
I think you can get away with downscaling less on that 1st screenshot, maybe 1/2 instead of 2/5. But that 2nd screenshot has problems you have to scale even lower. It would better to have a look at the video. If you wanted to do it optimally, you would probably have to section it up & apply different filters. If you wanted the easy way, just apply the same filters
You can use a better sharpener like LSFMod that works in YV12 colorspace (sharpen() works in RGB , that's why it was used in that example)
that doesnt work? it works just fine for me... oh well it doesnt matter but ya i figured that out. and so far that is still the best results that i can get.
EDIT: ya i tried 1/2 and they came back, so 2/5 it is.
Last edited by Cman21; 9th Nov 2010 at 00:10.
Your problem is horizontal banding in the orignal SD video before it was upscaled. You only need to resize the height to fix it.