[FFmpeg-devel] port mplayer eq filter to libavfilter
Stefano Sabatini
stefano.sabatini-lala
Wed Nov 24 19:18:07 CET 2010
On date Wednesday 2010-11-24 15:21:20 +0800, William Yu encoded:
> Hi.
> I have moved process to draw_slice.
> And i have fix problem you pointd out me. Please check it. Thanks.
[...]
> +/**
> + * @file
> + * Adjust brightness and/or contrast of the input video
> + * Ported from MPlayer libmpcodecs/vf_eq.c.
> + */
> +
> +#include "libavutil/cpu.h"
> +#include "libavutil/common.h"
> +#include "avfilter.h"
> +#include "eq.h"
> +
> +typedef struct EQContext {
> + int brightness; ///< scale from -100 to 100
> + int contrast; ///< scale from -100 to 100
> + void (*process)( ///< process function
> + uint8_t *dst,
> + int dst_stride,
> + uint8_t *src,
> + int src_stride,
> + int w, int h,
> + int brightness,
> + int contrast);
> +} EQContext;
> +
> +static void process_c(
> + uint8_t *dst,
> + int dst_stride,
> + uint8_t *src,
> + int src_stride,
> + int w, int h,
> + int brightness, int contrast
> +)
Now that dst == src you can simplify the code of this function, same
for the assembly, being myself unable to fix the assembly I'll leave
this to you or to someone else with some assembly knowledge and which
wants to spend few minutes on that, I'll let Michael to decide if this
has to block commit.
For the rest there are some style nitpicks (e.g. ( foo ) => (foo),
and you can save some lines using less "\n" when it makes sense but I
can fix that before committing).
--
FFmpeg = Fancy and Frightening Marvellous Portable Elitist Gem
More information about the ffmpeg-devel
mailing list