• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/minidlna/ffmpeg-2.3.4/libavfilter/

Lines Matching defs:hue

24  * Apply a hue/saturation filter to the input video
62 float hue_deg; /* hue expressed in degrees */
63 float hue; /* hue expressed in radians */
88 { "h", "set the hue angle degrees expression", OFFSET(hue_deg_expr), AV_OPT_TYPE_STRING,
92 { "H", "set the hue angle radians expression", OFFSET(hue_expr), AV_OPT_TYPE_STRING,
99 AVFILTER_DEFINE_CLASS(hue);
101 static inline void compute_sin_and_cos(HueContext *hue)
108 hue->hue_sin = rint(sin(hue->hue) * (1 << 16) * hue->saturation);
109 hue->hue_cos = rint(cos(hue->hue) * (1 << 16) * hue->saturation);
129 * is the hue and the norm is the saturation
184 HueContext *hue = ctx->priv;
187 if (hue->hue_expr && hue->hue_deg_expr) {
195 if (hue->expr##_expr) do { \
196 ret = set_expr(&hue->expr##_pexpr, &hue->expr##_expr, \
197 hue->expr##_expr, option, ctx); \
204 SET_EXPR(hue, "H");
209 hue->hue_expr, hue->hue_deg_expr, hue->saturation_expr, hue->brightness_expr);
210 compute_sin_and_cos(hue);
211 hue->is_first = 1;
218 HueContext *hue = ctx->priv;
220 av_expr_free(hue->brightness_pexpr);
221 av_expr_free(hue->hue_deg_pexpr);
222 av_expr_free(hue->hue_pexpr);
223 av_expr_free(hue->saturation_pexpr);
244 HueContext *hue = inlink->dst->priv;
247 hue->hsub = desc->log2_chroma_w;
248 hue->vsub = desc->log2_chroma_h;
250 hue->var_values[VAR_N] = 0;
251 hue->var_values[VAR_TB] = av_q2d(inlink->time_base);
252 hue->var_values[VAR_R] = inlink->frame_rate.num == 0 || inlink->frame_rate.den == 0 ?
302 HueContext *hue = inlink->dst->priv;
305 const int32_t old_hue_sin = hue->hue_sin, old_hue_cos = hue->hue_cos;
306 const float old_brightness = hue->brightness;
321 hue->var_values[VAR_N] = inlink->frame_count;
322 hue->var_values[VAR_T] = TS2T(inpic->pts, inlink->time_base);
323 hue->var_values[VAR_PTS] = TS2D(inpic->pts);
325 if (hue->saturation_expr) {
326 hue->saturation = av_expr_eval(hue->saturation_pexpr, hue->var_values, NULL);
328 if (hue->saturation < SAT_MIN_VAL || hue->saturation > SAT_MAX_VAL) {
329 hue->saturation = av_clip(hue->saturation, SAT_MIN_VAL, SAT_MAX_VAL);
332 SAT_MIN_VAL, SAT_MAX_VAL, hue->saturation);
336 if (hue->brightness_expr) {
337 hue->brightness = av_expr_eval(hue->brightness_pexpr, hue->var_values, NULL);
339 if (hue->brightness < -10 || hue->brightness > 10) {
340 hue->brightness = av_clipf(hue->brightness, -10, 10);
343 -10, 10, hue->brightness);
347 if (hue->hue_deg_expr) {
348 hue->hue_deg = av_expr_eval(hue->hue_deg_pexpr, hue->var_values, NULL);
349 hue->hue = hue->hue_deg * M_PI / 180;
350 } else if (hue->hue_expr) {
351 hue->hue = av_expr_eval(hue->hue_pexpr, hue->var_values, NULL);
352 hue->hue_deg = hue->hue * 180 / M_PI;
357 hue->hue/M_PI, hue->hue_deg, hue->saturation, hue->brightness,
358 hue->var_values[VAR_T], (int)hue->var_values[VAR_N]);
360 compute_sin_and_cos(hue);
361 if (hue->is_first || (old_hue_sin != hue->hue_sin || old_hue_cos != hue->hue_cos))
362 create_chrominance_lut(hue, hue->hue_cos, hue->hue_sin);
364 if (hue->is_first || (old_brightness != hue->brightness && hue->brightness))
365 create_luma_lut(hue);
368 if (!hue->brightness)
378 apply_lut(hue, outpic->data[1], outpic->data[2], outpic->linesize[1],
380 FF_CEIL_RSHIFT(inlink->w, hue->hsub),
381 FF_CEIL_RSHIFT(inlink->h, hue->vsub));
382 if (hue->brightness)
383 apply_luma_lut(hue, outpic->data[0], outpic->linesize[0],
389 hue->is_first = 0;
396 HueContext *hue = ctx->priv;
401 ret = set_expr(&hue->expr##_pexpr, &hue->expr##_expr, \
409 av_freep(&hue->hue_expr);
411 SET_EXPR(hue, "H");
412 av_freep(&hue->hue_deg_expr);
442 .name = "hue",
443 .description = NULL_IF_CONFIG_SMALL("Adjust the hue and saturation of the input video."),