[FFmpeg-devel] port mplayer eq filter to libavfilter
William Yu
genwillyu
Tue Nov 23 10:30:41 CET 2010
2010/11/23 Bobby Bingham <uhmmmm at gmail.com>:
> On Mon, 22 Nov 2010 20:33:11 +0800
> William Yu <genwillyu at gmail.com> wrote:
>> [...]
>> +
>> +static void end_frame(AVFilterLink *link)
>> +{
>> + EQContext * eq = link->dst->priv;
>> + AVFilterBufferRef *in = link->cur_buf;
>> + AVFilterBufferRef *out = link->dst->outputs[0]->out_buf;
>> +
>> + eq->process(out->data[0], out->linesize[0],
>> + in->data[0], in->linesize[0],
>> + link->w, link->h, eq->brightness, eq->contrast);
>> + copy_chroma(in,out,link);
>> +
>> + avfilter_unref_buffer(in);
>> + avfilter_draw_slice(link->dst->outputs[0], 0, link->h, 1);
>> + avfilter_end_frame(link->dst->outputs[0]);
>> + avfilter_unref_buffer(out);
>> +}
>
> It should be possible to do this processing within draw_slice.
I think process all slice within end_frame is more efficient. am i right?
But i think stefano.sabatini's suggestion:
"directly process the input picture, no need to
allocate another one and to copy back the chroma planes"
is better solution. I am work on it.
>
>> [...]
>
> --
> Bobby Bingham
> ???????`????????????????????????????????????
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
More information about the ffmpeg-devel
mailing list