Changeset 35fe66ab in ffmpeg


Ignore:
Timestamp:
May 1, 2011, 11:10:18 AM (14 years ago)
Author:
Stefano Sabatini <stefano.sabatini-lala@poste.it>
Branches:
master
Children:
636ee66f
Parents:
77e9dee8
git-author:
Stefano Sabatini <stefano.sabatini-lala@poste.it> (04/29/11 11:12:39)
git-committer:
Stefano Sabatini <stefano.sabatini-lala@poste.it> (05/01/11 11:10:18)
Message:

lavfi: rename AVFilterBufferRefVideoProps.pixel_aspect to sample_aspect_ratio

Improve consistency with libavcodec.

This breaks libavfilter API/ABI.

The non-sequential 2.1.0 -> 2.4.0 bump is due to the mess previously
done with the lavfi minor number.

Files:
14 edited

Legend:

Unmodified
Added
Removed
  • cmdutils.c

    r77e9dee8 r35fe66ab  
    913913    frame->key_frame        = picref->video->key_frame;
    914914    frame->pict_type        = picref->video->pict_type;
    915     frame->sample_aspect_ratio = picref->video->pixel_aspect;
     915    frame->sample_aspect_ratio = picref->video->sample_aspect_ratio;
    916916
    917917    return 1;
  • doc/APIchanges

    r77e9dee8 r35fe66ab  
    1313
    1414API changes, most recent first:
     15
     162011-05-01 - xxxxxxx - lavfi 2.4.0 - avfilter.h
     17  Rename AVFilterBufferRefVideoProps.pixel_aspect to
     18  sample_aspect_ratio.
    1519
    16202011-05-01 - xxxxxxx - lavc 53.3.0 - AVFrame
  • ffmpeg.c

    r77e9dee8 r35fe66ab  
    16971697#if CONFIG_AVFILTER
    16981698                            if (ost->picref->video && !ost->frame_aspect_ratio)
    1699                                 ost->st->codec->sample_aspect_ratio = ost->picref->video->pixel_aspect;
     1699                                ost->st->codec->sample_aspect_ratio = ost->picref->video->sample_aspect_ratio;
    17001700#endif
    17011701                            do_video_out(os, ost, ist, &picture, &frame_size);
  • ffplay.c

    r77e9dee8 r35fe66ab  
    693693    if (vp->bmp) {
    694694#if CONFIG_AVFILTER
    695          if (vp->picref->video->pixel_aspect.num == 0)
     695         if (vp->picref->video->sample_aspect_ratio.num == 0)
    696696             aspect_ratio = 0;
    697697         else
    698              aspect_ratio = av_q2d(vp->picref->video->pixel_aspect);
     698             aspect_ratio = av_q2d(vp->picref->video->sample_aspect_ratio);
    699699#else
    700700
     
    16891689    picref->pts = pts;
    16901690    picref->pos = priv->frame->pkt_pos;
    1691     picref->video->pixel_aspect = priv->frame->sample_aspect_ratio;
     1691    picref->video->sample_aspect_ratio = priv->frame->sample_aspect_ratio;
    16921692    avfilter_start_frame(link, picref);
    16931693    avfilter_draw_slice(link, 0, link->h, 1);
  • libavfilter/avfilter.c

    r77e9dee8 r35fe66ab  
    239239    if (ref->video) {
    240240        av_dlog(ctx, " a:%d/%d s:%dx%d i:%c iskey:%d type:%c",
    241                 ref->video->pixel_aspect.num, ref->video->pixel_aspect.den,
     241                ref->video->sample_aspect_ratio.num, ref->video->sample_aspect_ratio.den,
    242242                ref->video->w, ref->video->h,
    243243                !ref->video->interlaced     ? 'P' :         /* Progressive  */
  • libavfilter/avfilter.h

    r77e9dee8 r35fe66ab  
    2727
    2828#define LIBAVFILTER_VERSION_MAJOR  2
    29 #define LIBAVFILTER_VERSION_MINOR  1
     29#define LIBAVFILTER_VERSION_MINOR  4
    3030#define LIBAVFILTER_VERSION_MICRO  0
    3131
     
    113113    int w;                      ///< image width
    114114    int h;                      ///< image height
    115     AVRational pixel_aspect;    ///< pixel aspect ratio
     115    AVRational sample_aspect_ratio; ///< sample aspect ratio
    116116    int interlaced;             ///< is frame interlaced
    117117    int top_field_first;        ///< field order
  • libavfilter/vf_aspect.c

    r77e9dee8 r35fe66ab  
    6666    AspectContext *aspect = link->dst->priv;
    6767
    68     picref->video->pixel_aspect = aspect->aspect;
     68    picref->video->sample_aspect_ratio = aspect->aspect;
    6969    avfilter_start_frame(link->dst->outputs[0], picref);
    7070}
  • libavfilter/vf_frei0r.c

    r77e9dee8 r35fe66ab  
    431431    Frei0rContext *frei0r = outlink->src->priv;
    432432    AVFilterBufferRef *picref = avfilter_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, outlink->h);
    433     picref->video->pixel_aspect = (AVRational) {1, 1};
     433    picref->video->sample_aspect_ratio = (AVRational) {1, 1};
    434434    picref->pts = frei0r->pts++;
    435435    picref->pos = -1;
  • libavfilter/vf_scale.c

    r77e9dee8 r35fe66ab  
    253253    outlink->out_buf = outpicref;
    254254
    255     av_reduce(&outpicref->video->pixel_aspect.num, &outpicref->video->pixel_aspect.den,
    256               (int64_t)picref->video->pixel_aspect.num * outlink->h * link->w,
    257               (int64_t)picref->video->pixel_aspect.den * outlink->w * link->h,
     255    av_reduce(&outpicref->video->sample_aspect_ratio.num, &outpicref->video->sample_aspect_ratio.den,
     256              (int64_t)picref->video->sample_aspect_ratio.num * outlink->h * link->w,
     257              (int64_t)picref->video->sample_aspect_ratio.den * outlink->w * link->h,
    258258              INT_MAX);
    259259
  • libavfilter/vf_showinfo.c

    r77e9dee8 r35fe66ab  
    6060           picref->pts, picref ->pts * av_q2d(inlink->time_base), picref->pos,
    6161           av_pix_fmt_descriptors[picref->format].name,
    62            picref->video->pixel_aspect.num, picref->video->pixel_aspect.den,
     62           picref->video->sample_aspect_ratio.num, picref->video->sample_aspect_ratio.den,
    6363           picref->video->w, picref->video->h,
    6464           !picref->video->interlaced     ? 'P' :         /* Progressive  */
  • libavfilter/vf_transpose.c

    r77e9dee8 r35fe66ab  
    123123    outlink->out_buf->pts = picref->pts;
    124124
    125     if (picref->video->pixel_aspect.num == 0) {
    126         outlink->out_buf->video->pixel_aspect = picref->video->pixel_aspect;
     125    if (picref->video->sample_aspect_ratio.num == 0) {
     126        outlink->out_buf->video->sample_aspect_ratio = picref->video->sample_aspect_ratio;
    127127    } else {
    128         outlink->out_buf->video->pixel_aspect.num = picref->video->pixel_aspect.den;
    129         outlink->out_buf->video->pixel_aspect.den = picref->video->pixel_aspect.num;
     128        outlink->out_buf->video->sample_aspect_ratio.num = picref->video->sample_aspect_ratio.den;
     129        outlink->out_buf->video->sample_aspect_ratio.den = picref->video->sample_aspect_ratio.num;
    130130    }
    131131
  • libavfilter/vsrc_buffer.c

    r77e9dee8 r35fe66ab  
    3535    enum PixelFormat  pix_fmt;
    3636    AVRational        time_base;     ///< time_base to set in the output link
    37     AVRational        pixel_aspect;
     37    AVRational        sample_aspect_ratio;
    3838    char              sws_param[256];
    3939} BufferSourceContext;
     
    131131        (n = sscanf(args, "%d:%d:%127[^:]:%d:%d:%d:%d", &c->w, &c->h, pix_fmt_str,
    132132                    &c->time_base.num, &c->time_base.den,
    133                     &c->pixel_aspect.num, &c->pixel_aspect.den)) != 7) {
     133                    &c->sample_aspect_ratio.num, &c->sample_aspect_ratio.den)) != 7) {
    134134        av_log(ctx, AV_LOG_ERROR, "Expected 7 arguments, but only %d found in '%s'\n", n, args);
    135135        return AVERROR(EINVAL);
     
    163163    link->w = c->w;
    164164    link->h = c->h;
    165     link->sample_aspect_ratio = c->pixel_aspect;
     165    link->sample_aspect_ratio = c->sample_aspect_ratio;
    166166    link->time_base = c->time_base;
    167167
     
    191191
    192192    picref->pts                    = c->pts;
    193     picref->video->pixel_aspect    = c->frame.sample_aspect_ratio;
     193    picref->video->sample_aspect_ratio = c->frame.sample_aspect_ratio;
    194194    picref->video->interlaced      = c->frame.interlaced_frame;
    195195    picref->video->top_field_first = c->frame.top_field_first;
  • libavfilter/vsrc_color.c

    r77e9dee8 r35fe66ab  
    133133    ColorContext *color = link->src->priv;
    134134    AVFilterBufferRef *picref = avfilter_get_video_buffer(link, AV_PERM_WRITE, color->w, color->h);
    135     picref->video->pixel_aspect = (AVRational) {1, 1};
     135    picref->video->sample_aspect_ratio = (AVRational) {1, 1};
    136136    picref->pts                 = av_rescale_q(color->pts++, color->time_base, AV_TIME_BASE_Q);
    137137    picref->pos                 = 0;
  • libavfilter/vsrc_movie.c

    r77e9dee8 r35fe66ab  
    249249                movie->picref->pos                    = movie->frame->pkt_pos;
    250250                if (!movie->frame->sample_aspect_ratio.num)
    251                     movie->picref->video->pixel_aspect = st->sample_aspect_ratio;
     251                    movie->picref->video->sample_aspect_ratio = st->sample_aspect_ratio;
    252252                movie->picref->video->interlaced      = movie->frame->interlaced_frame;
    253253                movie->picref->video->top_field_first = movie->frame->top_field_first;
     
    259259                        (double)movie->picref->pts * av_q2d(st->time_base),
    260260                        movie->picref->pos,
    261                         movie->picref->video->pixel_aspect.num, movie->picref->video->pixel_aspect.den);
     261                        movie->picref->video->sample_aspect_ratio.num,
     262                        movie->picref->video->sample_aspect_ratio.den);
    262263                // We got it. Free the packet since we are returning
    263264                av_free_packet(&pkt);
Note: See TracChangeset for help on using the changeset viewer.