FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
vf_curves.c File Reference
#include "libavutil/opt.h"
#include "libavutil/bprint.h"
#include "libavutil/eval.h"
#include "libavutil/file.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/avassert.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "drawutils.h"
#include "formats.h"
#include "internal.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  keypoint
 
struct  CurvesContext
 
struct  ThreadData
 Used for passing data between threads. More...
 

Macros

#define R   0
 
#define G   1
 
#define B   2
 
#define A   3
 
#define NB_COMP   3
 
#define OFFSET(x)   offsetof(CurvesContext, x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 
#define CLIP(v)   (nbits == 8 ? av_clip_uint8(v) : av_clip_uintp2_c(v, nbits))
 Natural cubic spline interpolation Finding curves using Cubic Splines notes by Steven Rauch and John Stockie. More...
 
#define BD   0 /* sub diagonal (below main) */
 
#define MD   1 /* main diagonal (center) */
 
#define AD   2 /* sup diagonal (above main) */
 
#define DECLARE_INTERPOLATE_FUNC(nbits)
 
#define READ16(dst)
 
#define SET_COMP_IF_NOT_SET(n, name)
 

Enumerations

enum  preset {
  PRESET_NONE, PRESET_COLOR_NEGATIVE, PRESET_CROSS_PROCESS, PRESET_DARKER,
  PRESET_INCREASE_CONTRAST, PRESET_LIGHTER, PRESET_LINEAR_CONTRAST, PRESET_MEDIUM_CONTRAST,
  PRESET_NEGATIVE, PRESET_STRONG_CONTRAST, PRESET_VINTAGE, NB_PRESETS
}
 

Functions

 AVFILTER_DEFINE_CLASS (curves)
 
static struct keypointmake_point (double x, double y, struct keypoint *next)
 
static int parse_points_str (AVFilterContext *ctx, struct keypoint **points, const char *s, int lut_size)
 
static int get_nb_points (const struct keypoint *d)
 
static int interpolate (void *log_ctx, uint16_t *y, const struct keypoint *points, int nbits)
 
static int parse_psfile (AVFilterContext *ctx, const char *fname)
 
static int dump_curves (const char *fname, uint16_t *graph[NB_COMP+1], struct keypoint *comp_points[NB_COMP+1], int lut_size)
 
static av_cold int curves_init (AVFilterContext *ctx)
 
static int query_formats (AVFilterContext *ctx)
 
static int filter_slice_packed (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int filter_slice_planar (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int config_input (AVFilterLink *inlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static av_cold void curves_uninit (AVFilterContext *ctx)
 

Variables

static const AVOption curves_options []
 
struct {
   const char *   r
 
   const char *   g
 
   const char *   b
 
   const char *   master
 
curves_presets []
 
static const AVFilterPad curves_inputs []
 
static const AVFilterPad curves_outputs []
 
AVFilter ff_vf_curves
 

Macro Definition Documentation

#define R   0

Definition at line 34 of file vf_curves.c.

Referenced by filter_slice_packed(), and filter_slice_planar().

#define G   1

Definition at line 35 of file vf_curves.c.

Referenced by filter_slice_packed(), and filter_slice_planar().

#define B   2

Definition at line 36 of file vf_curves.c.

Referenced by filter_slice_packed(), and filter_slice_planar().

#define A   3

Definition at line 37 of file vf_curves.c.

Referenced by filter_slice_packed(), and filter_slice_planar().

#define NB_COMP   3

Definition at line 44 of file vf_curves.c.

Referenced by config_input(), curves_init(), curves_uninit(), and dump_curves().

#define OFFSET (   x)    offsetof(CurvesContext, x)

Definition at line 82 of file vf_curves.c.

Definition at line 83 of file vf_curves.c.

#define CLIP (   v)    (nbits == 8 ? av_clip_uint8(v) : av_clip_uintp2_c(v, nbits))

Natural cubic spline interpolation Finding curves using Cubic Splines notes by Steven Rauch and John Stockie.

See also
http://people.math.sfu.ca/~stockie/teaching/macm316/notes/splines.pdf

Definition at line 215 of file vf_curves.c.

Referenced by interpolate().

#define BD   0 /* sub diagonal (below main) */

Referenced by interpolate(), and nvenc_map_preset().

#define MD   1 /* main diagonal (center) */

Referenced by interpolate().

#define AD   2 /* sup diagonal (above main) */

Referenced by interpolate().

#define DECLARE_INTERPOLATE_FUNC (   nbits)
Value:
static int interpolate##nbits(void *log_ctx, uint16_t *y, \
const struct keypoint *points) \
{ \
return interpolate(log_ctx, y, points, nbits); \
}
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a it should return
static int interpolate(void *log_ctx, uint16_t *y, const struct keypoint *points, int nbits)
Definition: vf_curves.c:217

Definition at line 339 of file vf_curves.c.

#define READ16 (   dst)
Value:
do { \
if (size < 2) { \
goto end; \
} \
dst = AV_RB16(buf); \
buf += 2; \
size -= 2; \
} while (0)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition: error.h:59
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_WB32 unsigned int_TMPL AV_WB24 unsigned int_TMPL AV_RB16
Definition: bytestream.h:87
static av_cold int end(AVCodecContext *avctx)
Definition: avrndec.c:90
ptrdiff_t size
Definition: opengl_enc.c:100
if(ret)
void * buf
Definition: avisynth_c.h:766

Referenced by parse_psfile().

#define SET_COMP_IF_NOT_SET (   n,
  name 
)
Value:
do { \
if (!pts[n] && curves_presets[curves->preset].name) { \
pts[n] = av_strdup(curves_presets[curves->preset].name); \
if (!pts[n]) \
return AVERROR(ENOMEM); \
} \
} while (0)
static const struct @224 curves_presets[]
int n
Definition: avisynth_c.h:760
if(ret)
char * av_strdup(const char *s)
Duplicate a string.
Definition: mem.c:251
static int64_t pts
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a it should return
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later.That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another.Frame references ownership and permissions

Referenced by curves_init().

Enumeration Type Documentation

enum preset
Enumerator
PRESET_NONE 
PRESET_COLOR_NEGATIVE 
PRESET_CROSS_PROCESS 
PRESET_DARKER 
PRESET_INCREASE_CONTRAST 
PRESET_LIGHTER 
PRESET_LINEAR_CONTRAST 
PRESET_MEDIUM_CONTRAST 
PRESET_NEGATIVE 
PRESET_STRONG_CONTRAST 
PRESET_VINTAGE 
NB_PRESETS 

Definition at line 46 of file vf_curves.c.

Function Documentation

AVFILTER_DEFINE_CLASS ( curves  )
static struct keypoint* make_point ( double  x,
double  y,
struct keypoint next 
)
static

Definition at line 143 of file vf_curves.c.

Referenced by parse_points_str().

static int parse_points_str ( AVFilterContext ctx,
struct keypoint **  points,
const char *  s,
int  lut_size 
)
static

Definition at line 155 of file vf_curves.c.

Referenced by config_input().

static int get_nb_points ( const struct keypoint d)
static

Definition at line 199 of file vf_curves.c.

Referenced by interpolate().

static int interpolate ( void log_ctx,
uint16_t *  y,
const struct keypoint points,
int  nbits 
)
inlinestatic

Definition at line 217 of file vf_curves.c.

static int parse_psfile ( AVFilterContext ctx,
const char *  fname 
)
static

Definition at line 353 of file vf_curves.c.

Referenced by curves_init().

static int dump_curves ( const char *  fname,
uint16_t *  graph[NB_COMP+1],
struct keypoint comp_points[NB_COMP+1],
int  lut_size 
)
static

Definition at line 409 of file vf_curves.c.

Referenced by config_input().

static av_cold int curves_init ( AVFilterContext ctx)
static

Definition at line 470 of file vf_curves.c.

static int query_formats ( AVFilterContext ctx)
static

Definition at line 512 of file vf_curves.c.

static int filter_slice_packed ( AVFilterContext ctx,
void arg,
int  jobnr,
int  nb_jobs 
)
static

Definition at line 536 of file vf_curves.c.

Referenced by config_input().

static int filter_slice_planar ( AVFilterContext ctx,
void arg,
int  jobnr,
int  nb_jobs 
)
static

Definition at line 584 of file vf_curves.c.

Referenced by config_input().

static int config_input ( AVFilterLink inlink)
static

Definition at line 650 of file vf_curves.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 717 of file vf_curves.c.

static av_cold void curves_uninit ( AVFilterContext ctx)
static

Definition at line 746 of file vf_curves.c.

Variable Documentation

const AVOption curves_options[]
static
Initial value:
= {
{ "preset", "select a color curves preset", OFFSET(preset), AV_OPT_TYPE_INT, {.i64=PRESET_NONE}, PRESET_NONE, NB_PRESETS-1, FLAGS, "preset_name" },
{ "none", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_NONE}, INT_MIN, INT_MAX, FLAGS, "preset_name" },
{ "color_negative", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_COLOR_NEGATIVE}, INT_MIN, INT_MAX, FLAGS, "preset_name" },
{ "cross_process", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_CROSS_PROCESS}, INT_MIN, INT_MAX, FLAGS, "preset_name" },
{ "darker", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_DARKER}, INT_MIN, INT_MAX, FLAGS, "preset_name" },
{ "increase_contrast", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_INCREASE_CONTRAST}, INT_MIN, INT_MAX, FLAGS, "preset_name" },
{ "lighter", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_LIGHTER}, INT_MIN, INT_MAX, FLAGS, "preset_name" },
{ "linear_contrast", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_LINEAR_CONTRAST}, INT_MIN, INT_MAX, FLAGS, "preset_name" },
{ "medium_contrast", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_MEDIUM_CONTRAST}, INT_MIN, INT_MAX, FLAGS, "preset_name" },
{ "negative", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_NEGATIVE}, INT_MIN, INT_MAX, FLAGS, "preset_name" },
{ "strong_contrast", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_STRONG_CONTRAST}, INT_MIN, INT_MAX, FLAGS, "preset_name" },
{ "vintage", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_VINTAGE}, INT_MIN, INT_MAX, FLAGS, "preset_name" },
{ "master","set master points coordinates",OFFSET(comp_points_str[NB_COMP]), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS },
{ "m", "set master points coordinates",OFFSET(comp_points_str[NB_COMP]), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS },
{ "red", "set red points coordinates", OFFSET(comp_points_str[0]), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS },
{ "r", "set red points coordinates", OFFSET(comp_points_str[0]), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS },
{ "green", "set green points coordinates", OFFSET(comp_points_str[1]), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS },
{ "g", "set green points coordinates", OFFSET(comp_points_str[1]), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS },
{ "blue", "set blue points coordinates", OFFSET(comp_points_str[2]), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS },
{ "b", "set blue points coordinates", OFFSET(comp_points_str[2]), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS },
{ "all", "set points coordinates for all components", OFFSET(comp_points_str_all), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS },
{ "psfile", "set Photoshop curves file name", OFFSET(psfile), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS },
{ "plot", "save Gnuplot script of the curves in specified file", OFFSET(plot_filename), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define NB_COMP
Definition: vf_curves.c:44
#define FLAGS
Definition: vf_curves.c:83
#define OFFSET(x)
Definition: vf_curves.c:82
preset
Definition: vf_curves.c:46

Definition at line 84 of file vf_curves.c.

const char* r

Definition at line 114 of file vf_curves.c.

Referenced by add_bell(), add_hfyu_left_pred_bgr32_c(), aes_crypt(), alloc_frame_buffer(), av_inv_q(), av_make_q(), av_realloc_f(), av_rescale_rnd(), avcodec_default_execute(), avcodec_default_execute2(), avfilter_graph_request_oldest(), avfilter_graph_send_command(), avpriv_set_systematic_pal2(), avs_get_row_size_p(), bessel(), block_matching_multi(), bprint_color(), butterworth_bp_filter(), cache_read(), cdg_load_palette(), cdxl_decode_ham6(), cdxl_decode_ham8(), chebyshev1_bp_filter(), chebyshev2_bp_filter(), checkasm_check_nlmeans(), choose_rct_params(), cinepak_decode_codebook(), cng_decode_frame(), color_correlation(), color_decorrelation(), color_distance(), color_get(), color_hash(), compress_color(), compute_lpc_coefs(), config_input(), config_output(), config_props(), constrain_rgb(), convert_pd2zp(), convert_pr2zp(), convert_timestamp(), cqt_calc(), curves_init(), debug_accuracy(), decipher(), decode_argb(), decode_argbi(), decode_argx(), decode_argxi(), decode_block_coeffs_internal(), decode_byterun2(), decode_delta_j(), decode_frame(), decode_frame_header(), decode_hybrid(), decode_mvc2(), decode_pal(), decode_plte_chunk(), decode_raw_intra_rgb(), decode_refpass(), decode_rgb(), decode_rgb_frame_TMPL(), decode_rgbi(), decode_rgbx(), decode_rgbxi(), decode_rice(), decode_run_i(), decode_run_p(), decode_value3(), decompress_i(), decompress_i3(), decompress_p(), decompress_p3(), default_execute(), dither_int_to_float_triangular_c(), do_colorhold_slice(), draw_rectangle(), draw_spatial(), dshow_cycle_devices(), dshow_cycle_formats(), dshow_cycle_pins(), dshow_list_device_options(), dshow_open_device(), dshow_read_close(), dshow_read_header(), dump_spherical(), dv_read_seek(), dvbsub_init_decoder(), dvbsub_parse_clut_segment(), dx2_decode_slice_5x5(), encipher(), encode_dvb_subtitles(), encode_frame(), encode_rgb_frame_TMPL(), encode_scalar(), encode_thread(), eval_expr(), expand_script(), expand_tseq(), ff_alsa_extend_reorder_buf(), ff_els_decode_unsigned(), ff_get_qtpalette(), ff_gmc_c(), ff_jpegls_decode_picture(), ff_lag_rac_init(), ff_mjpeg_decode_frame(), ff_parse_time_base(), ff_rgb24toyv12_c(), ff_rtp_handler_iterate(), ff_rtp_send_h264_hevc(), ff_rtp_send_mpegvideo(), fft_end(), fill_in_tongue(), fill_picture_parameters(), fill_slice_long(), filter(), filter_frame(), filter_rgb24(), filter_rgb48(), filter_rgba(), filter_rgba64(), filter_slice16(), filter_slice8(), filter_slice_grey_edge(), filter_slice_packed(), filter_slice_planar(), find_ref_mvs(), flic_decode_frame_8BPP(), frac64(), frand(), gamma_convert(), gdv_decode_frame(), gdv_read_header(), gen_sub_bitmap(), generate_interval(), generate_intervals(), generate_joint_tables(), generate_plateau(), generate_transition(), get_avg_color(), get_dst_color_err(), get_high_utility_cell(), get_next_color(), get_palette_frame(), get_sr_golomb_shorten(), get_symbol2(), get_tree_codes(), gfmul(), guess_palette(), guess_status_pts(), h263_handle_packet(), hdcd_analyze_gen(), hpel_motion_search(), idcin_read_packet(), idct_col2(), idct_row(), import_palette(), init(), init_axis_color(), interpolate(), inv_cdf(), iterative_me(), jp2_find_codestream(), lex_char(), lex_time(), ls_decode_line(), magy_decode_slice(), magy_decode_slice10(), magy_encode_frame(), main(), make_cdt15_entry(), make_cdt16_entry(), make_cdt24_entry(), matroska_parse_laces(), mc_block(), mkv_parse_video_projection(), modplug_read_header(), mov_estimate_video_delay(), mov_read_sv3d(), mov_write_video_tag(), mp_yuv_to_rgb(), mpeg4_decode_sprite_trajectory(), mpegts_push_data(), mss2_blit_wmv9_template(), mss2_decode_frame(), MULH(), nlmeans_plane(), on2avc_apply_ms(), opt_list(), optimize_colors(), paf_video_decode(), parse_block_def(), parse_ifo_palette(), parse_options(), parse_palette(), parse_palette_segment(), parse_pixel_format(), parse_points(), parse_script(), parse_synth_channel(), parse_synth_def(), parse_time_sequence(), parse_timestamp(), pix_abs16x16_x2_mvi(), png_filter_row(), pop_integer(), pow_poly(), premult2straight(), print_pkt_side_data(), process_anticollapse(), process_ipmovie_chunk(), ps_stereo_interpolate_c(), ps_stereo_interpolate_ipdopd_c(), pulse_read_packet(), pulse_write_packet(), push_integer(), put_pixel(), put_symbol2(), qpel_motion_search(), rand64(), rd_frame(), read_data(), read_var_block_data(), read_whole_file(), refine_colors(), request_frame(), restore_rgb_planes10_c(), restore_rgb_planes_c(), rgb12to15(), rgb24_to_yuv420p(), rgb24to15_c(), rgb24to15_TMPL(), rgb24to16_c(), rgb24to16_TMPL(), rgb24tobgr15_c(), rgb24tobgr15_TMPL(), rgb24tobgr16_c(), rgb24tobgr16_TMPL(), rgb48Toxyz12(), rgb_to_yuv(), rgba2ycocg(), rgtc2_block_internal(), ring2_test(), rotate_tree(), roundToInt16(), rtmp_close(), rtmp_get_file_handle(), rtmp_open(), rtmp_read(), rtmp_read_pause(), rtmp_read_seek(), rtmp_write(), rtsp_read_packet(), run_postproc(), run_test(), rv30_decode_init(), rv40_decode_init(), sad_hpel_motion_search(), sbg_read_header(), sbg_read_probe(), sbr_hf_g_filt_c(), search_keyval(), set_frame(), set_palette(), slice_get_derivative(), smacker_decode_bigtree(), smacker_decode_tree(), smvjpeg_decode_init(), stereo_processing(), stereo_transform(), sub_left_prediction_bgr32(), sub_left_prediction_rgb24(), super2xsai(), swri_rematrix_init(), sws_scale(), test_stereo_interpolate(), tta_decode_frame(), tta_read_header(), uintpow(), update_palette_index(), vc2_encode_init(), vibrance_slice16(), vibrance_slice8(), vmd_decode(), vmdvideo_decode_init(), vp9_handle_packet(), vqa_decode_chunk(), wait_frame(), wavesynth_decode(), wavesynth_init(), xan_decode_frame(), xface_encode_frame(), xyz12Torgb48(), ycocg2rgba(), yuv2rgb_1_c_template(), yuv2rgb_2_c_template(), yuv2rgb_write(), yuv2rgb_write_full(), yuv2rgb_X_c_template(), yuv_a_to_rgba(), yuv_from_cqt(), and yuv_to_rgba().

const char* g

Definition at line 115 of file vf_curves.c.

Referenced by add_hfyu_left_pred_bgr32_c(), add_opt(), add_waves(), adjust_frame_information(), adpcm_decode_frame(), apply_dependent_coupling(), apply_dependent_coupling_fixed(), apply_intensity_stereo(), apply_mid_side_stereo(), asf_build_simple_index(), asf_read_ext_stream_properties(), asf_read_header(), asf_read_stream_properties(), avcodec_string(), avpriv_set_systematic_pal2(), bfi_decode_frame(), bgr24ToUV_c(), bgr24ToUV_half_c(), bgr24ToY_c(), bprint_color(), butterworth_bp_filter(), calc_thr_3gpp(), cdg_load_palette(), cdxl_decode_ham6(), cdxl_decode_ham8(), celt_renormalize_vector(), chebyshev2_bp_filter(), choose_rct_params(), cinepak_decode_codebook(), color_correlation(), color_decorrelation(), color_get(), color_hash(), compress_color(), config_input(), config_output(), constrain_rgb(), create_lut(), curves_init(), dct_quantize_refine(), debug_accuracy(), decode_adaptive45(), decode_adaptive6(), decode_argb(), decode_argbi(), decode_argx(), decode_argxi(), decode_band_types(), decode_cce(), decode_delta_j(), decode_frame(), decode_hybrid(), decode_mvc2(), decode_pal(), decode_plte_chunk(), decode_raw_intra_rgb(), decode_rgb(), decode_rgb_frame_TMPL(), decode_rgbi(), decode_rgbx(), decode_rgbxi(), decode_run_i(), decode_run_p(), decode_scalefactors(), decode_spectrum_and_dequant(), decode_value3(), decompress_i(), decompress_i3(), decompress_p(), decompress_p3(), detect_unknown_subobject(), do_colorhold_slice(), dvbsub_init_decoder(), dvbsub_parse_clut_segment(), dx2_decode_slice_5x5(), encode_dvb_subtitles(), encode_frame(), encode_rgb_frame_TMPL(), ff_aac_adjust_common_pred(), ff_aac_is_encoding_err(), ff_aac_search_for_is(), ff_aac_search_for_ltp(), ff_aac_search_for_tns(), ff_get_qtpalette(), ff_guidcmp(), ff_init_nextband_map(), ff_jpegls_decode_picture(), ff_mjpeg_decode_frame(), ff_rgb24toyv12_c(), fill_in_tongue(), filter_frame(), filter_rgb24(), filter_rgb48(), filter_rgba(), filter_rgba64(), filter_slice_packed(), filter_slice_planar(), find_best_vect(), find_guid(), finish_group(), flic_decode_frame_8BPP(), gamma_convert(), gbr24pToUV_half_c(), gdv_decode_frame(), gdv_read_header(), gen_sub_bitmap(), generate_joint_tables(), get_avg_color(), get_dst_color_err(), get_match_score(), get_next_color(), get_palette_frame(), gif_parse(), guess_palette(), idcin_read_packet(), import_palette(), incr_cntdec(), init(), init_axis_color(), jp2_find_codestream(), magy_decode_slice(), magy_decode_slice10(), magy_encode_frame(), main(), mangle_rgb_planes(), mark_pns(), mov_write_video_tag(), mp_decode_layer3(), mp_yuv_to_rgb(), open_files(), optimize_colors(), paf_video_decode(), parse_bit_alloc(), parse_chunks(), parse_exponents(), parse_ifo_palette(), parse_indices(), parse_mantissas(), parse_palette(), parse_palette_segment(), parse_pixel_format(), planar_rgb16_to_uv(), planar_rgb16_to_y(), planar_rgb_to_uv(), planar_rgb_to_y(), png_filter_row(), premult2straight(), process_ipmovie_chunk(), psy_3gpp_analyze_channel(), psy_3gpp_init(), put_pixel(), qdmc_decode_init(), quantize_band_cost_cached(), ra144_encode_subblock(), rd_frame(), refine_colors(), request_frame(), rescale_dec(), restore_rgb_planes10_c(), restore_rgb_planes_c(), rgb12to15(), rgb16_32ToUV_c_template(), rgb16_32ToUV_half_c_template(), rgb24_to_yuv420p(), rgb24to15_c(), rgb24to15_TMPL(), rgb24to16_c(), rgb24to16_TMPL(), rgb24tobgr15_c(), rgb24tobgr15_TMPL(), rgb24tobgr16_c(), rgb24tobgr16_TMPL(), rgb24ToUV_c(), rgb24ToUV_half_c(), rgb24ToY_c(), rgb48funcs(), rgb48ToUV_c_template(), rgb48ToUV_half_c_template(), rgb48Toxyz12(), rgb64funcs(), rgb64ToUV_c_template(), rgb64ToUV_half_c_template(), rgb64ToY_c_template(), rgb_to_yuv(), rgba2ycocg(), rgtc2_block_internal(), ripemd128_transform(), ripemd160_transform(), ripemd256_transform(), ripemd320_transform(), run_channel_fft(), run_postproc(), sbr_hf_gen(), search_for_ms(), search_for_pns(), search_for_quantizers_anmr(), search_for_quantizers_fast(), search_for_quantizers_twoloop(), set_frame(), set_palette(), set_special_band_scalefactors(), sha256_transform(), sha512_transform(), shuffle_bytes_0321_c(), shuffle_bytes_2103_c(), slice_get_derivative(), sub_left_prediction_bgr32(), sub_left_prediction_rgb24(), sws_scale(), transform(), transform_step(), update_model2_to_6(), update_model3_to_7(), update_model4_to_5(), update_model5_to_6(), update_palette_index(), vb_decode_framedata(), vibrance_slice16(), vibrance_slice8(), vmd_decode(), vmdvideo_decode_init(), vp9_handle_packet(), vqa_decode_chunk(), wait_frame(), write_stream_codec_info(), xan_decode_frame(), xyz12Torgb48(), ycocg2rgba(), yuv2rgb_1_c_template(), yuv2rgb_2_c_template(), yuv2rgb_write(), yuv2rgb_write_full(), yuv2rgb_X_c_template(), yuv_a_to_rgba(), yuv_from_cqt(), and yuv_to_rgba().

const char* b

Definition at line 116 of file vf_curves.c.

Referenced by curves_init(), filter_slice_packed(), filter_slice_planar(), and interpolate().

const char* master
const { ... } curves_presets[]
Initial value:
= {
"0.129/1 0.466/0.498 0.725/0",
"0.109/1 0.301/0.498 0.517/0",
"0.098/1 0.235/0.498 0.423/0",
},
"0/0 0.25/0.156 0.501/0.501 0.686/0.745 1/1",
"0/0 0.25/0.188 0.38/0.501 0.745/0.815 1/0.815",
"0/0 0.231/0.094 0.709/0.874 1/1",
},
[PRESET_DARKER] = { .master = "0/0 0.5/0.4 1/1" },
[PRESET_INCREASE_CONTRAST] = { .master = "0/0 0.149/0.066 0.831/0.905 0.905/0.98 1/1" },
[PRESET_LIGHTER] = { .master = "0/0 0.4/0.5 1/1" },
[PRESET_LINEAR_CONTRAST] = { .master = "0/0 0.305/0.286 0.694/0.713 1/1" },
[PRESET_MEDIUM_CONTRAST] = { .master = "0/0 0.286/0.219 0.639/0.643 1/1" },
[PRESET_NEGATIVE] = { .master = "0/1 1/0" },
[PRESET_STRONG_CONTRAST] = { .master = "0/0 0.301/0.196 0.592/0.6 0.686/0.737 1/1" },
"0/0.11 0.42/0.51 1/0.95",
"0/0 0.50/0.48 1/1",
"0/0.22 0.49/0.44 1/0.8",
}
}
const AVFilterPad curves_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
.config_props = config_input,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_curves.c:717
static int config_input(AVFilterLink *inlink)
Definition: vf_curves.c:650

Definition at line 755 of file vf_curves.c.

const AVFilterPad curves_outputs[]
static
Initial value:
= {
{
.name = "default",
},
{ NULL }
}
#define NULL
Definition: coverity.c:32

Definition at line 765 of file vf_curves.c.

AVFilter ff_vf_curves
Initial value:
= {
.name = "curves",
.description = NULL_IF_CONFIG_SMALL("Adjust components curves."),
.priv_size = sizeof(CurvesContext),
.priv_class = &curves_class,
}
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
Definition: avfilter.h:125
static av_cold int uninit(AVCodecContext *avctx)
Definition: crystalhd.c:279
static av_cold int curves_init(AVFilterContext *ctx)
Definition: vf_curves.c:470
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:116
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs
static const AVFilterPad curves_inputs[]
Definition: vf_curves.c:755
#define flags(name, subs,...)
Definition: cbs_av1.c:561
static int query_formats(AVFilterContext *ctx)
Definition: vf_curves.c:512
static av_cold void curves_uninit(AVFilterContext *ctx)
Definition: vf_curves.c:746
static const AVFilterPad curves_outputs[]
Definition: vf_curves.c:765

Definition at line 773 of file vf_curves.c.