[FFmpeg-cvslog] lavfi/unsharp: merge definition and declaration in init_filter_param()

Stefano Sabatini git at videolan.org
Sun Feb 17 11:53:17 CET 2013


ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Fri Feb 15 14:19:13 2013 +0100| [64e592eef26b8567118a35093755fc23720b1676] | committer: Stefano Sabatini

lavfi/unsharp: merge definition and declaration in init_filter_param()

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=64e592eef26b8567118a35093755fc23720b1676
---

 libavfilter/vf_unsharp.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libavfilter/vf_unsharp.c b/libavfilter/vf_unsharp.c
index 0fb3a2c..32c864c 100644
--- a/libavfilter/vf_unsharp.c
+++ b/libavfilter/vf_unsharp.c
@@ -203,7 +203,7 @@ static int query_formats(AVFilterContext *ctx)
 static int init_filter_param(AVFilterContext *ctx, FilterParam *fp, const char *effect_type, int width)
 {
     int z;
-    const char *effect;
+    const char *effect = fp->amount == 0 ? "none" : fp->amount < 0 ? "blur" : "sharpen";
 
     if  (!(fp->msize_x & fp->msize_y & 1)) {
         av_log(ctx, AV_LOG_ERROR,
@@ -212,8 +212,6 @@ static int init_filter_param(AVFilterContext *ctx, FilterParam *fp, const char *
         return AVERROR(EINVAL);
     }
 
-    effect = fp->amount == 0 ? "none" : fp->amount < 0 ? "blur" : "sharpen";
-
     av_log(ctx, AV_LOG_VERBOSE, "effect:%s type:%s msize_x:%d msize_y:%d amount:%0.2f\n",
            effect, effect_type, fp->msize_x, fp->msize_y, fp->amount / 65535.0);
 



More information about the ffmpeg-cvslog mailing list