[FFmpeg-devel] libavfilter-soc: negate filter artifacts
Vitor Sessak
vitor1001
Mon Jul 20 05:55:41 CEST 2009
Stefano Sabatini wrote:
> 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;
> }
I think the problem here is that YUV (and not YUVJ) has Y data in the
16...235 range. So ideally one would negate 235 <-> 16 (see
imgconvert.c:47). But as you show in your message, the code is buggy.
-Vitor
More information about the ffmpeg-devel
mailing list