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

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

Issue 789004: ffmpeg roll of source to mar 9 version... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: '' Created 10 years, 9 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 * Filter layer - default implementations 2 * Filter layer - default implementations
3 * copyright (c) 2007 Bobby Bingham 3 * copyright (c) 2007 Bobby Bingham
4 * 4 *
5 * This file is part of FFmpeg. 5 * This file is part of FFmpeg.
6 * 6 *
7 * FFmpeg is free software; you can redistribute it and/or 7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public 8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version. 10 * version 2.1 of the License, or (at your option) any later version.
11 * 11 *
12 * FFmpeg is distributed in the hope that it will be useful, 12 * FFmpeg is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details. 15 * Lesser General Public License for more details.
16 * 16 *
17 * You should have received a copy of the GNU Lesser General Public 17 * You should have received a copy of the GNU Lesser General Public
18 * License along with FFmpeg; if not, write to the Free Software 18 * License along with FFmpeg; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */ 20 */
21 21
22 #include "libavcodec/imgconvert.h" 22 #include "libavcodec/imgconvert.h"
23 #include "avfilter.h" 23 #include "avfilter.h"
24 24
25 /* TODO: buffer pool. see comment for avfilter_default_get_video_buffer() */ 25 /* TODO: buffer pool. see comment for avfilter_default_get_video_buffer() */
26 void avfilter_default_free_video_buffer(AVFilterPic *pic) 26 static void avfilter_default_free_video_buffer(AVFilterPic *pic)
27 { 27 {
28 av_free(pic->data[0]); 28 av_free(pic->data[0]);
29 av_free(pic); 29 av_free(pic);
30 } 30 }
31 31
32 /* TODO: set the buffer's priv member to a context structure for the whole 32 /* TODO: set the buffer's priv member to a context structure for the whole
33 * filter chain. This will allow for a buffer pool instead of the constant 33 * filter chain. This will allow for a buffer pool instead of the constant
34 * alloc & free cycle currently implemented. */ 34 * alloc & free cycle currently implemented. */
35 AVFilterPicRef *avfilter_default_get_video_buffer(AVFilterLink *link, int perms, int w, int h) 35 AVFilterPicRef *avfilter_default_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
36 { 36 {
(...skipping 30 matching lines...) Expand all
67 void avfilter_default_start_frame(AVFilterLink *link, AVFilterPicRef *picref) 67 void avfilter_default_start_frame(AVFilterLink *link, AVFilterPicRef *picref)
68 { 68 {
69 AVFilterLink *out = NULL; 69 AVFilterLink *out = NULL;
70 70
71 if(link->dst->output_count) 71 if(link->dst->output_count)
72 out = link->dst->outputs[0]; 72 out = link->dst->outputs[0];
73 73
74 if(out) { 74 if(out) {
75 out->outpic = avfilter_get_video_buffer(out, AV_PERM_WRITE, out->w, out->h); 75 out->outpic = avfilter_get_video_buffer(out, AV_PERM_WRITE, out->w, out->h);
76 out->outpic->pts = picref->pts; 76 out->outpic->pts = picref->pts;
77 out->outpic->pixel_aspect = picref->pixel_aspect;
77 avfilter_start_frame(out, avfilter_ref_pic(out->outpic, ~0)); 78 avfilter_start_frame(out, avfilter_ref_pic(out->outpic, ~0));
78 } 79 }
79 } 80 }
80 81
81 void avfilter_default_draw_slice(AVFilterLink *link, int y, int h, int slice_dir ) 82 void avfilter_default_draw_slice(AVFilterLink *link, int y, int h, int slice_dir )
82 { 83 {
83 AVFilterLink *out = NULL; 84 AVFilterLink *out = NULL;
84 85
85 if(link->dst->output_count) 86 if(link->dst->output_count)
86 out = link->dst->outputs[0]; 87 out = link->dst->outputs[0];
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 av_free(formats); 157 av_free(formats);
157 } 158 }
158 } 159 }
159 160
160 int avfilter_default_query_formats(AVFilterContext *ctx) 161 int avfilter_default_query_formats(AVFilterContext *ctx)
161 { 162 {
162 avfilter_set_common_formats(ctx, avfilter_all_colorspaces()); 163 avfilter_set_common_formats(ctx, avfilter_all_colorspaces());
163 return 0; 164 return 0;
164 } 165 }
165 166
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698