View Full Version : Anti-Black-Blocking Filter Idea
kilg0r3
21st March 2003, 11:17
Yes another one from a none coder, so I'll keep it short.
when playing around with levels in avisynth, I noticed that no matter how high a set the input_black value, the chroma information was still present and visible.
It has been reportet that the blocks visible in dark areas especially of mpeg4 encodes are colored, and, that this has been their most annoying property. I suspect that the chroma is handled crudely in mpeg4 since differences on the chroma plane are less visible to the human eye. But, when there is <i>nothing left but chroma</i>, the eye notices it quite well.
So, why not write a filter that gradually deletes the chroma information in darker zones of the video?
Not as short as I wanted it.
bilu
21st March 2003, 11:46
kilg0r3,
If you're watching movies over TV-out, look at this thread also:
http://forum.doom9.org/showthread.php?s=&threadid=48987
Bilu
Bulletproof
21st March 2003, 11:50
There is a filter that already does this, its called coring. Unfortunatly it's not perfect and causes other artifacts in the video.
bilu
21st March 2003, 12:21
@Bulletproof
Don't know if you're talking about this filter:
http://www.avisynth.org/index.php?page=ColorYUV
but from the site:
Levels can be set to either "TV->PC" or "PC->TV". This will perform a range conversion. Normally YUV values are not mapped from 0 to 255 (PC range), but a limited range(TV range). This performs conversion between the two formats. If nothing is entered as parameter, no conversion will be made (default operation).
Opt can be either "coring" or "" (nothing, default setting). Specifying "coring" will clip your YUV values to the valid TV-ranges. Otherwise "invalid results" will be accepted.
Usage: ColorYUV(opt="coring), ColorYUV(levels="PC->TV")
I prefer to use Levels because it converses the range, without need for clipping luma/chroma.
Bilu
sh0dan
21st March 2003, 13:10
opt="coring" performs exactly the same function as "Limiter()" - and not the same as described above.
You will see artifacts with the filter above - this cannot be avoided. A red lighted room for instance will have fading colors in dark areas - this _will_ be visible.
It could be made a bit smarter:
luma_level = 32 - (luma - 16)
if (luma_level > 0) {
chroma_level = 32 - ( abs(chroma_u - 80) + abs(chroma_v - 80) )
if (chroma_level > 0) {
final_level = chroma_level + luma_level
inv_final = 64 - final_level
chroma_u = (chroma_u * inv_final) + (128 * final_level) / 64;
chroma_v = (chroma_v * inv_final) + (128 * final_level) / 64;
}
}
This means that "The closer Y is to 16 (black)" and "The closer chroma is to 128 (white)", "The less will the final pixel be saturated".
(Code is written for readability - optimizations are quite obvious).
bilu
21st March 2003, 13:32
@sh0dan
Do you mean opt="coring" or Limiter() are the best options?
Bilu
sh0dan
21st March 2003, 14:25
opt="coring" / Limiter will probably not help the artifacts described at all, so there would have to be written a filter. I haven't seen any "coring" filter, so I cannot say anything about that one.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.