Browse Source

Merge remote-tracking branch 'cigaes/master'

* cigaes/master:
  lavfi/dualinput: fix shortest option.
  lavfi/vf_tile: use av_make_q.
  lavfi/avf_concat: use av_make_q.
  lavfi/af_amerge: use av_make_q.
  lavu/rational: add syntactic sugar.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.2-rc1
Michael Niedermayer 11 years ago
parent
commit
0500623d58
7 changed files with 19 additions and 5 deletions
  1. +3
    -0
      doc/APIchanges
  2. +1
    -1
      libavfilter/af_amerge.c
  3. +1
    -1
      libavfilter/avf_concat.c
  4. +1
    -1
      libavfilter/dualinput.c
  5. +1
    -1
      libavfilter/vf_tile.c
  6. +11
    -0
      libavutil/rational.h
  7. +1
    -1
      libavutil/version.h

+ 3
- 0
doc/APIchanges View File

@@ -15,6 +15,9 @@ libavutil: 2012-10-22

API changes, most recent first:

2014-01-19 - xxxxxxx - lavu 52.63.100 - rational.h
Add av_make_q() function.

2013-12-xx - xxxxxxx - lavu 53.2.0 - frame.h
Add AV_FRAME_DATA_MATRIXENCODING value to the AVFrameSideDataType enum, which
identifies AVMatrixEncoding data.


+ 1
- 1
libavfilter/af_amerge.c View File

@@ -259,7 +259,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
outbuf->pts = inbuf[0]->pts == AV_NOPTS_VALUE ? AV_NOPTS_VALUE :
inbuf[0]->pts +
av_rescale_q(am->in[0].pos,
(AVRational){ 1, ctx->inputs[0]->sample_rate },
av_make_q(1, ctx->inputs[0]->sample_rate),
ctx->outputs[0]->time_base);

outbuf->nb_samples = nb_samples;


+ 1
- 1
libavfilter/avf_concat.c View File

@@ -174,7 +174,7 @@ static int push_frame(AVFilterContext *ctx, unsigned in_no, AVFrame *buf)
if (inlink->sample_rate)
/* use number of audio samples */
in->pts += av_rescale_q(buf->nb_samples,
(AVRational){ 1, inlink->sample_rate },
av_make_q(1, inlink->sample_rate),
outlink->time_base);
else if (in->nb_frames >= 2)
/* use mean duration */


+ 1
- 1
libavfilter/dualinput.c View File

@@ -57,7 +57,7 @@ int ff_dualinput_init(AVFilterContext *ctx, FFDualInputContext *s)
in[1].after = EXT_INFINITY;

if (s->shortest)
in[1].after = EXT_STOP;
in[0].after = in[1].after = EXT_STOP;
if (!s->repeatlast) {
in[0].after = EXT_STOP;
in[1].sync = 0;


+ 1
- 1
libavfilter/vf_tile.c View File

@@ -113,7 +113,7 @@ static int config_props(AVFilterLink *outlink)
outlink->h = tile->h * inlink->h + total_margin_h;
outlink->sample_aspect_ratio = inlink->sample_aspect_ratio;
outlink->frame_rate = av_mul_q(inlink->frame_rate,
(AVRational){ 1, tile->nb_frames });
av_make_q(1, tile->nb_frames));
ff_draw_init(&tile->draw, inlink->format, 0);
ff_draw_color(&tile->draw, &tile->blank, tile->rgba_color);



+ 11
- 0
libavutil/rational.h View File

@@ -45,6 +45,17 @@ typedef struct AVRational{
int den; ///< denominator
} AVRational;

/**
* Create a rational.
* Useful for compilers that do not support compound literals.
* @note The return value is not reduced.
*/
static inline AVRational av_make_q(int num, int den)
{
AVRational r = { num, den };
return r;
}

/**
* Compare two rationals.
* @param a first rational


+ 1
- 1
libavutil/version.h View File

@@ -56,7 +56,7 @@
*/

#define LIBAVUTIL_VERSION_MAJOR 52
#define LIBAVUTIL_VERSION_MINOR 62
#define LIBAVUTIL_VERSION_MINOR 63
#define LIBAVUTIL_VERSION_MICRO 100

#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \


Loading…
Cancel
Save