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

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

Issue 4533003: patched ffmpeg nov 2 (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: '' Created 10 years, 1 month 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 * Ported to FFmpeg from MPlayer libmpcodecs/unsharp.c 2 * Ported to FFmpeg from MPlayer libmpcodecs/unsharp.c
3 * Original copyright (C) 2002 Remi Guyomarch <rguyom@pobox.com> 3 * Original copyright (C) 2002 Remi Guyomarch <rguyom@pobox.com>
4 * Port copyright (C) 2010 Daniel G. Taylor <dan@programmer-art.org> 4 * Port copyright (C) 2010 Daniel G. Taylor <dan@programmer-art.org>
5 * Relicensed to the LGPL with permission from Remi Guyomarch. 5 * Relicensed to the LGPL with permission from Remi Guyomarch.
6 * 6 *
7 * This file is part of FFmpeg. 7 * This file is part of FFmpeg.
8 * 8 *
9 * FFmpeg is free software; you can redistribute it and/or 9 * FFmpeg is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public 10 * modify it under the terms of the GNU Lesser General Public
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 { 126 {
127 UnsharpContext *unsharp = ctx->priv; 127 UnsharpContext *unsharp = ctx->priv;
128 int lmsize_x = 5, cmsize_x = 0; 128 int lmsize_x = 5, cmsize_x = 0;
129 int lmsize_y = 5, cmsize_y = 0; 129 int lmsize_y = 5, cmsize_y = 0;
130 double lamount = 1.0f, camount = 0.0f; 130 double lamount = 1.0f, camount = 0.0f;
131 131
132 if (args) 132 if (args)
133 sscanf(args, "%d:%d:%lf:%d:%d:%lf", &lmsize_x, &lmsize_y, &lamount, 133 sscanf(args, "%d:%d:%lf:%d:%d:%lf", &lmsize_x, &lmsize_y, &lamount,
134 &cmsize_x, &cmsize_y, &camount); 134 &cmsize_x, &cmsize_y, &camount);
135 135
136 if (lmsize_x < 2 || lmsize_y < 2 || cmsize_x < 2 || cmsize_y < 2) { 136 if ((lamount && (lmsize_x < 2 || lmsize_y < 2)) ||
137 (camount && (cmsize_x < 2 || cmsize_y < 2))) {
137 av_log(ctx, AV_LOG_ERROR, 138 av_log(ctx, AV_LOG_ERROR,
138 "Invalid value <2 for lmsize_x:%d or lmsize_y:%d or cmsize_x:%d o r cmsize_y:%d\n", 139 "Invalid value <2 for lmsize_x:%d or lmsize_y:%d or cmsize_x:%d o r cmsize_y:%d\n",
139 lmsize_x, lmsize_y, cmsize_x, cmsize_y); 140 lmsize_x, lmsize_y, cmsize_x, cmsize_y);
140 return AVERROR(EINVAL); 141 return AVERROR(EINVAL);
141 } 142 }
142 143
143 set_filter_param(&unsharp->luma, lmsize_x, lmsize_y, lamount); 144 set_filter_param(&unsharp->luma, lmsize_x, lmsize_y, lamount);
144 set_filter_param(&unsharp->chroma, cmsize_x, cmsize_y, camount); 145 set_filter_param(&unsharp->chroma, cmsize_x, cmsize_y, camount);
145 146
146 return 0; 147 return 0;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 .draw_slice = draw_slice, 235 .draw_slice = draw_slice,
235 .end_frame = end_frame, 236 .end_frame = end_frame,
236 .config_props = config_props, 237 .config_props = config_props,
237 .min_perms = AV_PERM_READ, }, 238 .min_perms = AV_PERM_READ, },
238 { .name = NULL}}, 239 { .name = NULL}},
239 240
240 .outputs = (AVFilterPad[]) {{ .name = "default", 241 .outputs = (AVFilterPad[]) {{ .name = "default",
241 .type = AVMEDIA_TYPE_VIDEO, }, 242 .type = AVMEDIA_TYPE_VIDEO, },
242 { .name = NULL}}, 243 { .name = NULL}},
243 }; 244 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698