[FFmpeg-soc] [soc]: r4273 - in libavfilter: checkout.sh diffs/01_ffplay_filters.diff

vitor subversion at mplayerhq.hu
Sat May 16 16:48:54 CEST 2009


Author: vitor
Date: Sat May 16 16:48:54 2009
New Revision: 4273

Log:
Update libavfilter diffs to r18854.

Patch by Martin Storsjö - $firstname@$firstname.st

Modified:
   libavfilter/checkout.sh
   libavfilter/diffs/01_ffplay_filters.diff

Modified: libavfilter/checkout.sh
==============================================================================
--- libavfilter/checkout.sh	Sat May 16 12:20:11 2009	(r4272)
+++ libavfilter/checkout.sh	Sat May 16 16:48:54 2009	(r4273)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 echo "checking out pristine ffmpeg"
-svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk/ ffmpeg -r18829
+svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk/ ffmpeg -r18854
 
 echo "patching ffmpeg"
 for diff in $(ls $(pwd)/diffs/*.diff); do patch -d ffmpeg -p0 -i $diff; done

Modified: libavfilter/diffs/01_ffplay_filters.diff
==============================================================================
--- libavfilter/diffs/01_ffplay_filters.diff	Sat May 16 12:20:11 2009	(r4272)
+++ libavfilter/diffs/01_ffplay_filters.diff	Sat May 16 16:48:54 2009	(r4273)
@@ -1,6 +1,6 @@
 Index: ffplay.c
 ===================================================================
---- ffplay.c	(revision 18829)
+--- ffplay.c	(revision 18854)
 +++ ffplay.c	(working copy)
 @@ -29,6 +29,12 @@
  #include "libavcodec/audioconvert.h"
@@ -38,7 +38,14 @@ Index: ffplay.c
  } VideoPicture;
  
  typedef struct SubPicture {
-@@ -172,6 +185,10 @@
+@@ -168,11 +181,17 @@
+     int pictq_size, pictq_rindex, pictq_windex;
+     SDL_mutex *pictq_mutex;
+     SDL_cond *pictq_cond;
++#if !CONFIG_AVFILTER
+     struct SwsContext *img_convert_ctx;
++#endif
+ 
      //    QETimer *video_timer;
      char filename[1024];
      int width, height, xleft, ytop;
@@ -49,7 +56,7 @@ Index: ffplay.c
  } VideoState;
  
  static void show_help(void);
-@@ -212,6 +229,9 @@
+@@ -213,6 +232,9 @@
  static int error_recognition = FF_ER_CAREFUL;
  static int error_concealment = 3;
  static int decoder_reorder_pts= 0;
@@ -59,7 +66,7 @@ Index: ffplay.c
  
  /* current context */
  static int is_full_screen;
-@@ -661,6 +681,13 @@
+@@ -662,6 +684,13 @@
  
      vp = &is->pictq[is->pictq_rindex];
      if (vp->bmp) {
@@ -73,7 +80,7 @@ Index: ffplay.c
          /* XXX: use variable in the frame */
          if (is->video_st->sample_aspect_ratio.num)
              aspect_ratio = av_q2d(is->video_st->sample_aspect_ratio);
-@@ -668,9 +695,10 @@
+@@ -669,9 +698,10 @@
              aspect_ratio = av_q2d(is->video_st->codec->sample_aspect_ratio);
          else
              aspect_ratio = 0;
@@ -85,7 +92,7 @@ Index: ffplay.c
          /* if an active format is indicated, then it overrides the
             mpeg format */
  #if 0
-@@ -873,9 +901,15 @@
+@@ -874,9 +904,15 @@
      } else if(!is_full_screen && screen_width){
          w = screen_width;
          h = screen_height;
@@ -101,7 +108,7 @@ Index: ffplay.c
      } else {
          w = 640;
          h = 480;
-@@ -1188,6 +1222,20 @@
+@@ -1189,6 +1225,20 @@
      if (vp->bmp)
          SDL_FreeYUVOverlay(vp->bmp);
  
@@ -122,7 +129,7 @@ Index: ffplay.c
  #if 0
      /* XXX: use generic function */
      /* XXX: disable overlay if no hardware acceleration or if RGB format */
-@@ -1205,12 +1253,9 @@
+@@ -1206,12 +1256,9 @@
          break;
      }
  #endif
@@ -136,20 +143,18 @@ Index: ffplay.c
  
      SDL_LockMutex(is->pictq_mutex);
      vp->allocated = 1;
-@@ -1226,8 +1271,11 @@
+@@ -1227,7 +1274,9 @@
  {
      VideoPicture *vp;
      int dst_pix_fmt;
+-
 +#if CONFIG_AVFILTER
 +    AVPicture pict_src;
-+#else
-     static struct SwsContext *img_convert_ctx;
--
 +#endif
      /* wait until we have space to put a new picture */
      SDL_LockMutex(is->pictq_mutex);
      while (is->pictq_size >= VIDEO_PICTURE_QUEUE_SIZE &&
-@@ -1243,8 +1291,13 @@
+@@ -1243,8 +1292,13 @@
  
      /* alloc or resize hardware picture buffer */
      if (!vp->bmp ||
@@ -163,7 +168,7 @@ Index: ffplay.c
          SDL_Event event;
  
          vp->allocated = 0;
-@@ -1269,6 +1322,11 @@
+@@ -1269,6 +1323,11 @@
      /* if the frame is not skipped, then display it */
      if (vp->bmp) {
          AVPicture pict;
@@ -175,7 +180,7 @@ Index: ffplay.c
  
          /* get a pointer on the bitmap */
          SDL_LockYUVOverlay (vp->bmp);
-@@ -1282,18 +1340,30 @@
+@@ -1282,18 +1341,30 @@
          pict.linesize[0] = vp->bmp->pitches[0];
          pict.linesize[1] = vp->bmp->pitches[2];
          pict.linesize[2] = vp->bmp->pitches[1];
@@ -193,24 +198,24 @@ Index: ffplay.c
 +                        vp->pix_fmt, vp->width, vp->height);
 +#else
          sws_flags = av_get_int(sws_opts, "sws_flags", NULL);
-         img_convert_ctx = sws_getCachedContext(img_convert_ctx,
+         is->img_convert_ctx = sws_getCachedContext(is->img_convert_ctx,
 -            is->video_st->codec->width, is->video_st->codec->height,
 -            is->video_st->codec->pix_fmt,
 -            is->video_st->codec->width, is->video_st->codec->height,
 +            vp->width, vp->height, vp->pix_fmt, vp->width, vp->height,
              dst_pix_fmt, sws_flags, NULL, NULL, NULL);
-         if (img_convert_ctx == NULL) {
+         if (is->img_convert_ctx == NULL) {
              fprintf(stderr, "Cannot initialize the conversion context\n");
              exit(1);
          }
-         sws_scale(img_convert_ctx, src_frame->data, src_frame->linesize,
+         sws_scale(is->img_convert_ctx, src_frame->data, src_frame->linesize,
 -                  0, is->video_st->codec->height, pict.data, pict.linesize);
 +                  0, vp->height, pict.data, pict.linesize);
 +#endif
          /* update the bitmap content */
          SDL_UnlockYUVOverlay(vp->bmp);
  
-@@ -1348,54 +1418,267 @@
+@@ -1348,54 +1419,267 @@
      return queue_picture(is, src_frame, pts);
  }
  
@@ -509,7 +514,7 @@ Index: ffplay.c
      av_free(frame);
      return 0;
  }
-@@ -2179,6 +2462,12 @@
+@@ -2179,6 +2463,12 @@
      /* free all pictures */
      for(i=0;i<VIDEO_PICTURE_QUEUE_SIZE; i++) {
          vp = &is->pictq[i];
@@ -522,7 +527,18 @@ Index: ffplay.c
          if (vp->bmp) {
              SDL_FreeYUVOverlay(vp->bmp);
              vp->bmp = NULL;
-@@ -2517,6 +2806,9 @@
+@@ -2188,8 +2478,10 @@
+     SDL_DestroyCond(is->pictq_cond);
+     SDL_DestroyMutex(is->subpq_mutex);
+     SDL_DestroyCond(is->subpq_cond);
++#if !CONFIG_AVFILTER
+     if (is->img_convert_ctx)
+         sws_freeContext(is->img_convert_ctx);
++#endif
+     av_free(is);
+ }
+ 
+@@ -2525,6 +2817,9 @@
      { "ec", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&error_concealment}, "set error concealment options",  "bit_mask" },
      { "sync", HAS_ARG | OPT_FUNC2 | OPT_EXPERT, {(void*)opt_sync}, "set audio-video sync. type (type=audio/video/ext)", "type" },
      { "threads", HAS_ARG | OPT_FUNC2 | OPT_EXPERT, {(void*)opt_thread_count}, "thread count", "count" },
@@ -532,7 +548,7 @@ Index: ffplay.c
      { "default", OPT_FUNC2 | HAS_ARG | OPT_AUDIO | OPT_VIDEO | OPT_EXPERT, {(void*)opt_default}, "generic catch all option", "" },
      { NULL, },
  };
-@@ -2565,7 +2857,9 @@
+@@ -2573,7 +2868,9 @@
          avcodec_opts[i]= avcodec_alloc_context2(i);
      }
      avformat_opts = avformat_alloc_context();


More information about the FFmpeg-soc mailing list