diff --git a/libavfilter/aeval.c b/libavfilter/aeval.c index 32cd6de0435cb4c5e63980a13a9775c115658274..855dc0009d3e3fd636d4b5c9b8763aedf11d73a9 100644 --- a/libavfilter/aeval.c +++ b/libavfilter/aeval.c @@ -416,8 +416,6 @@ static int aeval_config_output(AVFilterLink *outlink) return 0; } -#define TS2T(ts, tb) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts)*av_q2d(tb)) - static int filter_frame(AVFilterLink *inlink, AVFrame *in) { EvalContext *eval = inlink->dst->priv; diff --git a/libavfilter/af_volume.c b/libavfilter/af_volume.c index 213c57195a4640da1de784239835264c12542092..5fc00d82a41e06484f64168ecd0e47ba4fe02fff 100644 --- a/libavfilter/af_volume.c +++ b/libavfilter/af_volume.c @@ -335,10 +335,6 @@ static int process_command(AVFilterContext *ctx, const char *cmd, const char *ar return ret; } -#define D2TS(d) (isnan(d) ? AV_NOPTS_VALUE : (int64_t)(d)) -#define TS2D(ts) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts)) -#define TS2T(ts, tb) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts)*av_q2d(tb)) - static int filter_frame(AVFilterLink *inlink, AVFrame *buf) { AVFilterContext *ctx = inlink->dst; diff --git a/libavfilter/f_select.c b/libavfilter/f_select.c index 755e10a3992d6a34e0931c01d4f63dc1f25cc773..92938c33aa06751f9a43c0d7debccfb9b50a4723 100644 --- a/libavfilter/f_select.c +++ b/libavfilter/f_select.c @@ -325,9 +325,6 @@ static double get_concatdec_select(AVFrame *frame, int64_t pts) return NAN; } -#define D2TS(d) (isnan(d) ? AV_NOPTS_VALUE : (int64_t)(d)) -#define TS2D(ts) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts)) - static void select_frame(AVFilterContext *ctx, AVFrame *frame) { SelectContext *select = ctx->priv; diff --git a/libavfilter/f_sendcmd.c b/libavfilter/f_sendcmd.c index 0ac87e07ef413d3ed2057d25c1d714a93856907e..6b02669afa06c9c4e4caa848e21411f6f6ef8b42 100644 --- a/libavfilter/f_sendcmd.c +++ b/libavfilter/f_sendcmd.c @@ -475,9 +475,6 @@ static av_cold void uninit(AVFilterContext *ctx) av_freep(&s->intervals); } -#define TS2D(ts) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts)) -#define TS2T(ts, tb) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts)*av_q2d(tb)) - static int filter_frame(AVFilterLink *inlink, AVFrame *ref) { AVFilterContext *ctx = inlink->dst; diff --git a/libavfilter/internal.h b/libavfilter/internal.h index abe7537b5dad870dd2a85a27eb05b46daacea41c..6cb601f36f38129273b0e935e1dc9753a41f4aeb 100644 --- a/libavfilter/internal.h +++ b/libavfilter/internal.h @@ -234,6 +234,10 @@ void ff_avfilter_link_set_out_status(AVFilterLink *link, int status, int64_t pts void ff_command_queue_pop(AVFilterContext *filter); +#define D2TS(d) (isnan(d) ? AV_NOPTS_VALUE : (int64_t)(d)) +#define TS2D(ts) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts)) +#define TS2T(ts, tb) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts) * av_q2d(tb)) + /* misc trace functions */ #define FF_TPRINTF_START(ctx, func) ff_tlog(NULL, "%-16s: ", #func) diff --git a/libavfilter/setpts.c b/libavfilter/setpts.c index c7c38362748b047950ee9282e933bb35078644f7..6506653c18fba896f01f9ea6cbacabd91d17ba36 100644 --- a/libavfilter/setpts.c +++ b/libavfilter/setpts.c @@ -142,10 +142,6 @@ static int config_input(AVFilterLink *inlink) return 0; } -#define D2TS(d) (isnan(d) ? AV_NOPTS_VALUE : (int64_t)(d)) -#define TS2D(ts) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts)) -#define TS2T(ts, tb) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts)*av_q2d(tb)) - #define BUF_SIZE 64 static inline char *double2int64str(char *buf, double v) diff --git a/libavfilter/vf_delogo.c b/libavfilter/vf_delogo.c index e55673d5ada64a997435ad91ff28ed81107bbcbc..6069c30163187f7d2313167ac06d1a697984bc1b 100644 --- a/libavfilter/vf_delogo.c +++ b/libavfilter/vf_delogo.c @@ -55,7 +55,6 @@ enum var_name { VAR_T, VAR_VARS_NB }; -#define TS2T(ts, tb) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts) * av_q2d(tb)) static int set_expr(AVExpr **pexpr, const char *expr, const char *option, void *log_ctx) { diff --git a/libavfilter/vf_eq.c b/libavfilter/vf_eq.c index c8c3d5b3404257cd19e579f23e03216f68b0330c..114781fcafd2ebb6a680c650a0482c9a59154d3b 100644 --- a/libavfilter/vf_eq.c +++ b/libavfilter/vf_eq.c @@ -249,8 +249,6 @@ static int query_formats(AVFilterContext *ctx) return ff_set_common_formats(ctx, fmts_list); } -#define TS2T(ts, tb) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts) * av_q2d(tb)) - static int filter_frame(AVFilterLink *inlink, AVFrame *in) { AVFilterContext *ctx = inlink->dst; diff --git a/libavfilter/vf_hue.c b/libavfilter/vf_hue.c index b75ef21058786149a9c2f248d493012cd26329a3..1499c05cbd557601b578e11bd73792afdcb31c02 100644 --- a/libavfilter/vf_hue.c +++ b/libavfilter/vf_hue.c @@ -363,9 +363,6 @@ static void apply_lut10(HueContext *s, } } -#define TS2D(ts) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts)) -#define TS2T(ts, tb) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts) * av_q2d(tb)) - static int filter_frame(AVFilterLink *inlink, AVFrame *inpic) { HueContext *hue = inlink->dst->priv; diff --git a/libavfilter/vf_rotate.c b/libavfilter/vf_rotate.c index 02f56c6ebc3831013e504dbf2dab79bd72f4b9ce..65c6cc411a8bf2a1b8498c58bc70c898cd107e6b 100644 --- a/libavfilter/vf_rotate.c +++ b/libavfilter/vf_rotate.c @@ -415,8 +415,6 @@ static av_always_inline void simple_rotate(uint8_t *dst, const uint8_t *src, int } } -#define TS2T(ts, tb) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts)*av_q2d(tb)) - static int filter_slice(AVFilterContext *ctx, void *arg, int job, int nb_jobs) { ThreadData *td = arg; diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index f92529e7c81bd390f8c5b759a12204bcb4237a7d..ff69bb138fa69ecba6e20b715182b315845f31b2 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -647,8 +647,6 @@ static int scale_slice(AVFilterLink *link, AVFrame *out_buf, AVFrame *cur_pic, s out,out_stride); } -#define TS2T(ts, tb) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts) * av_q2d(tb)) - static int scale_frame(AVFilterLink *link, AVFrame *in, AVFrame **frame_out) { AVFilterContext *ctx = link->dst; diff --git a/libavfilter/vf_vignette.c b/libavfilter/vf_vignette.c index 47b59e5ba09033fe33f3b1f3621c3a0e87e1c6b2..ecb04a9643ebd94e263407c84729c8d27c3e3f3e 100644 --- a/libavfilter/vf_vignette.c +++ b/libavfilter/vf_vignette.c @@ -155,9 +155,6 @@ static double get_natural_factor(const VignetteContext *s, int x, int y) } } -#define TS2D(ts) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts)) -#define TS2T(ts, tb) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts) * av_q2d(tb)) - static void update_context(VignetteContext *s, AVFilterLink *inlink, AVFrame *frame) { int x, y;