VideoHelp Forum
+ Reply to Thread
Results 1 to 18 of 18
Thread
  1. 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:


    Very obvious:
    http://img5.imageshack.us/img5/4127/boxing31080p.png

    Less obvious and more like what is normal for this source with blocking is small amounts in the background:
    http://img196.imageshack.us/img196/9678/boxing1080p.png

    Pointing out areas in which i would like a filter that would help correct these areas:
    http://img529.imageshack.us/img529/1677/boxing21080p.png


    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.
    Last edited by Cman21; 8th Nov 2010 at 19:33.
    Quote Quote  
  2. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    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.
    Quote Quote  
  3. 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
    those blocks are not there from my encoding process they are in the Blu-Ray source! that is why i want to filter it, to remove these blocks and re-encode with CQ = 18 - 20. im all into quality images here im not going to compress this till bitrate becomes an issue. so no this is not a bitrate issue here.
    Quote Quote  
  4. 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
    Image Attached Files
    Last edited by poisondeathray; 8th Nov 2010 at 20:21.
    Quote Quote  
  5. 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 20:29.
    Quote Quote  
  6. 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.
    Quote Quote  
  7. Originally Posted by Cman21 View Post
    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?
    But you can hardly see the difference , right ?

    ImageSource("boxing1080p.png")
    BicubicResize(last.width*2/5, last.height*2/5)
    nnedi3_rpow2(qual=2,nsize=0,rfactor=2,cshift="spli ne36resize",fwidth=1892,fheight=1008)
    Sharpen(0.1)


    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
    Quote Quote  
  8. ok here is a link to the 1080p not cropped:
    http://img695.imageshack.us/img695/2686/ep5mkvsnapshot033320101.png

    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 21:00.
    Quote Quote  
  9. ok, forget what i said about splitting it. i got two 3 sec samples, i hope that is enough, of the 2 scenes that those screenshots came from.

    http://www.fileserve.com/file/hdJR93c
    http://www.fileserve.com/file/6MePeh6

    i also hope you can DL from this file host.... they are 8MB each in size.
    Quote Quote  
  10. 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
    Quote Quote  
  11. lol that would take me yet another 20 min but i will if you insist.
    Quote Quote  
  12. ok, there ya go the are attachments, hope i did that right...

    https://forum.videohelp.com/attachment.php?attachmentid=4163&stc=1&d=1289272575

    also i thank you for all your effort on this as you seem like you actually care to help, i am truly grateful.
    Quote Quote  
  13. Your attachment didn't work

    These aren't typical "blocks" so most deblocking filters won't work . You can deblock qed , which works on 8x8 blocks , but I doubt it will work very well
    http://avisynth.org/mediawiki/Deblock_QED
    Quote Quote  
  14. 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!
    Quote Quote  
  15. 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 21:58.
    Quote Quote  
  16. 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)
    Quote Quote  
  17. https://forum.videohelp.com/attachment.php?attachmentid=4163&stc=1&d=1289272575

    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; 8th Nov 2010 at 23:10.
    Quote Quote  
  18. Your problem is horizontal banding in the orignal SD video before it was upscaled. You only need to resize the height to fix it.

    ImageSource("boxing1080p.png")
    BicubicResize(last.width, last.height*2/5)
    nnedi3_rpow2(qual=2,nsize=0,rfactor=2,cshift="spli ne36resize",fwidth=1892,fheight=1008)
    Sharpen(0.1)
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!