[FFmpeg-devel] port mplayer eq filter to libavfilter

William Yu genwillyu
Thu Nov 25 10:27:48 CET 2010


Hi.
I have remove unnecessary param from process functions.
Please check this patch. Thanks.

2010/11/25 Stefano Sabatini <stefano.sabatini-lala at poste.it>:
> 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
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vf_eq.diff
Type: application/octet-stream
Size: 12120 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101125/828172c7/attachment.obj>



More information about the ffmpeg-devel mailing list