Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(284)

Side by Side Diff: source/patched-ffmpeg-mt/libavfilter/vf_scale.c

Issue 3384002: ffmpeg source update for sep 09 (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * copyright (c) 2007 Bobby Bingham 2 * copyright (c) 2007 Bobby Bingham
3 * 3 *
4 * This file is part of FFmpeg. 4 * This file is part of FFmpeg.
5 * 5 *
6 * FFmpeg is free software; you can redistribute it and/or 6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public 7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version. 9 * version 2.1 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 { 146 {
147 ScaleContext *scale = link->dst->priv; 147 ScaleContext *scale = link->dst->priv;
148 AVFilterLink *outlink = link->dst->outputs[0]; 148 AVFilterLink *outlink = link->dst->outputs[0];
149 AVFilterBufferRef *outpicref; 149 AVFilterBufferRef *outpicref;
150 150
151 scale->hsub = av_pix_fmt_descriptors[link->format].log2_chroma_w; 151 scale->hsub = av_pix_fmt_descriptors[link->format].log2_chroma_w;
152 scale->vsub = av_pix_fmt_descriptors[link->format].log2_chroma_h; 152 scale->vsub = av_pix_fmt_descriptors[link->format].log2_chroma_h;
153 153
154 outpicref = avfilter_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, ou tlink->h); 154 outpicref = avfilter_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, ou tlink->h);
155 avfilter_copy_buffer_ref_props(outpicref, picref); 155 avfilter_copy_buffer_ref_props(outpicref, picref);
156 outpicref->video->w = outlink->w;
157 outpicref->video->h = outlink->h;
156 158
157 outlink->out_buf = outpicref; 159 outlink->out_buf = outpicref;
158 160
159 av_reduce(&outpicref->pixel_aspect.num, &outpicref->pixel_aspect.den, 161 av_reduce(&outpicref->video->pixel_aspect.num, &outpicref->video->pixel_aspe ct.den,
160 (int64_t)picref->pixel_aspect.num * outlink->h * link->w, 162 (int64_t)picref->video->pixel_aspect.num * outlink->h * link->w,
161 (int64_t)picref->pixel_aspect.den * outlink->w * link->h, 163 (int64_t)picref->video->pixel_aspect.den * outlink->w * link->h,
162 INT_MAX); 164 INT_MAX);
163 165
164 scale->slice_y = 0; 166 scale->slice_y = 0;
165 avfilter_start_frame(outlink, avfilter_ref_buffer(outpicref, ~0)); 167 avfilter_start_frame(outlink, avfilter_ref_buffer(outpicref, ~0));
166 } 168 }
167 169
168 static void draw_slice(AVFilterLink *link, int y, int h, int slice_dir) 170 static void draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
169 { 171 {
170 ScaleContext *scale = link->dst->priv; 172 ScaleContext *scale = link->dst->priv;
171 int out_h; 173 int out_h;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 .type = AVMEDIA_TYPE_VIDEO, 210 .type = AVMEDIA_TYPE_VIDEO,
209 .start_frame = start_frame, 211 .start_frame = start_frame,
210 .draw_slice = draw_slice, 212 .draw_slice = draw_slice,
211 .min_perms = AV_PERM_READ, }, 213 .min_perms = AV_PERM_READ, },
212 { .name = NULL}}, 214 { .name = NULL}},
213 .outputs = (AVFilterPad[]) {{ .name = "default", 215 .outputs = (AVFilterPad[]) {{ .name = "default",
214 .type = AVMEDIA_TYPE_VIDEO, 216 .type = AVMEDIA_TYPE_VIDEO,
215 .config_props = config_props, }, 217 .config_props = config_props, },
216 { .name = NULL}}, 218 { .name = NULL}},
217 }; 219 };
OLDNEW
« no previous file with comments | « source/patched-ffmpeg-mt/libavfilter/vf_pad.c ('k') | source/patched-ffmpeg-mt/libavfilter/vsrc_buffer.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698