I'm a big fan of AVISynth, and even though I'm still a newbie, I've had terrific results using some of its many plugins and functions to enhance my encodes. One of the best quality enhancers is called LimitedSharpen, written by Didee, and used by many, including myself.
The only problem I have with LimitedSharpen is the slow processing time, especially on my 2.4Ghz P4. I started testing some alternate enhancement methods, and I think I've found one that's decent.
The Test
------------------------------------
Source File - 720p 495 frames
------------------------------------
---------limited sharpen test-----------
SetMemoryMax(240)
import("d:\plugins\limitedsharpen.avs")
LoadPlugin("d:\plugins\DGDecode.dll")
LoadPlugin("d:\plugins\masktools.dll")
LoadPlugin("d:\plugins\warpsharp.dll")
MPEG2Source("D:\lost\x.d2v")
Converttoyv12()
SelectEven()
Crop(4,4,-4,-4)
limitedsharpen(dest_x=720,dest_y=480)
-------------end--------------------------
=============================================
*Limited Sharpen Results - 244 seconds to encode ~ 2fps*
advantages--> natural looking sharpening in picture details, outstanding results
disadvantages--> slow, can make macro blocks more visible
=============================================
----------add noise test-----------------
SetMemoryMax(240)
LoadPlugin("d:\plugins\DGDecode.dll")
LoadPlugin("d:\plugins\bergfiltercollection.dll")
LoadPlugin("d:\plugins\undot.dll")
MPEG2Source("D:\lost\x.d2v")
Converttoyv12()
SelectEven()
Crop(4,4,-4,-4)
Lanczos4Resize(720,480)
MPlayerNoise(2,2)
undot()
-------------end-------------------------
==============================================
*Add Noise Results - 72 seconds to encode ~ 7fps*
advantages--> fast, perceived quality enhancement, masks some macro blocking
disadvantages--> details are not as pronounced, less contrast
==============================================
Visual Comparisons - (Limited Sharpen is the Top image)
![]()
+ Reply to Thread
Results 1 to 7 of 7
-
-
You mentioned some noticable blocks after LimitedSharpen() was
applied..
Regarding the pics ...
I was looking at the RGB and YUV values of the (before and after)
during each load, from a tool I'm working on to study DCT, where I
have a 64x64 grid for viewing images, and within that grid, an
inverse 8x8 DCT image, then I have next to it, an 8x8 grid enlarged
8x. In another area, I have a group of 2-D grids that display the
values of the pixels within that 8x 8x8 grid, WYSIWYG style. And,
as I move across the grid in 64px steps, I can get a birds-eye
view of the values as they change. This is strickly for analizing
and studying images; DCT; and their effects, which include other
related items such as Quantization; DCT; ZigZag; YUV; RGB; etc. etc.
It is a work in progress at this time.
Anyways..
But, I was wondering, if I were to post some numbers associated
with an A/B comparison, would it become beneificial in the refining
of LimitedSharpen() 's performance ?? maybe reducing the after effects
(blocks) you noticed ?? ..adding to the SUBject topic..
to Increase Quality of encodes..
Maybe at this time, the DCT is not as important as the YUV values
of the image produced from your encodes. I think they are, but I
feel I should hold on to that until I'm sure I have DCT working
100% properly. (having some trouble with the proper sequence)
But I think that YUV values might come in handy. I don't know.., I
was just sharing my own observation, using my tool as an exercise (aid)
to your topic.
But, fwiw.., I think your pics show good improvement of this filter.
Would it matter to upload two small encoded mpeg clips w/ and w/out
the filter step ??
.
Another fwiw.., I think that the best method for testing any filtering
is through the mechanism of a CQ mode encode, because CQ is driven
by quality. Filesize from a CQ encode could be used as a reference
for marked improvement in a filter-chain analizing step, and IMO, would
be invaluable to increasing quality of encodes.
-->
-vhelp 3423 -
Vhelp-
LimitedSharpen doesn't add macro blocks, it just makes existing ones more obvious. As long as your source is free of them, you won't see any after LimitedSharpen-ing.
I think DiDee over at http://forum.doom9.org would be the person to discuss the speedup of LimitedSharpen, as he's the author. He's heared the complaints about the speed many times. I know he's working on a faster version called LimitedSharpenEX. He also wrote an upsizer function called IIP (integrated image processor) which is SPECTACULAR, but runs at .25FPS on my system
I'd like to see your app when you're ready to show it
Can't upload a clip of the processed material - I deleted everything but the final encode. Besides, I suspect the SWAT team would show up at my house if I posted copyrighted material
I agree about CBR encoding to test quality. BTW, with VBR the final file sizes of the two enhanced encodes were different, with the "Add Noised" one being around 25% larger than the "LimitedSharpened" one. Makes sense. -
Hi-
I agree about CBR encoding to test quality.
You mean CQ (constant quant), right? Anyway, I don't suppose you still have a source pic to compare with, do you? Maybe resized also to 720x480, but without the filtering? Nice looking pics. -
.
.
oh. I thought your source was from satellite tv on
account of the (ABC) logo on bottom right.
Your source is nice and clean, compared to my noisy antenna
which would reck hauvic for any sharpness filter.
(As we speak (write) all of the sudden, my antenna is *much*
cleaner than usual this late night) Anyways.
The tool I'm working on is personal. But I had hopes for
sharing it with possible applications for image analysis
and diagnosis purposes, as I mentioned earlier in my first
post. We'll see what the future brings
..and now back on target w/ thread topic..
I know this may sound crazy, but I have worked with this
scenario many times in my test endeavors for quality mpegs,
and with good results..
.
But, have you tried upscaling your video frame size,
then add LimitedSharpen() to the source encode ??
Yes. It will slow down the encoding. But, if quality is
your main concirn (for experimentation purposes) then don't
hesitate to give it a try going against the grain here
.
As I said, when performing test encodes for quality, I found
that the best method is with CQ, because the filesize reveals
the quality/aspect produced by the method of the 'filter-chain' 's
strength after encoding to mpeg. And, the results are easily
depictable when an A/B comaprison of CQ encodes take place.
Then, the final encoded mpegs compared by filesize and quality
can be realized.
For instance.
REPORT 1
Code:LN file size CQ filter qlty param fctr scale ----------------------------------------------- 1 - test1.mpg 12mb 60 .5 4 2 - test2.mpg 11mb 67 .2 5 3 - test3.mpg 15mb 72 .3 1
Code:LN file size CQ filter qlty param fctr scale ----------------------------------------------- 1 - test1.mpg 12mb 60 .5 4 2 - test2.mpg 14mb 67 .4 4 3 - test3.mpg 15mb 72 .3 1
scenario. Because the test file was 11mb (smallest) and the quality factor
was highest, @ 5 (1-5 where 1 is lowest quality) This is purely
theoretical here.
But, in Report 2, the results reported LINE 1 being the best filter-chain
scenario. Because the test file was 12mb (smallest) and the quality factor
was highest, @ 4 (1-5 where 1 is lowest quality) This is purely
theoretical here.
CQ is mainly a tool to gauge quality performance in this test
situation.
Once the proper filter-chain and param settings are found, you
can change your encoding mode back to your prefered mode of VBR
or whatever.
Hope I have been helpful here :P
-vhelp 3426
EDITED ... above -
Well, looks I did find a 10 second example clip for non commercial demonstration purposes. Zip file includes the 720p source and a second A/B comparison of the two filters mentioned above.
This is from a OTA capture I did.
Best to load the file(s) in VirtualDubMod so you can actually see the difference. LimitedSharpen looks great, but darkens background details, as you'll see. 17MB
http://www.turboupload.com/d/4579/plugin_comparison.zip.html -
I didn't really notice the darkness when I viewed the video, except
for when I was at a certain angled facing my LCD monitor.
Are you viewing on an LCD monitor by any chance ?? ..this could
be tainting your perception, because these monitors tent to loose
there focus from an angle, and what looks dark in one area (Top)
will look bright, Bottom.., depending on how you are viewing at
a given angle.
Something is missing from your experiment. Bitrate, and the method
of encode (ie, VBR vs. CBR vs. CQ) for your final MPEG-2 project.
You see, I feel that projects should be situated around a time span.
For obvious reasons, I choose 60 minutes for DVD holding 4.3g capacity.
With this amount of time, given the capacity, I can be very generous
with the bitrate, and produce near-match reproductions, even in my
noisy antenna reception..
Refer here for an example of near-match reproduction (I refered to it
as a lossless process)
--> Best codec
Tomorrow, I'll give a demonstration in your situation that might help
you out in your seeking for increased quality methods
.
But for now, I'm all tuckered out from today's exhaustive researching of
my own, in addition to these forums, and then some. pfew.
-vhelp 3432
Similar Threads
-
"Quality Enhanced Bitrate Squeezer" QEBS FASM Encodes
By iR8 in forum Video ConversionReplies: 9Last Post: 3rd Apr 2013, 18:29 -
My blu-ray experiment not going well
By adamf154 in forum Blu-ray RippingReplies: 7Last Post: 10th Apr 2010, 06:11 -
increasing web cam quality using ffdshow or other software?
By shimi in forum Newbie / General discussionsReplies: 4Last Post: 17th Jan 2009, 10:25 -
increasing video quality
By aruwin in forum Newbie / General discussionsReplies: 3Last Post: 30th Sep 2008, 03:07 -
Best way to experiment
By demonwarrior in forum Newbie / General discussionsReplies: 16Last Post: 14th Dec 2007, 03:11