You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avfilter: add D2TS, TS2D, TS2T as a common macro in internal.h
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
This commit is contained in:
@@ -416,8 +416,6 @@ static int aeval_config_output(AVFilterLink *outlink)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define TS2T(ts, tb) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts)*av_q2d(tb))
|
|
||||||
|
|
||||||
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
|
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
|
||||||
{
|
{
|
||||||
EvalContext *eval = inlink->dst->priv;
|
EvalContext *eval = inlink->dst->priv;
|
||||||
|
@@ -335,10 +335,6 @@ static int process_command(AVFilterContext *ctx, const char *cmd, const char *ar
|
|||||||
return ret;
|
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)
|
static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
|
||||||
{
|
{
|
||||||
AVFilterContext *ctx = inlink->dst;
|
AVFilterContext *ctx = inlink->dst;
|
||||||
|
@@ -325,9 +325,6 @@ static double get_concatdec_select(AVFrame *frame, int64_t pts)
|
|||||||
return NAN;
|
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)
|
static void select_frame(AVFilterContext *ctx, AVFrame *frame)
|
||||||
{
|
{
|
||||||
SelectContext *select = ctx->priv;
|
SelectContext *select = ctx->priv;
|
||||||
|
@@ -475,9 +475,6 @@ static av_cold void uninit(AVFilterContext *ctx)
|
|||||||
av_freep(&s->intervals);
|
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)
|
static int filter_frame(AVFilterLink *inlink, AVFrame *ref)
|
||||||
{
|
{
|
||||||
AVFilterContext *ctx = inlink->dst;
|
AVFilterContext *ctx = inlink->dst;
|
||||||
|
@@ -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);
|
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 */
|
/* misc trace functions */
|
||||||
|
|
||||||
#define FF_TPRINTF_START(ctx, func) ff_tlog(NULL, "%-16s: ", #func)
|
#define FF_TPRINTF_START(ctx, func) ff_tlog(NULL, "%-16s: ", #func)
|
||||||
|
@@ -142,10 +142,6 @@ static int config_input(AVFilterLink *inlink)
|
|||||||
return 0;
|
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
|
#define BUF_SIZE 64
|
||||||
|
|
||||||
static inline char *double2int64str(char *buf, double v)
|
static inline char *double2int64str(char *buf, double v)
|
||||||
|
@@ -55,7 +55,6 @@ enum var_name {
|
|||||||
VAR_T,
|
VAR_T,
|
||||||
VAR_VARS_NB
|
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)
|
static int set_expr(AVExpr **pexpr, const char *expr, const char *option, void *log_ctx)
|
||||||
{
|
{
|
||||||
|
@@ -249,8 +249,6 @@ static int query_formats(AVFilterContext *ctx)
|
|||||||
return ff_set_common_formats(ctx, fmts_list);
|
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)
|
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
|
||||||
{
|
{
|
||||||
AVFilterContext *ctx = inlink->dst;
|
AVFilterContext *ctx = inlink->dst;
|
||||||
|
@@ -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)
|
static int filter_frame(AVFilterLink *inlink, AVFrame *inpic)
|
||||||
{
|
{
|
||||||
HueContext *hue = inlink->dst->priv;
|
HueContext *hue = inlink->dst->priv;
|
||||||
|
@@ -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)
|
static int filter_slice(AVFilterContext *ctx, void *arg, int job, int nb_jobs)
|
||||||
{
|
{
|
||||||
ThreadData *td = arg;
|
ThreadData *td = arg;
|
||||||
|
@@ -647,8 +647,6 @@ static int scale_slice(AVFilterLink *link, AVFrame *out_buf, AVFrame *cur_pic, s
|
|||||||
out,out_stride);
|
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)
|
static int scale_frame(AVFilterLink *link, AVFrame *in, AVFrame **frame_out)
|
||||||
{
|
{
|
||||||
AVFilterContext *ctx = link->dst;
|
AVFilterContext *ctx = link->dst;
|
||||||
|
@@ -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)
|
static void update_context(VignetteContext *s, AVFilterLink *inlink, AVFrame *frame)
|
||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
|
Reference in New Issue
Block a user