Merge remote-tracking branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 21 Jun 2012 19:57:39 +0000 (21:57 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 21 Jun 2012 20:37:43 +0000 (22:37 +0200)
* qatar/master:
  fix hardcoded tables compililation caused by missing math constants
  lavf: Make codec_tag arrays constant
  twinvq: give massive struct a name.
  lavf, lavu: version bumps and APIchanges for av_gettime() move
  lavfi/audio: don't set cur_buf in ff_filter_samples().
  lavfi/fifo: add audio version of the fifo filter.
  fifo: fix parenthesis placement.
  lavfi: rename vf_fifo.c -> fifo.c
  lavc: remove stats_in from AVCodecContext options table.

Conflicts:
doc/APIchanges
libavfilter/Makefile
libavfilter/allfilters.c
libavfilter/audio.c
libavfilter/fifo.c
libavformat/version.h
libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
15 files changed:
1  2 
configure
doc/APIchanges
libavcodec/aacps_tablegen.h
libavcodec/cos_tablegen.c
libavcodec/options_table.h
libavcodec/sinewin_tablegen.c
libavcodec/twinvq_data.h
libavfilter/Makefile
libavfilter/allfilters.c
libavfilter/audio.c
libavfilter/fifo.c
libavformat/cafdec.c
libavformat/ivfdec.c
libavformat/version.h
libavutil/avutil.h

diff --cc configure
+++ b/configure
@@@ -1901,9 -1681,8 +1901,9 @@@ SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJ
  
  AS_O='-o $@'
  CC_O='-o $@'
 +CXX_O='-o $@'
  
- host_cflags='-D_ISOC99_SOURCE -O3 -g'
+ host_cflags='-D_ISOC99_SOURCE -D_XOPEN_SOURCE=600 -O3 -g'
  host_libs='-lm'
  
  target_path='$(CURDIR)'
diff --cc doc/APIchanges
@@@ -15,29 -13,9 +15,32 @@@ libavutil:     2011-04-1
  
  API changes, most recent first:
  
 +2012-04-11 - xxxxxxx - lavu 51.58.100 - error.h
 +  Add av_make_error_string() and av_err2str() utilities to
 +  libavutil/error.h.
 +
 +2012-06-05 - xxxxxxx - lavc 54.24.100
 +  Add pkt_duration field to AVFrame.
 +
 +2012-05-24 - xxxxxxx - lavu 51.54.100
 +  Move AVPALETTE_SIZE and AVPALETTE_COUNT macros from
 +  libavcodec/avcodec.h to libavutil/pixfmt.h.
 +
 +2012-05-07 - xxxxxxx - lavf 54.5.100
 +  Add av_guess_sample_aspect_ratio() function.
 +
 +2012-04-20 - xxxxxxx - lavfi 2.70.100
 +  Add avfilter_unref_bufferp() to avfilter.h.
 +
 +2012-04-12 - xxxxxxx - lavfi 2.68.100
 +  Install libavfilter/asrc_abuffer.h public header.
 +
 +2012-03-26 - a67d9cf - lavfi 2.66.100
 +  Add avfilter_fill_frame_from_{audio_,}buffer_ref() functions.
 +
+ 2012-06-20 - ae0a301 - lavu 51.33.0
+   Move av_gettime() to libavutil, add libavutil/time.h
  2012-xx-xx - xxxxxxx - lavr 0.0.3
    Add a parameter to avresample_build_matrix() for Dolby/DPLII downmixing.
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -41,43 -25,21 +41,44 @@@ OBJS = allfilters.
         vf_scale.o                                                       \
         video.o                                                          \
  
 +
 +OBJS-$(CONFIG_AVCODEC)                       += avcodec.o
 +OBJS-$(CONFIG_AVFORMAT)                      += lavfutils.o
 +OBJS-$(CONFIG_SWSCALE)                       += lswsutils.o
 +
 +OBJS-$(CONFIG_ACONVERT_FILTER)               += af_aconvert.o
+ OBJS-$(CONFIG_AFIFO_FILTER)                  += fifo.o
  OBJS-$(CONFIG_AFORMAT_FILTER)                += af_aformat.o
 +OBJS-$(CONFIG_AMERGE_FILTER)                 += af_amerge.o
  OBJS-$(CONFIG_AMIX_FILTER)                   += af_amix.o
  OBJS-$(CONFIG_ANULL_FILTER)                  += af_anull.o
 +OBJS-$(CONFIG_ARESAMPLE_FILTER)              += af_aresample.o
 +OBJS-$(CONFIG_ASETNSAMPLES_FILTER)           += af_asetnsamples.o
 +OBJS-$(CONFIG_ASHOWINFO_FILTER)              += af_ashowinfo.o
  OBJS-$(CONFIG_ASPLIT_FILTER)                 += split.o
 +OBJS-$(CONFIG_ASTREAMSYNC_FILTER)            += af_astreamsync.o
  OBJS-$(CONFIG_ASYNCTS_FILTER)                += af_asyncts.o
 +OBJS-$(CONFIG_ATEMPO_FILTER)                 += af_atempo.o
  OBJS-$(CONFIG_CHANNELSPLIT_FILTER)           += af_channelsplit.o
 +OBJS-$(CONFIG_EARWAX_FILTER)                 += af_earwax.o
 +OBJS-$(CONFIG_PAN_FILTER)                    += af_pan.o
  OBJS-$(CONFIG_RESAMPLE_FILTER)               += af_resample.o
 +OBJS-$(CONFIG_SILENCEDETECT_FILTER)          += af_silencedetect.o
 +OBJS-$(CONFIG_VOLUME_FILTER)                 += af_volume.o
  
 +OBJS-$(CONFIG_AEVALSRC_FILTER)               += asrc_aevalsrc.o
 +OBJS-$(CONFIG_AMOVIE_FILTER)                 += src_movie.o
  OBJS-$(CONFIG_ANULLSRC_FILTER)               += asrc_anullsrc.o
  
 +OBJS-$(CONFIG_ABUFFERSINK_FILTER)            += sink_buffer.o
  OBJS-$(CONFIG_ANULLSINK_FILTER)              += asink_anullsink.o
  
 +OBJS-$(CONFIG_ASS_FILTER)                    += vf_ass.o
 +OBJS-$(CONFIG_BBOX_FILTER)                   += bbox.o vf_bbox.o
 +OBJS-$(CONFIG_BLACKDETECT_FILTER)            += vf_blackdetect.o
  OBJS-$(CONFIG_BLACKFRAME_FILTER)             += vf_blackframe.o
  OBJS-$(CONFIG_BOXBLUR_FILTER)                += vf_boxblur.o
 +OBJS-$(CONFIG_COLORMATRIX_FILTER)            += vf_colormatrix.o
  OBJS-$(CONFIG_COPY_FILTER)                   += vf_copy.o
  OBJS-$(CONFIG_CROP_FILTER)                   += vf_crop.o
  OBJS-$(CONFIG_CROPDETECT_FILTER)             += vf_cropdetect.o
@@@ -34,38 -34,21 +34,39 @@@ void avfilter_register_all(void
          return;
      initialized = 1;
  
 +    REGISTER_FILTER (ACONVERT,    aconvert,    af);
+     REGISTER_FILTER (AFIFO,       afifo,       af);
      REGISTER_FILTER (AFORMAT,     aformat,     af);
 +    REGISTER_FILTER (AMERGE,      amerge,      af);
      REGISTER_FILTER (AMIX,        amix,        af);
      REGISTER_FILTER (ANULL,       anull,       af);
 +    REGISTER_FILTER (ARESAMPLE,   aresample,   af);
 +    REGISTER_FILTER (ASETNSAMPLES, asetnsamples, af);
 +    REGISTER_FILTER (ASHOWINFO,   ashowinfo,   af);
      REGISTER_FILTER (ASPLIT,      asplit,      af);
 +    REGISTER_FILTER (ASTREAMSYNC, astreamsync, af);
      REGISTER_FILTER (ASYNCTS,     asyncts,     af);
 +    REGISTER_FILTER (ATEMPO,      atempo,      af);
      REGISTER_FILTER (CHANNELSPLIT,channelsplit,af);
 +    REGISTER_FILTER (EARWAX,      earwax,      af);
 +    REGISTER_FILTER (PAN,         pan,         af);
 +    REGISTER_FILTER (SILENCEDETECT, silencedetect, af);
 +    REGISTER_FILTER (VOLUME,      volume,      af);
      REGISTER_FILTER (RESAMPLE,    resample,    af);
  
 +    REGISTER_FILTER (AEVALSRC,    aevalsrc,    asrc);
 +    REGISTER_FILTER (AMOVIE,      amovie,      asrc);
      REGISTER_FILTER (ANULLSRC,    anullsrc,    asrc);
  
 +    REGISTER_FILTER (ABUFFERSINK, abuffersink, asink);
      REGISTER_FILTER (ANULLSINK,   anullsink,   asink);
  
 +    REGISTER_FILTER (ASS,         ass,         vf);
 +    REGISTER_FILTER (BBOX,        bbox,        vf);
 +    REGISTER_FILTER (BLACKDETECT, blackdetect, vf);
      REGISTER_FILTER (BLACKFRAME,  blackframe,  vf);
      REGISTER_FILTER (BOXBLUR,     boxblur,     vf);
 +    REGISTER_FILTER (COLORMATRIX, colormatrix, vf);
      REGISTER_FILTER (COPY,        copy,        vf);
      REGISTER_FILTER (CROP,        crop,        vf);
      REGISTER_FILTER (CROPDETECT,  cropdetect,  vf);
@@@ -180,9 -176,9 +180,10 @@@ void ff_filter_samples(AVFilterLink *li
  {
      void (*filter_samples)(AVFilterLink *, AVFilterBufferRef *);
      AVFilterPad *dst = link->dstpad;
 +    int64_t pts;
+     AVFilterBufferRef *buf_out;
  
 -    FF_DPRINTF_START(NULL, filter_samples); ff_dlog_link(NULL, link, 1);
 +    FF_TPRINTF_START(NULL, filter_samples); ff_tlog_link(NULL, link, 1);
  
      if (!(filter_samples = dst->filter_samples))
          filter_samples = ff_default_filter_samples;
  
          avfilter_unref_buffer(samplesref);
      } else
-         link->cur_buf = samplesref;
+         buf_out = samplesref;
  
-     pts = link->cur_buf->pts;
-     filter_samples(link, link->cur_buf);
++    link->cur_buf = buf_out;
++    pts = buf_out->pts;
+     filter_samples(link, buf_out);
 +    ff_update_link_current_pts(link, pts);
  }
 -
index 0000000,3fa4faa..da5aa64
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,152 +1,152 @@@
 - * This file is part of Libav.
+ /*
+  * Copyright (c) 2007 Bobby Bingham
+  *
 - * Libav is free software; you can redistribute it and/or
++ * This file is part of FFmpeg.
+  *
 - * Libav is distributed in the hope that it will be useful,
++ * FFmpeg is free software; you can redistribute it and/or
+  * modify it under the terms of the GNU Lesser General Public
+  * License as published by the Free Software Foundation; either
+  * version 2.1 of the License, or (at your option) any later version.
+  *
 - * License along with Libav; if not, write to the Free Software
++ * FFmpeg is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
 -    .inputs    = (AVFilterPad[]) {{ .name            = "default",
++ * License along with FFmpeg; if not, write to the Free Software
+  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+  */
+ /**
+  * @file
+  * FIFO buffering filter
+  */
+ #include "audio.h"
+ #include "avfilter.h"
+ #include "internal.h"
+ #include "video.h"
+ typedef struct Buf {
+     AVFilterBufferRef *buf;
+     struct Buf        *next;
+ } Buf;
+ typedef struct {
+     Buf  root;
+     Buf *last;   ///< last buffered frame
+ } FifoContext;
+ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
+ {
+     FifoContext *fifo = ctx->priv;
+     fifo->last = &fifo->root;
+     av_log(ctx, AV_LOG_INFO, "\n");
+     return 0;
+ }
+ static av_cold void uninit(AVFilterContext *ctx)
+ {
+     FifoContext *fifo = ctx->priv;
+     Buf *buf, *tmp;
+     for (buf = fifo->root.next; buf; buf = tmp) {
+         tmp = buf->next;
+         avfilter_unref_buffer(buf->buf);
+         av_free(buf);
+     }
+ }
+ static void add_to_queue(AVFilterLink *inlink, AVFilterBufferRef *buf)
+ {
+     FifoContext *fifo = inlink->dst->priv;
+     fifo->last->next = av_mallocz(sizeof(Buf));
+     fifo->last = fifo->last->next;
+     fifo->last->buf = buf;
+ }
+ static void end_frame(AVFilterLink *inlink) { }
+ static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) { }
+ static int request_frame(AVFilterLink *outlink)
+ {
+     FifoContext *fifo = outlink->src->priv;
+     Buf *tmp;
+     int ret;
+     if (!fifo->root.next) {
+         if ((ret = ff_request_frame(outlink->src->inputs[0])) < 0)
+             return ret;
+     }
+     /* by doing this, we give ownership of the reference to the next filter,
+      * so we don't have to worry about dereferencing it ourselves. */
+     switch (outlink->type) {
+     case AVMEDIA_TYPE_VIDEO:
+         ff_start_frame(outlink, fifo->root.next->buf);
+         ff_draw_slice (outlink, 0, outlink->h, 1);
+         ff_end_frame  (outlink);
+         break;
+     case AVMEDIA_TYPE_AUDIO:
+         ff_filter_samples(outlink, fifo->root.next->buf);
+         break;
+     default:
+         return AVERROR(EINVAL);
+     }
+     if (fifo->last == fifo->root.next)
+         fifo->last = &fifo->root;
+     tmp = fifo->root.next->next;
+     av_free(fifo->root.next);
+     fifo->root.next = tmp;
+     return 0;
+ }
+ AVFilter avfilter_vf_fifo = {
+     .name      = "fifo",
+     .description = NULL_IF_CONFIG_SMALL("Buffer input images and send them when they are requested."),
+     .init      = init,
+     .uninit    = uninit,
+     .priv_size = sizeof(FifoContext),
 -    .outputs   = (AVFilterPad[]) {{ .name            = "default",
++    .inputs    = (const AVFilterPad[]) {{ .name      = "default",
+                                     .type            = AVMEDIA_TYPE_VIDEO,
+                                     .get_video_buffer= ff_null_get_video_buffer,
+                                     .start_frame     = add_to_queue,
+                                     .draw_slice      = draw_slice,
+                                     .end_frame       = end_frame,
+                                     .rej_perms       = AV_PERM_REUSE2, },
+                                   { .name = NULL}},
++    .outputs   = (const AVFilterPad[]) {{ .name      = "default",
+                                     .type            = AVMEDIA_TYPE_VIDEO,
+                                     .request_frame   = request_frame, },
+                                   { .name = NULL}},
+ };
+ AVFilter avfilter_af_afifo = {
+     .name        = "afifo",
+     .description = NULL_IF_CONFIG_SMALL("Buffer input frames and send them when they are requested."),
+     .init      = init,
+     .uninit    = uninit,
+     .priv_size = sizeof(FifoContext),
+     .inputs    = (AVFilterPad[]) {{ .name             = "default",
+                                     .type             = AVMEDIA_TYPE_AUDIO,
+                                     .get_audio_buffer = ff_null_get_audio_buffer,
+                                     .filter_samples   = add_to_queue,
+                                     .rej_perms        = AV_PERM_REUSE2, },
+                                   { .name = NULL}},
+     .outputs   = (AVFilterPad[]) {{ .name             = "default",
+                                     .type             = AVMEDIA_TYPE_AUDIO,
+                                     .request_frame    = request_frame, },
+                                   { .name = NULL}},
+ };
Simple merge
Simple merge
@@@ -30,8 -30,8 +30,8 @@@
  #include "libavutil/avutil.h"
  
  #define LIBAVFORMAT_VERSION_MAJOR 54
- #define LIBAVFORMAT_VERSION_MINOR 10
 -#define LIBAVFORMAT_VERSION_MINOR  6
 -#define LIBAVFORMAT_VERSION_MICRO  0
++#define LIBAVFORMAT_VERSION_MINOR 11
 +#define LIBAVFORMAT_VERSION_MICRO 100
  
  #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
                                                 LIBAVFORMAT_VERSION_MINOR, \
   */
  
  #define LIBAVUTIL_VERSION_MAJOR 51
- #define LIBAVUTIL_VERSION_MINOR 59
 -#define LIBAVUTIL_VERSION_MINOR 33
 -#define LIBAVUTIL_VERSION_MICRO  0
++#define LIBAVUTIL_VERSION_MINOR 60
 +#define LIBAVUTIL_VERSION_MICRO 100
  
  #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
                                                 LIBAVUTIL_VERSION_MINOR, \