[FFmpeg-soc] [soc]: r5890 - in libavfilter: checkout.sh diffs/00_configure.diff diffs/01_build.diff diffs/03_doc_filters.diff vf_drawbox.c vf_drawtext.c vf_fifo.c vf_fps.c vf_hflip.c vf_negate.c vf_overlay.c vf...

stefano subversion at mplayerhq.hu
Wed Aug 11 19:40:05 CEST 2010


Author: stefano
Date: Wed Aug 11 19:40:04 2010
New Revision: 5890

Log:
Update to FFmpeg r24776 / libswscale r31956.

Modified:
   libavfilter/checkout.sh
   libavfilter/diffs/00_configure.diff
   libavfilter/diffs/01_build.diff
   libavfilter/diffs/03_doc_filters.diff
   libavfilter/vf_drawbox.c
   libavfilter/vf_drawtext.c
   libavfilter/vf_fifo.c
   libavfilter/vf_fps.c
   libavfilter/vf_hflip.c
   libavfilter/vf_negate.c
   libavfilter/vf_overlay.c
   libavfilter/vf_rotate.c
   libavfilter/vf_setpts.c
   libavfilter/vf_split.c
   libavfilter/vf_transpose.c
   libavfilter/vsrc_movie.c

Modified: libavfilter/checkout.sh
==============================================================================
--- libavfilter/checkout.sh	Wed Aug 11 09:26:53 2010	(r5889)
+++ libavfilter/checkout.sh	Wed Aug 11 19:40:04 2010	(r5890)
@@ -1,11 +1,11 @@
 #! /bin/sh
 
 echo "checking out pristine ffmpeg"
-svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk/ ffmpeg -r24545
+svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk/ ffmpeg -r24776
 
 echo "downloading the corresponding version of swscale"
 cd ffmpeg/libswscale
-svn up -r31782
+svn up -r31956
 cd ../..
 
 echo "patching ffmpeg"

Modified: libavfilter/diffs/00_configure.diff
==============================================================================
--- libavfilter/diffs/00_configure.diff	Wed Aug 11 09:26:53 2010	(r5889)
+++ libavfilter/diffs/00_configure.diff	Wed Aug 11 19:40:04 2010	(r5890)
@@ -1,6 +1,6 @@
 Index: configure
 ===================================================================
---- configure	(revision 24545)
+--- configure	(revision 24776)
 +++ configure	(working copy)
 @@ -168,6 +168,7 @@
                             and libraw1394 [no]
@@ -10,7 +10,7 @@ Index: configure
    --enable-libgsm          enable GSM support via libgsm [no]
    --enable-libmp3lame      enable MP3 encoding via libmp3lame [no]
    --enable-libnut          enable NUT (de)muxing via libnut,
-@@ -872,6 +873,7 @@
+@@ -873,6 +874,7 @@
      libdc1394
      libdirac
      libfaac
@@ -18,7 +18,7 @@ Index: configure
      libgsm
      libmp3lame
      libnut
-@@ -1014,6 +1016,7 @@
+@@ -1015,6 +1017,7 @@
      llrintf
      local_aligned_16
      local_aligned_8
@@ -26,15 +26,18 @@ Index: configure
      log2
      log2f
      loongson
-@@ -1381,6 +1384,7 @@
+@@ -1380,6 +1383,10 @@
+ tcp_protocol_deps="network"
  udp_protocol_deps="network"
  
- # filters
++# filters
 +drawtext_filter_deps="libfreetype"
- movie_filter_deps="avfilter_lavf"
- avfilter_lavf_deps="avformat"
- 
-@@ -2579,6 +2583,7 @@
++movie_filter_deps="avformat"
++
+ # libraries
+ avdevice_deps="avcodec avformat"
+ avformat_deps="avcodec"
+@@ -2602,6 +2609,7 @@
  check_struct "sys/time.h sys/resource.h" "struct rusage" ru_maxrss
  check_func  inet_aton $network_extralibs
  check_func  isatty
@@ -42,7 +45,7 @@ Index: configure
  check_func  ${malloc_prefix}memalign            && enable memalign
  check_func  mkstemp
  check_func  ${malloc_prefix}posix_memalign      && enable posix_memalign
-@@ -2661,6 +2666,7 @@
+@@ -2684,6 +2692,7 @@
                        require  libdirac libdirac_decoder/dirac_parser.h dirac_decoder_init $(pkg-config --libs dirac) &&
                        require  libdirac libdirac_encoder/dirac_encoder.h dirac_encoder_init $(pkg-config --libs dirac)
  enabled libfaac    && require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac

Modified: libavfilter/diffs/01_build.diff
==============================================================================
--- libavfilter/diffs/01_build.diff	Wed Aug 11 09:26:53 2010	(r5889)
+++ libavfilter/diffs/01_build.diff	Wed Aug 11 19:40:04 2010	(r5890)
@@ -1,15 +1,12 @@
 Index: libavfilter/Makefile
 ===================================================================
---- libavfilter/Makefile	(revision 24545)
+--- libavfilter/Makefile	(revision 24776)
 +++ libavfilter/Makefile	(working copy)
-@@ -1,10 +1,11 @@
- include $(SUBDIR)../config.mak
- 
+@@ -3,8 +3,9 @@
  NAME = avfilter
--FFLIBS = avcodec avcore avutil swscale
-+FFLIBS = avcodec avcore avutil
-+FFLIBS-$(CONFIG_SCALE_FILTER)  += swscale
- FFLIBS-$(CONFIG_AVFILTER_LAVF) += avformat
+ FFLIBS = avcodec avcore avutil
+ FFLIBS-$(CONFIG_SCALE_FILTER) += swscale
++FFLIBS-$(CONFIG_MOVIE_FILTER) += avformat
  
 -HEADERS = avfilter.h
 +HEADERS = avfilter.h avfiltergraph.h
@@ -51,7 +48,7 @@ Index: libavfilter/Makefile
  OBJS-$(CONFIG_NULLSINK_FILTER)               += vsink_nullsink.o
 Index: libavfilter/allfilters.c
 ===================================================================
---- libavfilter/allfilters.c	(revision 24545)
+--- libavfilter/allfilters.c	(revision 24776)
 +++ libavfilter/allfilters.c	(working copy)
 @@ -36,19 +36,32 @@
  

Modified: libavfilter/diffs/03_doc_filters.diff
==============================================================================
--- libavfilter/diffs/03_doc_filters.diff	Wed Aug 11 09:26:53 2010	(r5889)
+++ libavfilter/diffs/03_doc_filters.diff	Wed Aug 11 19:40:04 2010	(r5890)
@@ -1,6 +1,6 @@
 Index: doc/filters.texi
 ===================================================================
---- doc/filters.texi	(revision 24545)
+--- doc/filters.texi	(revision 24776)
 +++ doc/filters.texi	(working copy)
 @@ -39,6 +39,114 @@
  

Modified: libavfilter/vf_drawbox.c
==============================================================================
--- libavfilter/vf_drawbox.c	Wed Aug 11 09:26:53 2010	(r5889)
+++ libavfilter/vf_drawbox.c	Wed Aug 11 19:40:04 2010	(r5890)
@@ -92,7 +92,7 @@ static int config_input(AVFilterLink *li
     return 0;
 }
 
-static void draw_box(AVFilterPicRef *pic, BoxContext* context, box_color color)
+static void draw_box(AVFilterBufferRef *pic, BoxContext* context, box_color color)
 {
     int x, y;
     int channel;
@@ -100,14 +100,14 @@ static void draw_box(AVFilterPicRef *pic
     int xb = context->x;
     int yb = context->y;
 
-    for (y = yb; (y < yb + context->h) && y < pic->h; y++) {
+    for (y = yb; (y < yb + context->h) && y < pic->video->h; y++) {
         row[0] = pic->data[0] + y * pic->linesize[0];
 
         for (channel = 1; channel < 3; channel++)
             row[channel] = pic->data[channel] +
                 pic->linesize[channel] * (y>> context->vsub);
 
-        for (x = xb; (x < xb + context->w) && x < pic->w; x++)
+        for (x = xb; (x < xb + context->w) && x < pic->video->w; x++)
             if((y - yb < 3) || (yb + context->h - y < 4) ||
                (x - xb < 3) || (xb + context->w - x < 4)) {
                 row[0][x] = color.y;
@@ -121,11 +121,11 @@ static void end_frame(AVFilterLink *link
 {
     BoxContext *context = link->dst->priv;
     AVFilterLink *output = link->dst->outputs[0];
-    AVFilterPicRef *pic = link->cur_pic;
+    AVFilterBufferRef *pic = link->cur_buf;
 
     draw_box(pic,context,context->color);
 
-    avfilter_draw_slice(output, 0, pic->h, 1);
+    avfilter_draw_slice(output, 0, pic->video->h, 1);
     avfilter_end_frame(output);
 }
 

Modified: libavfilter/vf_drawtext.c
==============================================================================
--- libavfilter/vf_drawtext.c	Wed Aug 11 09:26:53 2010	(r5889)
+++ libavfilter/vf_drawtext.c	Wed Aug 11 19:40:04 2010	(r5890)
@@ -293,7 +293,7 @@ static int config_input(AVFilterLink *li
     yuv_color[2] = pic_ref->data[2][((x) >> (hsub)) + ((y) >> (vsub)) * pic_ref->linesize[2]]; \
 }
 
-static inline void draw_glyph(AVFilterPicRef *pic_ref, FT_Bitmap *bitmap, unsigned int x,
+static inline void draw_glyph(AVFilterBufferRef *pic_ref, FT_Bitmap *bitmap, unsigned int x,
                               unsigned int y, unsigned int width, unsigned int height,
                               unsigned char yuv_fgcolor[4], unsigned char yuv_bgcolor[4],
                               short int outline, int hsub, int vsub)
@@ -349,7 +349,7 @@ static inline void draw_glyph(AVFilterPi
     }
 }
 
-static inline void drawbox(AVFilterPicRef *pic_ref, unsigned int x, unsigned int y,
+static inline void drawbox(AVFilterBufferRef *pic_ref, unsigned int x, unsigned int y,
                            unsigned int width, unsigned int height,
                            unsigned char yuv_color[4], int hsub, int vsub)
 {
@@ -377,7 +377,7 @@ static inline void drawbox(AVFilterPicRe
     }
 }
 
-static void draw_text(AVFilterContext *ctx, AVFilterPicRef *pic_ref, int width, int height)
+static void draw_text(AVFilterContext *ctx, AVFilterBufferRef *pic_ref, int width, int height)
 {
     DrawTextContext *dtext = ctx->priv;
     FT_Face face = dtext->face;
@@ -461,11 +461,11 @@ static void draw_text(AVFilterContext *c
 static void end_frame(AVFilterLink *link)
 {
     AVFilterLink *output = link->dst->outputs[0];
-    AVFilterPicRef *pic_ref = link->cur_pic;
+    AVFilterBufferRef *pic_ref = link->cur_buf;
 
-    draw_text(link->dst, pic_ref, pic_ref->w, pic_ref->h);
+    draw_text(link->dst, pic_ref, pic_ref->video->w, pic_ref->video->h);
 
-    avfilter_draw_slice(output, 0, pic_ref->h, 1);
+    avfilter_draw_slice(output, 0, pic_ref->video->h, 1);
     avfilter_end_frame(output);
 }
 

Modified: libavfilter/vf_fifo.c
==============================================================================
--- libavfilter/vf_fifo.c	Wed Aug 11 09:26:53 2010	(r5889)
+++ libavfilter/vf_fifo.c	Wed Aug 11 19:40:04 2010	(r5890)
@@ -23,7 +23,7 @@
 
 typedef struct BufPic
 {
-    AVFilterPicRef *pic;
+    AVFilterBufferRef *pic;
     struct BufPic  *next;
 } BufPic;
 
@@ -48,12 +48,12 @@ static av_cold void uninit(AVFilterConte
 
     for(pic = buf->root.next; pic; pic = tmp) {
         tmp = pic->next;
-        avfilter_unref_pic(pic->pic);
+        avfilter_unref_buffer(pic->pic);
         av_free(pic);
     }
 }
 
-static void start_frame(AVFilterLink *link, AVFilterPicRef *picref)
+static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
 {
     BufferContext *buf = link->dst->priv;
 
@@ -84,7 +84,7 @@ static int request_frame(AVFilterLink *l
     /* by doing this, we give ownership of the reference to the next filter,
      * so we don't have to worry about dereferencing it ourselves. */
     avfilter_start_frame(link, buf->root.next->pic);
-    avfilter_draw_slice(link, 0, buf->root.next->pic->h, 1);
+    avfilter_draw_slice(link, 0, buf->root.next->pic->video->h, 1);
     avfilter_end_frame(link);
 
     if(buf->last == buf->root.next)

Modified: libavfilter/vf_fps.c
==============================================================================
--- libavfilter/vf_fps.c	Wed Aug 11 09:26:53 2010	(r5889)
+++ libavfilter/vf_fps.c	Wed Aug 11 19:40:04 2010	(r5890)
@@ -21,12 +21,13 @@
 
 /* TODO: improve handling of non-continuous timestamps (mpeg, seeking, etc) */
 
+#include "libavcore/parseutils.h"
 #include "avfilter.h"
 
 typedef struct {
     uint64_t timebase;
     uint64_t pts;
-    AVFilterPicRef *pic;
+    AVFilterBufferRef *pic;
     int videoend;
     int has_frame;
 } FPSContext;
@@ -39,7 +40,7 @@ static av_cold int init(AVFilterContext 
 
     rate = default_rate;
 
-    if (args && (av_parse_video_frame_rate(&rate, args) < 0)) {
+    if (args && (av_parse_video_rate(&rate, args) < 0)) {
         av_log(ctx, AV_LOG_ERROR, "Invalid frame rate: \"%s\"\n", args);
         rate = default_rate;
     }
@@ -51,13 +52,13 @@ static av_cold int init(AVFilterContext 
 static av_cold void uninit(AVFilterContext *ctx)
 {
     FPSContext *fps = ctx->priv;
-    if(fps->pic) avfilter_unref_pic(fps->pic);
+    if(fps->pic) avfilter_unref_buffer(fps->pic);
 }
 
-static void start_frame(AVFilterLink *link, AVFilterPicRef *picref)
+static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
 {
     FPSContext *fps = link->dst->priv;
-    if(fps->pic) avfilter_unref_pic(fps->pic);
+    if(fps->pic) avfilter_unref_buffer(fps->pic);
     fps->pic = picref;
 }
 
@@ -95,11 +96,11 @@ static int request_frame(AVFilterLink *l
                 return -1;
 
     fps->has_frame=0;
-    avfilter_start_frame(link, avfilter_ref_pic(fps->pic, ~AV_PERM_WRITE));
-    avfilter_draw_slice (link, 0, fps->pic->h, 1);
+    avfilter_start_frame(link, avfilter_ref_buffer(fps->pic, ~AV_PERM_WRITE));
+    avfilter_draw_slice (link, 0, fps->pic->video->h, 1);
     avfilter_end_frame  (link);
 
-    avfilter_unref_pic(fps->pic);
+    avfilter_unref_buffer(fps->pic);
     fps->pic = NULL;
 
     fps->pts += fps->timebase;

Modified: libavfilter/vf_hflip.c
==============================================================================
--- libavfilter/vf_hflip.c	Wed Aug 11 09:26:53 2010	(r5889)
+++ libavfilter/vf_hflip.c	Wed Aug 11 19:40:04 2010	(r5890)
@@ -53,14 +53,14 @@ static int config_props(AVFilterLink *li
 static void draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
 {
     FlipContext    *flip = link->dst->priv;
-    AVFilterPicRef *in   = link->cur_pic;
-    AVFilterPicRef *out  = link->dst->outputs[0]->outpic;
+    AVFilterBufferRef *in   = link->cur_buf;
+    AVFilterBufferRef *out  = link->dst->outputs[0]->out_buf;
     uint8_t *inrow, *outrow;
     int i, j, plane;
 
     /* luma plane */
     outrow = out->data[0] + y * out->linesize[0];
-    inrow  = in-> data[0] + y * in-> linesize[0] + in->w -1;
+    inrow  = in-> data[0] + y * in-> linesize[0] + in->video->w -1;
     for(i = 0; i < h; i++) {
         for(j = 0; j < link->w; j++)
             outrow[j] = inrow[-j];

Modified: libavfilter/vf_negate.c
==============================================================================
--- libavfilter/vf_negate.c	Wed Aug 11 09:26:53 2010	(r5889)
+++ libavfilter/vf_negate.c	Wed Aug 11 19:40:04 2010	(r5890)
@@ -67,8 +67,8 @@ static int config_props(AVFilterLink *li
 static void draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
 {
     NegContext *neg = link->dst->priv;
-    AVFilterPicRef *in  = link->cur_pic;
-    AVFilterPicRef *out = link->dst->outputs[0]->outpic;
+    AVFilterBufferRef *in  = link->cur_buf;
+    AVFilterBufferRef *out = link->dst->outputs[0]->out_buf;
     uint8_t *inrow, *outrow;
     int i, j, plane;
 

Modified: libavfilter/vf_overlay.c
==============================================================================
--- libavfilter/vf_overlay.c	Wed Aug 11 09:26:53 2010	(r5889)
+++ libavfilter/vf_overlay.c	Wed Aug 11 19:40:04 2010	(r5890)
@@ -50,7 +50,7 @@ typedef struct {
      *  pics[1][0..1] are pictures for the sub image.
      *  pics[x][0]    are previously outputted images.
      *  pics[x][1]    are queued, yet unused frames for each input. */
-    AVFilterPicRef *pics[2][2];
+    AVFilterBufferRef *pics[2][2];
 
     int bpp;                    //< bytes per pixel
     int hsub, vsub;             //< chroma subsampling
@@ -79,7 +79,7 @@ static av_cold void uninit(AVFilterConte
     for(i = 0; i < 2; i ++)
         for(j = 0; j < 2; j ++)
             if(over->pics[i][j])
-                avfilter_unref_pic(over->pics[i][j]);
+                avfilter_unref_buffer(over->pics[i][j]);
 }
 
 static int query_formats(AVFilterContext *ctx)
@@ -163,12 +163,12 @@ static void shift_input(OverlayContext *
 {
     assert(over->pics[idx][0]);
     assert(over->pics[idx][1]);
-    avfilter_unref_pic(over->pics[idx][0]);
+    avfilter_unref_buffer(over->pics[idx][0]);
     over->pics[idx][0] = over->pics[idx][1];
     over->pics[idx][1] = NULL;
 }
 
-static void start_frame(AVFilterLink *link, AVFilterPicRef *picref)
+static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
 {
     OverlayContext *over = link->dst->priv;
     /* There shouldn't be any previous queued frame in this queue */
@@ -201,8 +201,8 @@ static int lower_timestamp(OverlayContex
     return (over->pics[0][1]->pts > over->pics[1][1]->pts);
 }
 
-static void copy_image_rgb(AVFilterPicRef *dst, int x, int y,
-                           AVFilterPicRef *src, int w, int h, int bpp)
+static void copy_image_rgb(AVFilterBufferRef *dst, int x, int y,
+                           AVFilterBufferRef *src, int w, int h, int bpp)
 {
     AVPicture pic;
 
@@ -210,7 +210,7 @@ static void copy_image_rgb(AVFilterPicRe
     pic.data[0] += x * bpp;
     pic.data[0] += y * pic.linesize[0];
 
-    if (src->pic->format == PIX_FMT_BGRA) {
+    if (src->format == PIX_FMT_BGRA) {
         for (y = 0; y < h; y++) {
                   uint8_t *optr = pic.data[0]  + y * pic.linesize[0];
             const uint8_t *iptr = src->data[0] + y * src->linesize[0];
@@ -224,7 +224,7 @@ static void copy_image_rgb(AVFilterPicRe
             }
         }
     } else {
-        av_picture_copy(&pic, (AVPicture *)src->data, dst->pic->format, w, h);
+        av_picture_copy(&pic, (AVPicture *)src->data, dst->format, w, h);
     }
 }
 
@@ -249,8 +249,8 @@ static void copy_blended(uint8_t* out, i
     }
 }
 
-static void copy_image_yuv(AVFilterPicRef *dst, int x, int y,
-                           AVFilterPicRef *src, int w, int h,
+static void copy_image_yuv(AVFilterBufferRef *dst, int x, int y,
+                           AVFilterBufferRef *src, int w, int h,
                            int bpp, int hsub, int vsub)
 {
     AVPicture pic;
@@ -270,7 +270,7 @@ static void copy_image_yuv(AVFilterPicRe
         }
     }
 
-    if (src->pic->format == PIX_FMT_YUVA420P) {
+    if (src->format == PIX_FMT_YUVA420P) {
         int chroma_w = w>>hsub;
         int chroma_h = h>>vsub;
         assert(dst->pic->format == PIX_FMT_YUV420P);
@@ -278,15 +278,15 @@ static void copy_image_yuv(AVFilterPicRe
         copy_blended(pic.data[1], pic.linesize[1], src->data[1], src->linesize[1], src->data[3], src->linesize[3], chroma_w, chroma_h, hsub, vsub);
         copy_blended(pic.data[2], pic.linesize[2], src->data[2], src->linesize[2], src->data[3], src->linesize[3], chroma_w, chroma_h, hsub, vsub);
     } else {
-        av_picture_copy(&pic, (AVPicture *)src->data, dst->pic->format, w, h);
+        av_picture_copy(&pic, (AVPicture *)src->data, dst->format, w, h);
     }
 }
 
-static void copy_image(AVFilterPicRef *dst, int x, int y,
-                       AVFilterPicRef *src, int w, int h,
+static void copy_image(AVFilterBufferRef *dst, int x, int y,
+                       AVFilterBufferRef *src, int w, int h,
                        int bpp, int hsub, int vsub)
 {
-    if (dst->pic->format == PIX_FMT_YUV420P)
+    if (dst->format == PIX_FMT_YUV420P)
         return copy_image_yuv(dst, x, y, src, w, h, bpp, hsub, vsub);
     else
         return copy_image_rgb(dst, x, y, src, w, h, bpp);
@@ -294,7 +294,7 @@ static void copy_image(AVFilterPicRef *d
 
 static int request_frame(AVFilterLink *link)
 {
-    AVFilterPicRef *pic;
+    AVFilterBufferRef *pic;
     OverlayContext *over = link->src->priv;
     int idx;
     int x, y, w, h;
@@ -340,14 +340,14 @@ static int request_frame(AVFilterLink *l
     /* we draw the output frame */
     pic = avfilter_get_video_buffer(link, AV_PERM_WRITE, link->w, link->h);
     if(over->pics[0][0]) {
-        pic->pixel_aspect = over->pics[0][0]->pixel_aspect;
+        pic->video->pixel_aspect = over->pics[0][0]->video->pixel_aspect;
         copy_image(pic, 0, 0, over->pics[0][0], link->w, link->h,
                    over->bpp, over->hsub, over->vsub);
     }
     x = FFMIN(over->x, link->w-1);
     y = FFMIN(over->y, link->h-1);
-    w = FFMIN(link->w-x, over->pics[1][0]->w);
-    h = FFMIN(link->h-y, over->pics[1][0]->h);
+    w = FFMIN(link->w-x, over->pics[1][0]->video->w);
+    h = FFMIN(link->h-y, over->pics[1][0]->video->h);
     if(over->pics[1][0])
         copy_image(pic, x, y, over->pics[1][0], w, h,
                    over->bpp, over->hsub, over->vsub);
@@ -356,10 +356,10 @@ static int request_frame(AVFilterLink *l
     pic->pts = FFMAX(over->pics[0][0]->pts, over->pics[1][0]->pts);
 
     /* and send it to the next filter */
-    avfilter_start_frame(link, avfilter_ref_pic(pic, ~0));
-    avfilter_draw_slice (link, 0, pic->h, 1);
+    avfilter_start_frame(link, avfilter_ref_buffer(pic, ~0));
+    avfilter_draw_slice (link, 0, pic->video->h, 1);
     avfilter_end_frame  (link);
-    avfilter_unref_pic(pic);
+    avfilter_unref_buffer(pic);
 
     return 0;
 }

Modified: libavfilter/vf_rotate.c
==============================================================================
--- libavfilter/vf_rotate.c	Wed Aug 11 09:26:53 2010	(r5889)
+++ libavfilter/vf_rotate.c	Wed Aug 11 19:40:04 2010	(r5890)
@@ -112,8 +112,8 @@ static void draw_slice(AVFilterLink *lin
 static void end_frame(AVFilterLink *link)
 {
     RotContext *rot = link->dst->priv;
-    AVFilterPicRef *in  = link->cur_pic;
-    AVFilterPicRef *out = link->dst->outputs[0]->outpic;
+    AVFilterBufferRef *in  = link->cur_buf;
+    AVFilterBufferRef *out = link->dst->outputs[0]->out_buf;
     int i, j, plane;
 
     /* luma plane */
@@ -125,7 +125,7 @@ static void end_frame(AVFilterLink *link
             int column = (i - rot->transy)*rot->cosx -
                 (j - rot->transx)*rot->sinx + 0.5;
 
-            if (line < 0 || line >= in->w || column < 0 || column >= in->h)
+            if (line < 0 || line >= in->video->w || column < 0 || column >= in->video->h)
                 *(out->data[0] +   i*out->linesize[0] + j) = rot->backcolor[0];
             else
                 *(out->data[0] +   i*out->linesize[0] + j) =
@@ -145,7 +145,7 @@ static void end_frame(AVFilterLink *link
                 int column = (i2 - rot->transy)*rot->cosx -
                     (j2 - rot->transx)*rot->sinx + 0.5;
 
-                if (line < 0 || line >= in->w || column < 0 || column >= in->h) {
+                if (line < 0 || line >= in->video->w || column < 0 || column >= in->video->h) {
                     *(out->data[plane] +   i*out->linesize[plane] + j) =
                         rot->backcolor[plane];
                 } else {
@@ -157,28 +157,28 @@ static void end_frame(AVFilterLink *link
                 }
             }
 
-    avfilter_unref_pic(in);
+    avfilter_unref_buffer(in);
     avfilter_draw_slice(link->dst->outputs[0], 0, rot->output_h, 1);
     avfilter_end_frame(link->dst->outputs[0]);
-    avfilter_unref_pic(out);
+    avfilter_unref_buffer(out);
 }
 
-static void start_frame(AVFilterLink *link, AVFilterPicRef *picref)
+static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
 {
     AVFilterLink *out = link->dst->outputs[0];
 
-    out->outpic      = avfilter_get_video_buffer(out, AV_PERM_WRITE, out->w, out->h);
-    out->outpic->pts = picref->pts;
-    out->outpic->pos = picref->pos;
+    out->out_buf      = avfilter_get_video_buffer(out, AV_PERM_WRITE, out->w, out->h);
+    out->out_buf->pts = picref->pts;
+    out->out_buf->pos = picref->pos;
 
-    if(picref->pixel_aspect.num == 0) {
-        out->outpic->pixel_aspect = picref->pixel_aspect;
+    if (picref->video->pixel_aspect.num == 0) {
+        out->out_buf->video->pixel_aspect = picref->video->pixel_aspect;
     } else {
-        out->outpic->pixel_aspect.num = picref->pixel_aspect.den;
-        out->outpic->pixel_aspect.den = picref->pixel_aspect.num;
+        out->out_buf->video->pixel_aspect.num = picref->video->pixel_aspect.den;
+        out->out_buf->video->pixel_aspect.den = picref->video->pixel_aspect.num;
     }
 
-    avfilter_start_frame(out, avfilter_ref_pic(out->outpic, ~0));
+    avfilter_start_frame(out, avfilter_ref_buffer(out->out_buf, ~0));
 }
 
 AVFilter avfilter_vf_rotate =

Modified: libavfilter/vf_setpts.c
==============================================================================
--- libavfilter/vf_setpts.c	Wed Aug 11 09:26:53 2010	(r5889)
+++ libavfilter/vf_setpts.c	Wed Aug 11 19:40:04 2010	(r5890)
@@ -90,16 +90,16 @@ static av_cold int init(AVFilterContext 
     return !setpts->expr;
 }
 
-static AVFilterPicRef *get_video_buffer(AVFilterLink *link, int perms,
+static AVFilterBufferRef *get_video_buffer(AVFilterLink *link, int perms,
                                         int w, int h)
 {
     return avfilter_get_video_buffer(link->dst->outputs[0], perms, w, h);
 }
 
-static void start_frame(AVFilterLink *link, AVFilterPicRef *picref)
+static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
 {
     SetPTSContext *setpts = link->dst->priv;
-    AVFilterPicRef *ref2 = avfilter_ref_pic(picref, ~0);
+    AVFilterBufferRef *ref2 = avfilter_ref_buffer(picref, ~0);
 
 
     if (setpts->const_values[POV_STARTPTS] == AV_NOPTS_VALUE)

Modified: libavfilter/vf_split.c
==============================================================================
--- libavfilter/vf_split.c	Wed Aug 11 09:26:53 2010	(r5889)
+++ libavfilter/vf_split.c	Wed Aug 11 19:40:04 2010	(r5890)
@@ -21,12 +21,12 @@
 
 #include "avfilter.h"
 
-static void start_frame(AVFilterLink *link, AVFilterPicRef *picref)
+static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
 {
     avfilter_start_frame(link->dst->outputs[0],
-                         avfilter_ref_pic(picref, ~AV_PERM_WRITE));
+                         avfilter_ref_buffer(picref, ~AV_PERM_WRITE));
     avfilter_start_frame(link->dst->outputs[1],
-                         avfilter_ref_pic(picref, ~AV_PERM_WRITE));
+                         avfilter_ref_buffer(picref, ~AV_PERM_WRITE));
 }
 
 static void end_frame(AVFilterLink *link)
@@ -34,7 +34,7 @@ static void end_frame(AVFilterLink *link
     avfilter_end_frame(link->dst->outputs[0]);
     avfilter_end_frame(link->dst->outputs[1]);
 
-    avfilter_unref_pic(link->cur_pic);
+    avfilter_unref_buffer(link->cur_buf);
 }
 
 static void draw_slice(AVFilterLink *link, int y, int h, int slice_dir)

Modified: libavfilter/vf_transpose.c
==============================================================================
--- libavfilter/vf_transpose.c	Wed Aug 11 09:26:53 2010	(r5889)
+++ libavfilter/vf_transpose.c	Wed Aug 11 19:40:04 2010	(r5890)
@@ -67,48 +67,48 @@ static int config_props_output(AVFilterL
 static void end_frame(AVFilterLink *link)
 {
     TransContext *trans = link->dst->priv;
-    AVFilterPicRef *in  = link->cur_pic;
-    AVFilterPicRef *out = link->dst->outputs[0]->outpic;
-    AVFilterPicRef *pic = link->cur_pic;
+    AVFilterBufferRef *in  = link->cur_buf;
+    AVFilterBufferRef *out = link->dst->outputs[0]->out_buf;
+    AVFilterBufferRef *pic = link->cur_buf;
     AVFilterLink *output = link->dst->outputs[0];
     int i, j, plane;
 
     /* luma plane */
-    for(i = 0; i < pic->h; i ++)
-        for(j = 0; j < pic->w; j ++)
+    for(i = 0; i < pic->video->h; i ++)
+        for(j = 0; j < pic->video->w; j ++)
             *(out->data[0] +   j *out->linesize[0] + i) =
                 *(in->data[0]+ i * in->linesize[0] + j);
 
     /* chroma planes */
     for(plane = 1; plane < 3; plane ++) {
-        for(i = 0; i < pic->h >> trans->vsub; i++) {
-            for(j = 0; j < pic->w >> trans->hsub; j++)
+        for(i = 0; i < pic->video->h >> trans->vsub; i++) {
+            for(j = 0; j < pic->video->w >> trans->hsub; j++)
                 *(out->data[plane] +   j *out->linesize[plane] + i) =
                     *(in->data[plane]+ i * in->linesize[plane] + j);
         }
     }
 
-    avfilter_unref_pic(in);
-    avfilter_draw_slice(output, 0, out->h, 1);
+    avfilter_unref_buffer(in);
+    avfilter_draw_slice(output, 0, out->video->h, 1);
     avfilter_end_frame(output);
-    avfilter_unref_pic(out);
+    avfilter_unref_buffer(out);
 }
 
-static void start_frame(AVFilterLink *link, AVFilterPicRef *picref)
+static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
 {
     AVFilterLink *out = link->dst->outputs[0];
 
-    out->outpic      = avfilter_get_video_buffer(out, AV_PERM_WRITE, out->w, out->h);
-    out->outpic->pts = picref->pts;
+    out->out_buf      = avfilter_get_video_buffer(out, AV_PERM_WRITE, out->w, out->h);
+    out->out_buf->pts = picref->pts;
 
-    if(picref->pixel_aspect.num == 0) {
-        out->outpic->pixel_aspect = picref->pixel_aspect;
+    if (picref->video->pixel_aspect.num == 0) {
+        out->out_buf->video->pixel_aspect = picref->video->pixel_aspect;
     } else {
-        out->outpic->pixel_aspect.num = picref->pixel_aspect.den;
-        out->outpic->pixel_aspect.den = picref->pixel_aspect.num;
+        out->out_buf->video->pixel_aspect.num = picref->video->pixel_aspect.den;
+        out->out_buf->video->pixel_aspect.den = picref->video->pixel_aspect.num;
     }
 
-    avfilter_start_frame(out, avfilter_ref_pic(out->outpic, ~0));
+    avfilter_start_frame(out, avfilter_ref_buffer(out->out_buf, ~0));
 }
 
 AVFilter avfilter_vf_transpose =

Modified: libavfilter/vsrc_movie.c
==============================================================================
--- libavfilter/vsrc_movie.c	Wed Aug 11 09:26:53 2010	(r5889)
+++ libavfilter/vsrc_movie.c	Wed Aug 11 19:40:04 2010	(r5890)
@@ -40,7 +40,7 @@ typedef struct {
     AVFrame          *frame;
 
     int w, h;
-    AVFilterPicRef *pic;
+    AVFilterBufferRef *pic;
 } MovieContext;
 
 static int movie_init(AVFilterContext *ctx)
@@ -190,7 +190,7 @@ static int movie_get_frame(AVFilterLink 
             // Did we get a video frame?
             if(frame_finished) {
                 av_picture_copy((AVPicture *)&mv->pic->data, (AVPicture *)mv->frame,
-                                mv->pic->pic->format, link->w, link->h);
+                                mv->pic->format, link->w, link->h);
 
                 // Advance in the time line
                 mv->pic->pts = av_rescale_q(packet.pts,
@@ -219,7 +219,7 @@ static int movie_get_frame(AVFilterLink 
 
 static int request_frame(AVFilterLink *link)
 {
-    AVFilterPicRef *out;
+    AVFilterBufferRef *out;
     MovieContext *mv = link->src->priv;
 
     movie_get_frame(link);
@@ -227,8 +227,8 @@ static int request_frame(AVFilterLink *l
     if (mv->is_done)
         return AVERROR_EOF;
 
-    out = avfilter_ref_pic(mv->pic, ~0);
-    out->pixel_aspect = mv->codec_ctx->sample_aspect_ratio;
+    out = avfilter_ref_buffer(mv->pic, ~0);
+    out->video->pixel_aspect = mv->codec_ctx->sample_aspect_ratio;
 
     avfilter_start_frame(link, out);
     avfilter_draw_slice(link, 0, link->h, 1);
@@ -247,7 +247,7 @@ static av_cold void uninit(AVFilterConte
         av_close_input_file(mv->format_ctx);
     av_freep(&mv->frame);
     if(mv->pic)
-        avfilter_unref_pic(mv->pic);
+        avfilter_unref_buffer(mv->pic);
 }
 
 AVFilter avfilter_vsrc_movie =


More information about the FFmpeg-soc mailing list