[FFmpeg-soc] [soc]: r1867 - in libavfilter: avfilter.c diffs/04_ffmpeg_filters.diff

Bobby Bingham uhmmmm at gmail.com
Sat Feb 9 17:34:04 CET 2008


On Sat,  9 Feb 2008 12:03:35 +0100 (CET)
vitor <subversion at mplayerhq.hu> wrote:

> Author: vitor
> Date: Sat Feb  9 12:03:35 2008
> New Revision: 1867
> 
> Log:
> The filter framework as is hangs with filters that 
> modify the input buffer, even if it asks for the right 
> permission. This is a fix for that.
> See "Box blurring with libavfilter" thread in libav-user.
> 
> 
> Modified:
>    libavfilter/avfilter.c
>    libavfilter/diffs/04_ffmpeg_filters.diff
> 

[...]

>  
>  void avfilter_draw_slice(AVFilterLink *link, int y, int h)
> @@ -253,6 +256,7 @@ void avfilter_draw_slice(AVFilterLink *l
>      if(link->srcpic) {
>          avcodec_get_chroma_sub_sample(link->format, &hsub, &vsub);
>  
> +        link->cur_pic->pts = link->srcpic->pts;
>          src[0] = link->srcpic-> data[0] + y * link->srcpic->
> linesize[0]; dst[0] = link->cur_pic->data[0] + y *
> link->cur_pic->linesize[0]; for(i = 1; i < 4; i ++) {

This is probably better done in avfilter_start_frame.  That way it's
not done repeatedly for each slice, and the filter can change the pts
of the frame in its own start_frame if it wants.

[...]

> @@ -76,7 +76,10 @@ Index: ffmpeg.c
>  +    FilterInPriv *priv = link->src->priv;
>  +    AVFilterPicRef *picref;
>  +
> -+    picref = avfilter_get_video_buffer(link, AV_PERM_WRITE);
> ++    /* This picture will be needed unmodified later for decoding
> the next ++     * frame */
> ++    picref = avfilter_get_video_buffer(link, AV_PERM_PRESERVE |
> ++                                             AV_PERM_REUSE2);

You should probably keep the AV_PERM_WRITE flag in there as well.


-- 
Bobby Bingham
Never trust atoms.  Or anything made of atoms.
このメールは再利用されたバイトでできている。



More information about the FFmpeg-soc mailing list