[FFmpeg-devel] lavfi noise generator

Vitor Sessak vitor1001
Thu Jan 15 21:53:06 CET 2009

Stefano Sabatini wrote:
> On date Saturday 2009-01-03 18:09:49 +0100, Stefano Sabatini encoded:
>> On date Monday 2008-12-29 13:45:23 +0100, Michael Niedermayer encoded:
>>> On Mon, Dec 29, 2008 at 11:39:30AM +0100, Stefano Sabatini wrote:
>>>> On date Monday 2008-12-29 00:52:18 +0100, Michael Niedermayer encoded:
>>>>> On Mon, Dec 29, 2008 at 12:25:02AM +0100, Stefano Sabatini wrote:
>>>>>> Hi all,
>>>>>> no Michael I'm not posting it for you or others to review it, I'm just
>>>>> no but i reject it anyway
>>>>> your code is crap, sorry
>>>>> People didnt want to port libmpcodecs when i suggested it, i dont mind
>>>>> this at all, libmpcodecs has its serious issues but this does not mean i
>>>>> will accept code that is inferrior than it.
>>>>> vf_noise.c should be MUCH faster than your code.
>>> [...]
>>>> As for the speed concerns, I see two major issues to be addressed, the
>>>> use of the av_random() for setting every single byte, ideally we
>>>> should set the whole buffer for example reading from /dev/urandom but
>>>> this would not be portable, and the av_picture_copy() can be avoided
>>>> using properly the permissions system and passing a picture reference.
>>> did you read vf_noise.c ?
>> What about a noise module in libavutil (based on your vf_noise.c)?
>> For example it may be shared between a noise source and filter, also I
>> think those routines may be useful also in other places.
> In attachment my idea, yes it still needs some rework (mainly I need
> to understand better the code of noise.[ch]), I basically just did
> some monkey translation from your code.

Just one comment:

> static int query_formats(AVFilterContext *ctx)
> {
>     /* all YUV planar formats */
>     avfilter_set_common_formats(ctx,
>                                 avfilter_make_format_list(10,
>                                                           PIX_FMT_YUV444P,  PIX_FMT_YUV422P,  PIX_FMT_YUV420P,
>                                                           PIX_FMT_YUV411P,  PIX_FMT_YUV410P,
>                                                           PIX_FMT_YUVJ444P, PIX_FMT_YUVJ422P, PIX_FMT_YUVJ420P,
>                                                           PIX_FMT_YUV440P,  PIX_FMT_YUVJ440P)
>         );

Can't the filter be simply modified to also accept most RGB formats?


More information about the ffmpeg-devel mailing list