Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
3rd August 2014, 16:38 | #1 | Link |
Registered User
Join Date: Aug 2006
Location: Taiwan
Posts: 392
|
Deblock
https://github.com/HomeOfVapourSynth...Synth-Deblock/
Ported from the usual AviSynth plugin http://www.avisynth.nl/users/fizick/...s/deblock.html. Nothing new or interesting really. Just picked a plugin which is simple enough for me to practice porting plugin. Last edited by HolyWu; 13th June 2017 at 18:02. |
3rd August 2014, 17:41 | #3 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
|
It's the code review patrol!
This is the only definitively wrong part: Code:
if (!isConstantFormat(d.vi) || d.vi->format->colorFamily == cmCompat || d.vi->format->sampleType != stInteger || d.vi->format->bytesPerSample > 2) { vsapi->setError(out, "Deblock: only constant format 8-16 bits integer input supported"); vsapi->freeNode(d.node); return; } Code:
if (!isConstantFormat(d.vi) || d.vi->format->sampleType != stInteger || (d.vi->format->bitsPerSample != 8 && d.vi->format->bitsPerSample != 16)) { vsapi->setError(out, "Deblock: only constant format 8 or 16 bits integer input supported"); vsapi->freeNode(d.node); return; } 1. Normal filters will never get cmCompat formats as input so no need to check for it 2. You actual processing code actually only works for 8 and 16 bit. For 9-15 bits you don't clamp the output range properly so the output will technically be invalid. You could of course fix the clamping too for the 9-16 bit case which is probably more elegant.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
12th June 2017, 13:04 | #11 | Link |
Registered User
Join Date: Feb 2015
Posts: 38
|
It seems like the VS DeBlock does something diffrent than the AV-version. With quant=25 the AV-version seems to do a better job at deblocking.
http://screenshotcomparison.com/comparison/212508 Edit: AS=Vapoursynth, AV=Avisynth (Some weird typo I did there..) Last edited by TalasNetrag; 13th June 2017 at 20:53. |
13th June 2017, 17:50 | #12 | Link | |
Registered User
Join Date: Aug 2006
Location: Taiwan
Posts: 392
|
Update r6.
Quote:
|
|
3rd August 2017, 18:46 | #18 | Link |
Registered User
Join Date: Apr 2016
Posts: 85
|
...You are absolutely correct. Sorry for wild goose chase.
Specifically: "make" compiles it into a hidden folder: /VapourSynth-Deblock-master/.libs/libdeblock.dylib "make install" copies libdeblock.dylib to: /usr/local/lib/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|