On Wed, Mar 31, 2010 at 01:23:29AM -0400, Brandon Mintern wrote: > On Wed, Mar 31, 2010 at 12:43 AM, Brandon Mintern <[email protected]> wrote: > > I am happy to present my first-ever open source code contribution, a > > "fade" filter for libavfilter! > [snip] [...]
> +static void draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
> +{
> + FadeContext *fade = link->dst->priv;
> + AVFilterPicRef *in = link->cur_pic;
> + AVFilterPicRef *out = link->dst->outputs[0]->outpic;
> + uint8_t *inrow, *outrow;
> + int i, j, plane;
> +
> + /* luma plane */
> + inrow = in-> data[0] + y * in-> linesize[0];
> + outrow = out->data[0] + y * out->linesize[0];
> + for(i = 0; i < h; i ++) {
> + for(j = 0; j < link->w; j ++)
> + outrow[j] = (uint8_t) ((float) inrow[j] * fade->fade_factor +
> 0.5);
please avoid floats, it makes regression testing unneccesarily hard
Its probably ok to use floats/doubles in init, but it feels wrong
at the pixel level
anyway, real review and approval left to vitor or bobby
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Avoid a single point of failure, be that a person or equipment.
signature.asc
Description: Digital signature
_______________________________________________ FFmpeg-soc mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc
