Originally committed as revision 22595 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -56,13 +56,6 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) · 55 unmodified lines | ||
| 56 | 56 | return 0; |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | − | |
| 60 | −static AVFilterPicRef *get_video_buffer(AVFilterLink *link, int perms, | |
| 61 | − int w, int h) | |
| 62 | −{ | |
| 63 | − return avfilter_get_video_buffer(link->dst->outputs[0], perms, w, h); | |
| 64 | −} | |
| 65 | − | |
| 66 | 59 | static void start_frame(AVFilterLink *link, AVFilterPicRef *picref) |
| 67 | 60 | { |
| 68 | 61 | AspectContext *aspect = link->dst->priv; |
| @@ -71,11 +64,6 @@ static void start_frame(AVFilterLink *link, AVFilterPicRef *picref) · 2 unmodified lines | ||
| 71 | 64 | avfilter_start_frame(link->dst->outputs[0], picref); |
| 72 | 65 | } |
| 73 | 66 | |
| 74 | −static void end_frame(AVFilterLink *link) | |
| 75 | −{ | |
| 76 | − avfilter_end_frame(link->dst->outputs[0]); | |
| 77 | −} | |
| 78 | − | |
| 79 | 67 | #if CONFIG_ASPECT_FILTER |
| 80 | 68 | /* for aspect filter, convert from frame aspect ratio to pixel aspect ratio */ |
| 81 | 69 | static int frameaspect_config_props(AVFilterLink *inlink) |
| @@ -100,9 +88,9 @@ AVFilter avfilter_vf_aspect = { · 18 unmodified lines | ||
| 100 | 88 | .inputs = (AVFilterPad[]) {{ .name = "default", |
| 101 | 89 | .type = CODEC_TYPE_VIDEO, |
| 102 | 90 | .config_props = frameaspect_config_props, |
| 103 | − .get_video_buffer = get_video_buffer, | |
| 91 | + .get_video_buffer = avfilter_null_get_video_buffer, | |
| 104 | 92 | .start_frame = start_frame, |
| 105 | − .end_frame = end_frame }, | |
| 93 | + .end_frame = avfilter_null_end_frame }, | |
| 106 | 94 | { .name = NULL}}, |
| 107 | 95 | |
| 108 | 96 | .outputs = (AVFilterPad[]) {{ .name = "default", |
| @@ -122,9 +110,9 @@ AVFilter avfilter_vf_pixelaspect = { · 13 unmodified lines | ||
| 122 | 110 | |
| 123 | 111 | .inputs = (AVFilterPad[]) {{ .name = "default", |
| 124 | 112 | .type = CODEC_TYPE_VIDEO, |
| 125 | − .get_video_buffer = get_video_buffer, | |
| 113 | + .get_video_buffer = avfilter_null_get_video_buffer, | |
| 126 | 114 | .start_frame = start_frame, |
| 127 | − .end_frame = end_frame }, | |
| 115 | + .end_frame = avfilter_null_end_frame }, | |
| 128 | 116 | { .name = NULL}}, |
| 129 | 117 | |
| 130 | 118 | .outputs = (AVFilterPad[]) {{ .name = "default", |
| @@ -156,12 +156,6 @@ static int config_output(AVFilterLink *link) · 155 unmodified lines | ||
| 156 | 156 | return 0; |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | −static AVFilterPicRef *get_video_buffer(AVFilterLink *link, int perms, | |
| 160 | − int w, int h) | |
| 161 | −{ | |
| 162 | − return avfilter_get_video_buffer(link->dst->outputs[0], perms, w, h); | |
| 163 | −} | |
| 164 | − | |
| 165 | 159 | static void start_frame(AVFilterLink *link, AVFilterPicRef *picref) |
| 166 | 160 | { |
| 167 | 161 | CropContext *crop = link->dst->priv; |
| @@ -223,7 +217,7 @@ AVFilter avfilter_vf_crop = { · 55 unmodified lines | ||
| 223 | 217 | .type = CODEC_TYPE_VIDEO, |
| 224 | 218 | .start_frame = start_frame, |
| 225 | 219 | .draw_slice = draw_slice, |
| 226 | − .get_video_buffer = get_video_buffer, | |
| 220 | + .get_video_buffer = avfilter_null_get_video_buffer, | |
| 227 | 221 | .config_props = config_input, }, |
| 228 | 222 | { .name = NULL}}, |
| 229 | 223 | .outputs = (AVFilterPad[]) {{ .name = "default", |
| @@ -85,27 +85,6 @@ static AVFilterFormats *make_format_list(FormatContext *format, int flag) · 84 unmodified lines | ||
| 85 | 85 | return formats; |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | −static AVFilterPicRef *get_video_buffer(AVFilterLink *link, int perms, | |
| 89 | − int w, int h) | |
| 90 | −{ | |
| 91 | − return avfilter_get_video_buffer(link->dst->outputs[0], perms, w, h); | |
| 92 | −} | |
| 93 | − | |
| 94 | −static void start_frame(AVFilterLink *link, AVFilterPicRef *picref) | |
| 95 | −{ | |
| 96 | − avfilter_start_frame(link->dst->outputs[0], picref); | |
| 97 | −} | |
| 98 | − | |
| 99 | −static void end_frame(AVFilterLink *link) | |
| 100 | −{ | |
| 101 | − avfilter_end_frame(link->dst->outputs[0]); | |
| 102 | −} | |
| 103 | − | |
| 104 | −static void draw_slice(AVFilterLink *link, int y, int h, int slice_dir) | |
| 105 | −{ | |
| 106 | − avfilter_draw_slice(link->dst->outputs[0], y, h, slice_dir); | |
| 107 | −} | |
| 108 | − | |
| 109 | 88 | #if CONFIG_FORMAT_FILTER |
| 110 | 89 | static int query_formats_format(AVFilterContext *ctx) |
| 111 | 90 | { |
| @@ -125,10 +104,10 @@ AVFilter avfilter_vf_format = { · 13 unmodified lines | ||
| 125 | 104 | |
| 126 | 105 | .inputs = (AVFilterPad[]) {{ .name = "default", |
| 127 | 106 | .type = CODEC_TYPE_VIDEO, |
| 128 | − .get_video_buffer= get_video_buffer, | |
| 129 | − .start_frame = start_frame, | |
| 130 | − .draw_slice = draw_slice, | |
| 131 | − .end_frame = end_frame, }, | |
| 107 | + .get_video_buffer= avfilter_null_get_video_buffer, | |
| 108 | + .start_frame = avfilter_null_start_frame, | |
| 109 | + .draw_slice = avfilter_null_draw_slice, | |
| 110 | + .end_frame = avfilter_null_end_frame, }, | |
| 132 | 111 | { .name = NULL}}, |
| 133 | 112 | .outputs = (AVFilterPad[]) {{ .name = "default", |
| 134 | 113 | .type = CODEC_TYPE_VIDEO }, |
| @@ -155,10 +134,10 @@ AVFilter avfilter_vf_noformat = { · 20 unmodified lines | ||
| 155 | 134 | |
| 156 | 135 | .inputs = (AVFilterPad[]) {{ .name = "default", |
| 157 | 136 | .type = CODEC_TYPE_VIDEO, |
| 158 | − .get_video_buffer= get_video_buffer, | |
| 159 | − .start_frame = start_frame, | |
| 160 | − .draw_slice = draw_slice, | |
| 161 | − .end_frame = end_frame, }, | |
| 137 | + .get_video_buffer= avfilter_null_get_video_buffer, | |
| 138 | + .start_frame = avfilter_null_start_frame, | |
| 139 | + .draw_slice = avfilter_null_draw_slice, | |
| 140 | + .end_frame = avfilter_null_end_frame, }, | |
| 162 | 141 | { .name = NULL}}, |
| 163 | 142 | .outputs = (AVFilterPad[]) {{ .name = "default", |
| 164 | 143 | .type = CODEC_TYPE_VIDEO }, |
| @@ -23,22 +23,6 @@ · 22 unmodified lines | ||
| 23 | 23 | |
| 24 | 24 | #include "avfilter.h" |
| 25 | 25 | |
| 26 | −static AVFilterPicRef *get_video_buffer(AVFilterLink *link, int perms, | |
| 27 | − int w, int h) | |
| 28 | −{ | |
| 29 | − return avfilter_get_video_buffer(link->dst->outputs[0], perms, w, h); | |
| 30 | −} | |
| 31 | − | |
| 32 | −static void start_frame(AVFilterLink *link, AVFilterPicRef *picref) | |
| 33 | −{ | |
| 34 | − avfilter_start_frame(link->dst->outputs[0], picref); | |
| 35 | −} | |
| 36 | − | |
| 37 | −static void end_frame(AVFilterLink *link) | |
| 38 | −{ | |
| 39 | − avfilter_end_frame(link->dst->outputs[0]); | |
| 40 | −} | |
| 41 | − | |
| 42 | 26 | AVFilter avfilter_vf_null = { |
| 43 | 27 | .name = "null", |
| 44 | 28 | .description = NULL_IF_CONFIG_SMALL("Pass the source unchanged to the output."), |
| @@ -47,9 +31,9 @@ AVFilter avfilter_vf_null = { · 2 unmodified lines | ||
| 47 | 31 | |
| 48 | 32 | .inputs = (AVFilterPad[]) {{ .name = "default", |
| 49 | 33 | .type = CODEC_TYPE_VIDEO, |
| 50 | − .get_video_buffer = get_video_buffer, | |
| 51 | − .start_frame = start_frame, | |
| 52 | − .end_frame = end_frame }, | |
| 34 | + .get_video_buffer = avfilter_null_get_video_buffer, | |
| 35 | + .start_frame = avfilter_null_start_frame, | |
| 36 | + .end_frame = avfilter_null_end_frame }, | |
| 53 | 37 | { .name = NULL}}, |
| 54 | 38 | |
| 55 | 39 | .outputs = (AVFilterPad[]) {{ .name = "default", |
| @@ -57,12 +57,6 @@ static int config_props(AVFilterLink *link) · 56 unmodified lines | ||
| 57 | 57 | return 0; |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | −static AVFilterPicRef *get_video_buffer(AVFilterLink *link, int perms, | |
| 61 | − int w, int h) | |
| 62 | −{ | |
| 63 | − return avfilter_get_video_buffer(link->dst->outputs[0], perms, w, h); | |
| 64 | −} | |
| 65 | − | |
| 66 | 60 | static void start_frame(AVFilterLink *link, AVFilterPicRef *picref) |
| 67 | 61 | { |
| 68 | 62 | SliceContext *slice = link->dst->priv; |
| @@ -81,11 +75,6 @@ static void start_frame(AVFilterLink *link, AVFilterPicRef *picref) · 12 unmodified lines | ||
| 81 | 75 | avfilter_start_frame(link->dst->outputs[0], picref); |
| 82 | 76 | } |
| 83 | 77 | |
| 84 | −static void end_frame(AVFilterLink *link) | |
| 85 | −{ | |
| 86 | − avfilter_end_frame(link->dst->outputs[0]); | |
| 87 | −} | |
| 88 | − | |
| 89 | 78 | static void draw_slice(AVFilterLink *link, int y, int h, int slice_dir) |
| 90 | 79 | { |
| 91 | 80 | SliceContext *slice = link->dst->priv; |
| @@ -116,11 +105,11 @@ AVFilter avfilter_vf_slicify = { · 24 unmodified lines | ||
| 116 | 105 | |
| 117 | 106 | .inputs = (AVFilterPad[]) {{ .name = "default", |
| 118 | 107 | .type = CODEC_TYPE_VIDEO, |
| 119 | − .get_video_buffer = get_video_buffer, | |
| 108 | + .get_video_buffer = avfilter_null_get_video_buffer, | |
| 120 | 109 | .start_frame = start_frame, |
| 121 | 110 | .draw_slice = draw_slice, |
| 122 | 111 | .config_props = config_props, |
| 123 | − .end_frame = end_frame, }, | |
| 112 | + .end_frame = avfilter_null_end_frame, }, | |
| 124 | 113 | { .name = NULL}}, |
| 125 | 114 | .outputs = (AVFilterPad[]) {{ .name = "default", |
| 126 | 115 | .type = CODEC_TYPE_VIDEO, }, |