Browse code

lavfi/curves: pass log ctx as void* instead of AVFilterContext*

Clément Bœsch authored on 2016/07/24 19:13:46
Showing 1 changed files
... ...
@@ -211,7 +211,7 @@ static int get_nb_points(const struct keypoint *d)
211 211
 
212 212
 #define CLIP(v) (nbits == 8 ? av_clip_uint8(v) : av_clip_uint16(v))
213 213
 
214
-static inline int interpolate(AVFilterContext *ctx, uint16_t *y,
214
+static inline int interpolate(void *log_ctx, uint16_t *y,
215 215
                               const struct keypoint *points, int nbits)
216 216
 {
217 217
     int i, ret = 0;
... ...
@@ -315,7 +315,7 @@ static inline int interpolate(AVFilterContext *ctx, uint16_t *y,
315 315
             const double xx = (x - x_start) * 1./scale;
316 316
             const double yy = a + b*xx + c*xx*xx + d*xx*xx*xx;
317 317
             y[x] = CLIP(yy * scale);
318
-            av_log(ctx, AV_LOG_DEBUG, "f(%f)=%f -> y[%d]=%d\n", xx, yy, x, y[x]);
318
+            av_log(log_ctx, AV_LOG_DEBUG, "f(%f)=%f -> y[%d]=%d\n", xx, yy, x, y[x]);
319 319
         }
320 320
 
321 321
         point = point->next;
... ...
@@ -334,10 +334,10 @@ end:
334 334
 }
335 335
 
336 336
 #define DECLARE_INTERPOLATE_FUNC(nbits)                                     \
337
-static const int interpolate##nbits(AVFilterContext *ctx, uint16_t *y,      \
337
+static const int interpolate##nbits(void *log_ctx, uint16_t *y,             \
338 338
                                     const struct keypoint *points)          \
339 339
 {                                                                           \
340
-    return interpolate(ctx, y, points, nbits);                              \
340
+    return interpolate(log_ctx, y, points, nbits);                          \
341 341
 }
342 342
 
343 343
 DECLARE_INTERPOLATE_FUNC(8)