~ubuntu-branches/ubuntu/precise/libav/precise-updates

« back to all changes in this revision

Viewing changes to libavfilter/vsrc_color.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2012-01-12 22:30:00 UTC
  • mfrom: (1.2.8) (1.1.13 experimental)
  • Revision ID: package-import@ubuntu.com-20120112223000-cmfo7w78q13i2fd9
Tags: 4:0.8~beta2-1ubuntu1
* Merge from debian, remaining changes:
  - don't build against libdirac, lame, libopenjpeg, librtmp, 
    x264, and xvid  (all in universe)

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
19
 */
20
20
 
 
21
/**
 
22
 * @file
 
23
 * color source
 
24
 */
 
25
 
21
26
#include "avfilter.h"
22
27
#include "libavutil/pixdesc.h"
23
28
#include "libavutil/colorspace.h"
24
29
#include "libavutil/imgutils.h"
 
30
#include "libavutil/mathematics.h"
25
31
#include "libavutil/parseutils.h"
26
32
#include "drawutils.h"
27
33
 
124
130
           is_packed_rgba ? "rgba" : "yuva");
125
131
    inlink->w = color->w;
126
132
    inlink->h = color->h;
 
133
    inlink->time_base = color->time_base;
127
134
 
128
135
    return 0;
129
136
}
133
140
    ColorContext *color = link->src->priv;
134
141
    AVFilterBufferRef *picref = avfilter_get_video_buffer(link, AV_PERM_WRITE, color->w, color->h);
135
142
    picref->video->pixel_aspect = (AVRational) {1, 1};
136
 
    picref->pts                 = av_rescale_q(color->pts++, color->time_base, AV_TIME_BASE_Q);
137
 
    picref->pos                 = 0;
 
143
    picref->pts                 = color->pts++;
 
144
    picref->pos                 = -1;
138
145
 
139
146
    avfilter_start_frame(link, avfilter_ref_buffer(picref, ~0));
140
147
    ff_draw_rectangle(picref->data, picref->linesize,