FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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
 

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_uint16(v))
 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 config_input (AVFilterLink *inlink)
 
static int filter_slice (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
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().

#define G   1

Definition at line 35 of file vf_curves.c.

Referenced by filter_slice().

#define B   2

Definition at line 36 of file vf_curves.c.

Referenced by filter_slice().

#define A   3

Definition at line 37 of file vf_curves.c.

Referenced by filter_slice().

#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 79 of file vf_curves.c.

Definition at line 80 of file vf_curves.c.

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

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 212 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); \
}
return
static int interpolate(void *log_ctx, uint16_t *y, const struct keypoint *points, int nbits)
Definition: vf_curves.c:214

Definition at line 336 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:101
void * buf
Definition: avisynth_c.h:690
if(ret< 0)
Definition: vf_mcdeint.c:282

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)
#define AVERROR(e)
Definition: error.h:43
return
int n
Definition: avisynth_c.h:684
char * av_strdup(const char *s)
Duplicate a string.
Definition: mem.c:237
static const struct @179 curves_presets[]
static int64_t pts
Global timestamp for the audio frames.
if(ret< 0)
Definition: vf_mcdeint.c:282

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 140 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 152 of file vf_curves.c.

Referenced by config_input().

static int get_nb_points ( const struct keypoint d)
static

Definition at line 196 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 214 of file vf_curves.c.

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

Definition at line 346 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 402 of file vf_curves.c.

Referenced by config_input().

static av_cold int curves_init ( AVFilterContext ctx)
static

Definition at line 463 of file vf_curves.c.

static int query_formats ( AVFilterContext ctx)
static

Definition at line 505 of file vf_curves.c.

static int config_input ( AVFilterLink inlink)
static

Definition at line 523 of file vf_curves.c.

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

Definition at line 582 of file vf_curves.c.

Referenced by filter_frame().

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 630 of file vf_curves.c.

static av_cold void curves_uninit ( AVFilterContext ctx)
static

Definition at line 658 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:80
#define OFFSET(x)
Definition: vf_curves.c:79
preset
Definition: vf_curves.c:46

Definition at line 81 of file vf_curves.c.

const char* r

Definition at line 111 of file vf_curves.c.

Referenced by ac3_5p1_mux(), 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(), butterworth_bp_filter(), cache_read(), cdg_load_palette(), cdxl_decode_ham6(), cdxl_decode_ham8(), chebyshev1_bp_filter(), chebyshev2_bp_filter(), 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_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_refpass(), decode_rgb(), decode_rgb_frame_TMPL(), decode_rgbi(), decode_rgbx(), decode_rgbxi(), decode_rice(), decompress_i(), decompress_p(), default_execute(), dither_int_to_float_triangular_c(), draw_rectangle(), 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_send_h264_hevc(), ff_rtp_send_mpegvideo(), fill_in_tongue(), fill_picture_parameters(), fill_slice_long(), filter(), filter_frame(), filter_rgb24(), filter_rgb48(), filter_rgba(), filter_rgba64(), filter_slice(), filter_slice16(), filter_slice8(), find_ref_mvs(), flic_decode_frame_8BPP(), frac64(), frand(), gamma_convert(), gen_image(), 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_strl(), get_symbol2(), get_tree_codes(), gfmul(), guess_palette(), 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(), lag_decode_frame(), lex_char(), lex_time(), ls_decode_line(), magy_decode_slice(), magy_decode_slice10(), main(), make_cdt15_entry(), make_cdt16_entry(), make_cdt24_entry(), matroska_parse_laces(), mc_block(), mkv_parse_video_projection(), modplug_read_header(), 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(), mul32(), MULH(), nlmeans_plane(), on2avc_apply_ms(), opt_list(), optimize_colors(), paf_video_decode(), parse_3dl(), parse_block_def(), parse_ifo_palette(), parse_options(), parse_palette(), parse_palette_segment(), parse_pixel_format(), 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(), qtrle_decode_24bpp(), rand64(), rd_frame(), read_var_block_data(), read_whole_file(), refine_colors(), request_frame(), restore_rgb_planes(), restore_rgb_planes10(), 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(), smacker_decode_bigtree(), smacker_decode_tree(), smvjpeg_decode_init(), stereo_processing(), sub_left_prediction_bgr32(), sub_left_prediction_rgb24(), super2xsai(), surround_to_stereo(), swri_rematrix_init(), sws_scale(), tta_decode_frame(), tta_read_header(), uintpow(), update_palette_index(), vmd_decode(), vmdvideo_decode_init(), vp9_handle_packet(), vqa_decode_chunk(), 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 112 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(), 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_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_rgb(), decode_rgb_frame_TMPL(), decode_rgbi(), decode_rgbx(), decode_rgbxi(), decode_scalefactors(), decode_spectrum_and_dequant(), decompress_i(), decompress_p(), detect_unknown_subobject(), 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_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(), find_best_vect(), find_guid(), finish_group(), flic_decode_frame_8BPP(), gamma_convert(), gbr24pToUV_half_c(), gen_image(), gen_sub_bitmap(), generate_joint_tables(), get_avg_color(), get_dst_color_err(), get_match_score(), get_next_color(), get_palette_frame(), guess_palette(), idcin_read_packet(), import_palette(), init(), init_axis_color(), jp2_find_codestream(), lag_decode_frame(), magy_decode_slice(), magy_decode_slice10(), 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_3dl(), parse_chunks(), parse_ifo_palette(), 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(), qtrle_decode_24bpp(), quantize_band_cost_cached(), ra144_encode_subblock(), rd_frame(), refine_colors(), restore_rgb_planes(), restore_rgb_planes10(), 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_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(), shuffle_bytes_2103_TMPL(), sub_left_prediction_bgr32(), sub_left_prediction_rgb24(), sws_scale(), transform_step(), update_palette_index(), vb_decode_framedata(), vmd_decode(), vmdvideo_decode_init(), vp9_handle_packet(), vqa_decode_chunk(), 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 113 of file vf_curves.c.

Referenced by add_bytes_c(), add_bytes_l2_c(), add_cb(), add_hfyu_left_pred_bgr32_c(), add_int16_c(), alias_pix_read_probe(), apng_find_chunk(), ARRAY_RENAME(), av_add_q(), av_add_sf(), av_compare_mod(), av_compare_ts(), av_gcd(), av_mlfg_get(), av_mul_q(), av_nearer_q(), av_rescale_delta(), av_rescale_q_rnd(), av_rescale_rnd(), av_size_mult(), avg2(), avg2_no_rnd(), avio_w8(), avpriv_set_systematic_pal2(), avpriv_trc_arib_std_b67(), avpriv_trc_bt1361(), avpriv_trc_bt709(), avpriv_trc_iec61966_2_1(), avpriv_trc_iec61966_2_4(), avpriv_trc_smpte240M(), bidir_refine(), binkb_read_bundle(), blur_power(), bmp_probe(), body(), buffer_replace(), build_canonical_huff(), build_huffman(), bval2bmax(), calculate_visual_weight(), can_merge_formats(), cdata_probe(), cdg_load_palette(), cdxl_decode_ham6(), cdxl_decode_ham8(), celt_apply_preemph_filter(), celt_decode_bands(), celt_frame_mdct(), celt_frame_setup_input(), celt_quant_bands(), chebyshev1_bp_filter(), chebyshev2_bp_filter(), choose_rct_params(), chs_assemble_msbs_lsbs(), chs_clear_band_data(), chs_filter_band_data(), chs_parse_band_data(), chs_parse_header(), cin_decode_huffman(), cinepak_decode_codebook(), cmp(), cmp_color(), cmp_func_names(), cmp_intervals(), cmp_pkt_sub_pos_ts(), cmp_pkt_sub_ts_pos(), color_correlation(), color_decorrelation(), color_hash(), compare_codec_desc(), compare_vlcspec(), compress_color(), compute_bit_allocation(), compute_lpc_coefs(), compute_metric(), compute_mod(), config_output(), constrain_rgb(), count_hq_slice(), cqt_calc(), create_luma_lut(), cubic_interpolate_func(), curves_init(), dds_probe(), debug_accuracy(), decode_555(), decode_argb(), decode_argbi(), decode_argx(), decode_argxi(), decode_audio_s16(), decode_block_coeffs_internal(), decode_blocks(), decode_blocks_ind(), decode_coeffs(), decode_component(), decode_delta_j(), decode_frame(), decode_gain_control(), decode_hybrid(), decode_init(), decode_mode(), decode_pal(), decode_plte_chunk(), decode_predictor_coeffs(), decode_rgb(), decode_rgb_frame_TMPL(), decode_rgbi(), decode_rgbx(), decode_rgbxi(), decode_rle(), decode_sb_mem(), decode_scale_factors(), decode_spectrum_and_dequant(), decode_subband_golomb(), decode_subframe(), decode_subframe_fixed(), decode_tonal_components(), decompress_i(), decompress_p(), decorrelate(), decorrelate_ls(), decorrelate_sf(), decorrelate_sm(), decorrelate_sr(), decorrelate_stereo(), decorrelation(), deInterlaceBlendLinear_TMPL(), deInterlaceInterpolateLinear_TMPL(), deInterlaceMedian_TMPL(), diff_bytes_c(), diff_int16_c(), dpx_probe(), dump_spherical(), dv_encode_video_segment(), dv_guess_qnos(), dvbsub_init_decoder(), dvbsub_parse_clut_segment(), dwt_plane(), dx2_decode_slice_5x5(), encode_all_blocks(), encode_dvb_subtitles(), encode_frame(), encode_init(), encode_picture(), encode_q_branch2(), encode_residual_fixed(), encode_rgb_frame_TMPL(), encode_superframe(), evaluate_parameters(), exr_probe(), extract_line(), ff_add_png_paeth_prediction(), ff_adx_calculate_coeffs(), ff_avg_pixels4_xy2_8_mmi(), ff_avg_pixels8_xy2_8_mmi(), ff_celp_lp_synthesis_filterf(), ff_celt_decode_band(), ff_celt_encode_band(), ff_dirac_golomb_read_16bit(), ff_dirac_golomb_read_32bit(), ff_dsd2pcm_translate(), ff_eac3_decode_transform_coeffs_aht_ch(), ff_eval_refl(), ff_framequeue_add(), ff_framequeue_peek(), ff_framequeue_skip_samples(), ff_framequeue_take(), ff_generate_window_func(), ff_get_qtpalette(), ff_h264_chroma_dc_dequant_idct(), ff_h264_chroma_dc_dequant_idct_8_mmi(), ff_h264_filter_mb(), ff_index_search_timestamp(), ff_interp(), ff_ivi_decode_frame(), ff_ivi_init_planes(), ff_ivi_init_tiles(), ff_jpeg2000_ceildiv(), ff_jpeg2000_ceildivpow2(), ff_jpeg2000_dwt_init(), ff_jpegls_decode_picture(), ff_lpc_calc_ref_coefs_f(), ff_match_2uint16(), ff_merge_channel_layouts(), ff_merge_samplerates(), ff_mjpeg_decode_frame(), ff_mjpeg_find_marker(), ff_mpeg4_pred_dc(), ff_msmpeg4_coded_block_pred(), ff_msmpeg4_pred_dc(), ff_nut_sp_pos_cmp(), ff_nut_sp_pts_cmp(), ff_opus_rc_enc_uint_step(), ff_ps_read_data(), ff_put_no_rnd_pixels8_xy2_8_mmi(), ff_put_pixels4_xy2_8_mmi(), ff_put_pixels8_xy2_8_mmi(), ff_put_vp8_bilinear16_h_mmi(), ff_put_vp8_bilinear16_hv_mmi(), ff_put_vp8_bilinear4_h_mmi(), ff_put_vp8_bilinear4_hv_mmi(), ff_put_vp8_bilinear8_h_mmi(), ff_put_vp8_bilinear8_hv_mmi(), ff_rgb24toyv12_c(), ff_rms(), ff_snow_common_end(), ff_snow_common_init_after_header(), ff_sqrt(), ff_sws_alphablendaway(), ff_u8_to_s8(), ff_ut10_huff_cmp_len(), ff_ut_huff_cmp_len(), ff_vc1_h_overlap_mmi(), ff_vc1_h_s_overlap_mmi(), ff_vc1_pred_dc(), ff_vc1_v_overlap_mmi(), ff_vc1_v_s_overlap_mmi(), ff_vp9_decode_block(), ff_vp9_fill_mv(), ff_wma_init(), ffat_compare_channel_descriptions(), fft(), fill24(), fill_in_tongue(), filter_frame(), filter_mb_edgech(), filter_mb_edgecv(), filter_mb_edgeh(), filter_mb_edgev(), filter_mb_mbaff_edgecv(), filter_mb_mbaff_edgev(), filter_rgb24(), filter_rgb48(), filter_rgba(), filter_rgba64(), filter_slice(), find_ref_mvs(), flac_decorrelate_ls_c(), flac_decorrelate_ms_c(), flac_decorrelate_rs_c(), flic_decode_frame_8BPP(), float_near_ulp(), for(), frac64(), gamma_convert(), gen_image(), gen_sub_bitmap(), generate_fake_vps(), generate_joint_tables(), get_4block_rd(), get_avg_color(), get_block_bits(), get_block_sizes(), get_dc(), get_default_pattern_localtime_fmt(), get_dst_color_err(), get_integral_patch_value(), get_matching_parameters(), get_next_color(), get_palette_frame(), get_shift(), gfmul(), global_mv(), glyph_cmp(), gsm_probe(), guess_palette(), h264_filter_mb_fast_internal(), h_block_filter(), handle_p_frame_apng(), hls_write_header(), horizontal_compose_daub97i_TMPL(), horizontal_compose_dd137i_TMPL(), horizontal_compose_dd97i_TMPL(), horizontal_compose_dirac53i_TMPL(), horizontal_compose_fidelityi_TMPL(), horizontal_compose_haar0i_TMPL(), horizontal_compose_haar1i_TMPL(), horizontal_compose_haari_TMPL(), horizX1Filter(), hpel_motion_search(), huff_cmp(), huff_cmp_len(), huff_cmp_len10(), huff_cmp_sym(), id3v2_parse(), idcin_read_packet(), import_palette(), init(), init_axis_color(), init_blocks(), init_planes(), int_sqrt(), inter_pred(), inter_recon(), interleave(), interpol(), interpolate(), intra_recon(), inv_cdf(), invert_step(), ipmovie_probe(), iterative_me(), ivi_free_buffers(), j2k_probe(), jp2_find_codestream(), jpeg_probe(), jpegls_probe(), k12(), k13(), k23(), k24(), k34(), k35(), k44(), k45(), lag_decode_frame(), lbr_bank_c(), lfe_fir_fixed_c(), lfe_fir_float_c(), lfe_x96_fixed_c(), lfe_x96_float_c(), linear(), loco_predict(), log16(), magy_decode_slice(), magy_decode_slice10(), main(), make_cdt15_entry(), make_cdt16_entry(), make_cdt24_entry(), map_idx_10_to_20(), mark_all_blocks(), matroska_parse_tracks(), mc_block(), mid_pred(), mix_core(), mkv_parse_video_projection(), mkv_write_video_projection(), mov_read_sv3d(), mov_write_video_tag(), mp_decode_layer2(), mp_yuv_to_rgb(), mpegts_write_section(), mul_poly(), multiswap_dec(), multiswap_enc(), mxf_read_sync(), next_byte(), no_rnd_avg32(), no_rnd_avg64(), on2avc_apply_ms(), on2avc_decode_band_scales(), on2avc_read_channel_data(), on2avc_read_ms_info(), optimize_colors(), opus_rc_enc_update(), output_audio_block(), paf_video_decode(), parse_3dl(), parse_ifo_palette(), parse_palette(), parse_palette_segment(), parse_pixel_format(), pcx_probe(), pictor_probe(), png_filter_row(), png_get_interlaced_row(), png_probe(), png_put_interlaced_row(), pnm_magic_check(), pnm_probe(), pow_m1_4(), pred16x16_vertical(), pred8x16_plane(), pred8x16_vertical(), pred8x8_plane(), pred8x8_vertical(), pred8x8l_vertical(), pred_spatial_direct_motion(), premult2straight(), print_audio_bytes(), print_pkt_side_data(), probe(), process_ipmovie_chunk(), prompeg_create_bitstring(), prompeg_write_fec(), psd_probe(), pullup_lock_buffer(), put_no_rnd_pixels_l2(), put_pixel(), qdmc_decode_init(), qdraw_probe(), qpel_motion_search(), qsort_comparison_function_int16(), qtrle_decode_24bpp(), ratecontrol_1pass(), rd_frame(), read16(), read32(), read_close(), read_frame_data(), read_header(), read_high_coeffs(), read_highpass(), read_line(), read_low_coeffs(), read_packet(), read_seek(), read_var_block_data(), read_xing_toc(), refine_colors(), render_charset(), resample_cubic(), restore_rgb_planes(), restore_rgb_planes10(), resync(), 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(), ripemd128_transform(), ripemd160_transform(), ripemd256_transform(), ripemd320_transform(), rnd_avg32(), rnd_avg64(), run_postproc(), run_psnr(), sad_hpel_motion_search(), search_for_quantizers_fast(), search_for_quantizers_twoloop(), seq_decode_op1(), set_frame(), set_palette(), set_string_binary(), sgi_probe(), sha1_transform(), sha256_transform(), sha512_transform(), shift(), silk_decode_excitation(), spatial_compose_daub97i_dy_TMPL(), spatial_compose_dd137i_dy_TMPL(), spatial_compose_dd97i_dy_TMPL(), spatial_compose_dirac53i_dy_TMPL(), spatial_compose_fidelity_TMPL(), ssim_4x4x2_core(), ssim_4x4xn_16bit(), ssim_4x4xn_8bit(), stereo_processing(), sub_left_prediction_bgr32(), sub_left_prediction_rgb24(), sub_png_paeth_prediction(), subband_coeffs(), sum_bits(), sunrast_probe(), sws_scale(), synth_filter_fixed(), synth_filter_fixed_64(), synth_filter_float(), synth_filter_float_64(), t15(), t27(), t37(), tgq_calculate_qtable(), tiff_probe(), transform_step(), try_8x8basis_c(), uintpow(), uninit(), update_palette_index(), upsample_plane_c(), v_block_filter(), vb_decode_framedata(), vc1_coded_block_pred(), vc1_h_overlap_c(), vc1_h_s_overlap_c(), vc1_i_pred_dc(), vc1_parse(), vc1_v_overlap_c(), vc1_v_s_overlap_c(), vc2_encode_init(), vertX1Filter_TMPL(), video_audio_display(), vmd_decode(), vmdvideo_decode_init(), vp56_add_predictors_dc(), vp56_conceal_mv(), vp56_decode_4mv(), vp56_decode_mv(), vp56_mc(), vp56_render_mb(), vp5_parse_coeff(), vp6_build_huff_tree(), vp6_huff_cmp(), vp6_parse_coeff(), vp6_parse_coeff_huffman(), vqa_decode_chunk(), webp_probe(), wma_lsp_to_curve_init(), write_all_blocks(), x8_get_prediction(), xface_decode_frame(), xface_encode_frame(), xpm_probe(), xyz12Torgb48(), yae_load_data(), yae_load_frag(), yae_overlap_add(), 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* master

Definition at line 114 of file vf_curves.c.

Referenced by curves_init(), and revert_channel_correlation().

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:630
static int config_input(AVFilterLink *inlink)
Definition: vf_curves.c:523

Definition at line 667 of file vf_curves.c.

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

Definition at line 677 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:287
static av_cold int curves_init(AVFilterContext *ctx)
Definition: vf_curves.c:463
static int flags
Definition: log.c:57
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:179
#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_afftfilt.c:386
static const AVFilterPad inputs[]
Definition: af_afftfilt.c:376
static const AVFilterPad curves_inputs[]
Definition: vf_curves.c:667
static int query_formats(AVFilterContext *ctx)
Definition: vf_curves.c:505
static av_cold void curves_uninit(AVFilterContext *ctx)
Definition: vf_curves.c:658
static const AVFilterPad curves_outputs[]
Definition: vf_curves.c:677

Definition at line 685 of file vf_curves.c.