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. |
|
|
Thread Tools | Search this Thread | Display Modes |
20th April 2013, 05:24 | #261 | Link |
soy sauce buyer
Join Date: Mar 2010
Location: United Kingdom
Posts: 164
|
A simple function to scan the whole video and output a log file, in which out-of-tv-range frames are logged.
PHP Code:
plane: Which plane to check, same as mvtools 2 - 0:Luma; 1:Chroma U; 2:Chroma V; 3:Both chromas; 4:All. Optional and defaults to 0. log: The filename of output log. Optional and defaults to "OutRange.log" Example: PHP Code:
Original frame is returned untouched, so you can add any other filters after it or even use it in encoding as only a check for assurance. Scene-change not implemented, so only frame-based detection, no scene-based detection. Or if you don't even want to manually override false detection, you can simply use ConditionalFilter to do frame level range-adaptive filtering: PHP Code:
Last edited by 06_taro; 20th April 2013 at 05:49. |
20th April 2013, 11:41 | #262 | Link |
Registered User
Join Date: Oct 2012
Posts: 176
|
http://www.mediafire.com/?y4zndt3cf34fm4ca
Could you analyze the log and tell me whether i should set tv-range=true or false? Code: mpeg2source("C:\Users\Abhijith Nair\Desktop\Anime\Vol1..d2v") OutRange(log="sample.log") Last edited by x265; 20th April 2013 at 12:21. |
20th April 2013, 14:34 | #263 | Link | ||
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
Quote:
For information, a couple of small points on the following code: Quote:
- Triple quotes are not needed in order to include a newline in a string (only needed when the string itself contains quote characters). So the code could (if you like) be written simply as: Code:
Yeval = "ymax = YPlaneMax(" + thr + ") ymin = YPlaneMin(" + thr + ")" Ueval = "umax = UPlaneMax(" + thr + ") umin = UPlaneMin(" + thr + ")" Veval = "vmax = VPlaneMax(" + thr + ") vmin = VPlaneMin(" + thr + ")" |
||
20th April 2013, 15:41 | #264 | Link | ||
soy sauce buyer
Join Date: Mar 2010
Location: United Kingdom
Posts: 164
|
Quote:
It is suggested to manually check those 14-236 frames or somewhat similar, as those range flows might be resulted from encoding artefacts but not editing, hence might still be TV-range. Anyway, in either cases, I couldn't say it need keep_tv_range=True, some flows from grain generator shouldn't be that harmful to a source which already contains over/under-flows. Quote:
Updated here: PHP Code:
|
||
22nd April 2013, 14:26 | #266 | Link |
Registered User
Join Date: Aug 2007
Posts: 218
|
You need to find a balance between detail retention and debanding effect by your eye. You can use Histogram("luma") to make it easier to check effect of the filter.
__________________
f3kdb 1.5.1 / MP_Pipeline 0.18 ffms2 builds with 10bit output hack: libav-9a60b1f / ffmpeg-1e4d049 / FFmbc-0.7.1 Built from ffms2 6e0d654 (hack a9fe004) Mirrors: http://bit.ly/19TwDD3 |
10th June 2013, 13:22 | #268 | Link |
Registered User
Join Date: Dec 2002
Posts: 5,565
|
I tested 16 bit png with VapourSynth and it worked just fine. I used vsimagereader for that - maybe you can poke Chikuzen about tiff support.
|
10th June 2013, 14:21 | #269 | Link |
Registered User
Join Date: Sep 2009
Posts: 378
|
sneaker_ger, thanks for the reply, I'm happy with 16bit png so no probs. Currently using Avisynth with Dither Tools, http://forum.doom9.org/showthread.ph...96#post1632396 but I should really get back into pursuing VapourSynth.
|
2nd August 2013, 10:13 | #270 | Link |
unsigned int
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
|
gcc support:
https://github.com/dubhater/flash3ky...nd/commits/gcc I just hit it with a hammer until it worked, so many of those changes are probably Doing It Wrong™. I'm pretty sure I broke the SSE code paths with those "#if 1". The C code seems to work fine though. No idea if msvc or icl still compile it. Criticism and suggestions welcome.
__________________
Buy me a "coffee" and/or hire me to write code! |
2nd August 2013, 12:30 | #271 | Link | |
Registered User
Join Date: Aug 2007
Posts: 218
|
Quote:
Will look into it if I can get some free time in the coming weekend...
__________________
f3kdb 1.5.1 / MP_Pipeline 0.18 ffms2 builds with 10bit output hack: libav-9a60b1f / ffmpeg-1e4d049 / FFmbc-0.7.1 Built from ffms2 6e0d654 (hack a9fe004) Mirrors: http://bit.ly/19TwDD3 |
|
2nd August 2013, 13:00 | #272 | Link | |
unsigned int
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
|
Quote:
__________________
Buy me a "coffee" and/or hire me to write code! |
|
3rd August 2013, 03:14 | #273 | Link | |
Registered User
Join Date: Aug 2007
Posts: 218
|
Quote:
__________________
f3kdb 1.5.1 / MP_Pipeline 0.18 ffms2 builds with 10bit output hack: libav-9a60b1f / ffmpeg-1e4d049 / FFmbc-0.7.1 Built from ffms2 6e0d654 (hack a9fe004) Mirrors: http://bit.ly/19TwDD3 |
|
19th August 2013, 03:36 | #275 | Link |
Registered User
Join Date: Aug 2007
Posts: 218
|
The master branch is now compilable by GCC 4.8.1 (Tested compilation under Ubuntu 13.04). Be warned that I haven't got time to actually try to run it yet, so it is likely to have bugs. The next step is port the unit test project to GCC too, to ensure the SSE optimization part is correct.
@jackoneill, thanks for your patch. Though I only used the patch for reference only, most fixes are rewritten to be better fit into the project. To compile it, ensure GCC 4.8.1+ (we need g++ actually) and Python 3 is installed, then run: Code:
./waf configure # If you need to specify where GCC is located at, use this: CXX=/path/to/your/g++-4.8 ./waf configure ./waf build
__________________
f3kdb 1.5.1 / MP_Pipeline 0.18 ffms2 builds with 10bit output hack: libav-9a60b1f / ffmpeg-1e4d049 / FFmbc-0.7.1 Built from ffms2 6e0d654 (hack a9fe004) Mirrors: http://bit.ly/19TwDD3 |
19th August 2013, 11:07 | #276 | Link |
unsigned int
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
|
Cool!
Unfortunately, './waf build' fails here. ./waf configure -vvv: https://dpaste.de/ZKJW3/ ./waf build -vvv: https://dpaste.de/QGEfR/ Maybe you can find something useful there. I have gcc 4.8.1 and python 3.3.2.
__________________
Buy me a "coffee" and/or hire me to write code! |
19th August 2013, 11:49 | #277 | Link | |
Registered User
Join Date: Aug 2007
Posts: 218
|
Quote:
__________________
f3kdb 1.5.1 / MP_Pipeline 0.18 ffms2 builds with 10bit output hack: libav-9a60b1f / ffmpeg-1e4d049 / FFmbc-0.7.1 Built from ffms2 6e0d654 (hack a9fe004) Mirrors: http://bit.ly/19TwDD3 |
|
19th August 2013, 14:09 | #278 | Link |
unsigned int
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
|
That works.
Now it crashes in a most bizarre place, with a most bizarre error: https://dpaste.de/Sh7t0/ I call it like this: Code:
c.f3kdb.Deband(ret, y=128)
__________________
Buy me a "coffee" and/or hire me to write code! |
19th August 2013, 15:00 | #279 | Link | |
Registered User
Join Date: Aug 2007
Posts: 218
|
Quote:
EDIT: Fixed in latest commit.
__________________
f3kdb 1.5.1 / MP_Pipeline 0.18 ffms2 builds with 10bit output hack: libav-9a60b1f / ffmpeg-1e4d049 / FFmbc-0.7.1 Built from ffms2 6e0d654 (hack a9fe004) Mirrors: http://bit.ly/19TwDD3 Last edited by SAPikachu; 20th August 2013 at 02:49. |
|
28th September 2013, 11:11 | #280 | Link |
Registered Developer
Join Date: Sep 2006
Posts: 9,140
|
I've been working on a debanding algorithm for madVR. I've taken the core algorithm idea of flash3kyuu_deband (which is really extremely simple), but modified it a bit. Wanted to let you know what I did, so you can implement the same thing in flash3kyuu_deband, if you like. Basically there's one point where the algorithm decides whether to use the original pixel value or the average of the 4 reference pixels. I've improved this decision making which allowed me to increase the thresholds a little bit. This results in stronger debanding, with hopefully not much more detail loss.
Of course the additional checks will eat up quite a bit of performance (and might be hard to implemented with SSE?), so I'm not sure if you want to do this, but that's your choice, of course. Some of the checks might be a bit redundant, I'm not sure. But I thought I'd rather add a few more checks to make sure the higher thresholds don't come with too many negative side effects... Basically my decision making looks like this: Code:
// orgPixel = original pixel value // refPixel = one of the 4 reference pixels selected by the algorithm // surPixel = one of the 8 pixels directly surrounding the original pixel // refPixelsAvg = simple mean average of the 4 refPixels // localContrast = max dif between the 8 surPixels and the orgPixel // surroundContrast = max dif between the 4 * 9 surPixels left, top, right and bottom of the "localContrast" 9 pixel block // maxRefPixelsDif = max dif between the 4 refPixels and the orgPixel // refPixelsDifSum = sum of the absolute dif between each refPixel and the orgPixel float3 result = ( (abs(refPixelsAvg - orgPixel) > 2.0 / 255.0) || (localContrast > 2.5 / 255.0) || (surroundContrast > 3.5 / 255.0) || (maxRefPixelsDif > 3.5 / 255.0) || (refPixelsDifSum > 6.5 / 255.0) ) ? orgPixel : refPixelsAvg; // in pixel shaders one 8bit step is 1.0 / 255.0 Last edited by madshi; 28th September 2013 at 11:15. |
Tags |
avisynth, deband |
Thread Tools | Search this Thread |
Display Modes | |
|
|