[FFmpeg-devel] libavfilter-soc: negate filter artifacts
Stefano Sabatini
stefano.sabatini-lala
Sun Jul 19 10:48:00 CEST 2009
Hi,
I wonder what's the point of the default offesets assigned in the config_props:
static int config_props(AVFilterLink *link)
{
NegContext *neg = link->dst->priv;
avcodec_get_chroma_sub_sample(link->format, &neg->hsub, &neg->vsub);
switch(link->format) {
case PIX_FMT_YUVJ444P:
case PIX_FMT_YUVJ422P:
case PIX_FMT_YUVJ420P:
case PIX_FMT_YUVJ440P:
neg->offY =
neg->offUV = 0;
break;
default:
neg->offY = -4;
neg->offUV = 1;
}
return 0;
}
This is causing artifacts, for example with pixfmt = yuv420p we have:
inrow[j] = 255
outrow[j] = 255 - inrow[j] + neg->offY =
= 255 - 255 + -4 = -4 = 251
Simply leaving the offY/UV values to 0 seems to fix the issue in this
case, would be that a valid fix?
Also can someone comment on the usage of the offY / offUV fields?
Regards.
--
FFmpeg = Faboulous Free Mortal Peaceful Energized God
More information about the ffmpeg-devel
mailing list