X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Fvf_hue.c;h=1499c05cbd557601b578e11bd73792afdcb31c02;hb=0c820b15254f9b9b3d2e29347e329b719f0e001c;hp=323333b33cf28efa640f2c18756ccd85047c98fd;hpb=ebdc5c419aef0d9eed8c1ec57b30238194c1db0a;p=ffmpeg diff --git a/libavfilter/vf_hue.c b/libavfilter/vf_hue.c index 323333b33cf..1499c05cbd5 100644 --- a/libavfilter/vf_hue.c +++ b/libavfilter/vf_hue.c @@ -86,7 +86,7 @@ typedef struct HueContext { } HueContext; #define OFFSET(x) offsetof(HueContext, x) -#define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM +#define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM static const AVOption hue_options[] = { { "h", "set the hue angle degrees expression", OFFSET(hue_deg_expr), AV_OPT_TYPE_STRING, { .str = NULL }, .flags = FLAGS }, @@ -136,7 +136,7 @@ static inline void create_chrominance_lut(HueContext *h, const int32_t c, */ for (i = 0; i < 256; i++) { for (j = 0; j < 256; j++) { - /* Normalize the components from range [16;140] to [-112;112] */ + /* Normalize the components from range [16;240] to [-112;112] */ u = i - 128; v = j - 128; /* @@ -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;