|
FFmpeg
|
ColorMatrix 2.0 is based on the original ColorMatrix filter by Wilbert Dijkhof. More...
#include <float.h>#include "avfilter.h"#include "filters.h"#include "video.h"#include "libavutil/opt.h"#include "libavutil/pixdesc.h"Go to the source code of this file.
Data Structures | |
| struct | ColorMatrixContext |
| struct | ThreadData |
| Used for passing data between threads. More... | |
Macros | |
| #define | NS(n) |
| #define | CB(n) |
| #define | OFFSET(x) |
| #define | FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM |
| #define | ma m[0][0] |
| #define | mb m[0][1] |
| #define | mc m[0][2] |
| #define | md m[1][0] |
| #define | me m[1][1] |
| #define | mf m[1][2] |
| #define | mg m[2][0] |
| #define | mh m[2][1] |
| #define | mi m[2][2] |
| #define | ima im[0][0] |
| #define | imb im[0][1] |
| #define | imc im[0][2] |
| #define | imd im[1][0] |
| #define | ime im[1][1] |
| #define | imf im[1][2] |
| #define | img im[2][0] |
| #define | imh im[2][1] |
| #define | imi im[2][2] |
Enumerations | |
| enum | ColorMode { COLOR_MODE_NONE = -1 , COLOR_MODE_BT709 , COLOR_MODE_FCC , COLOR_MODE_BT601 , COLOR_MODE_SMPTE240M , COLOR_MODE_BT2020 , COLOR_MODE_COUNT } |
Functions | |
| AVFILTER_DEFINE_CLASS (colormatrix) | |
| static void | inverse3x3 (double im[3][3], double m[3][3]) |
| static void | solve_coefficients (double cm[3][3], double rgb[3][3], double yuv[3][3]) |
| static void | calc_coefficients (AVFilterContext *ctx) |
| static av_cold int | init (AVFilterContext *ctx) |
| static int | process_slice_uyvy422 (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) |
| static int | process_slice_yuv444p (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) |
| static int | process_slice_yuv422p (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) |
| static int | process_slice_yuv420p (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) |
| static int | config_input (AVFilterLink *inlink) |
| static int | filter_frame (AVFilterLink *link, AVFrame *in) |
Variables | |
| static const double | yuv_coeff_luma [5][3] |
| static const AVOption | colormatrix_options [] |
| static const char *const | color_modes [] = {"bt709", "fcc", "bt601", "smpte240m", "bt2020"} |
| static const AVFilterPad | colormatrix_inputs [] |
| const FFFilter | ff_vf_colormatrix |
ColorMatrix 2.0 is based on the original ColorMatrix filter by Wilbert Dijkhof.
It adds the ability to convert between any of: Rec.709, FCC, Rec.601, and SMPTE 240M. It also makes pre and post clipping optional, adds an option to use scaled or non-scaled coefficients, and more...
Definition in file vf_colormatrix.c.
| #define NS | ( | n | ) |
Definition at line 38 of file vf_colormatrix.c.
Referenced by calc_coefficients().
| #define CB | ( | n | ) |
Definition at line 39 of file vf_colormatrix.c.
Referenced by process_slice_uyvy422(), process_slice_yuv420p(), process_slice_yuv422p(), and process_slice_yuv444p().
| #define OFFSET | ( | x | ) |
Definition at line 79 of file vf_colormatrix.c.
| #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM |
Definition at line 80 of file vf_colormatrix.c.
| #define ma m[0][0] |
Definition at line 98 of file vf_colormatrix.c.
Referenced by checkasm_var_add(), checkasm_var_sub(), fill_whitepoint_conv_table(), inverse3x3(), mode01(), mode21(), mode22(), and unwrap().
| #define mb m[0][1] |
Definition at line 99 of file vf_colormatrix.c.
| #define mc m[0][2] |
Definition at line 100 of file vf_colormatrix.c.
Referenced by create_vorbis_context(), decode_cu_r(), decode_move(), inter_pred(), inverse3x3(), ivi_decode_coded_blocks(), ivi_mc(), mc_bi_scaled(), mc_chroma_scaled(), mc_chroma_unscaled(), mc_luma_scaled(), mc_luma_unscaled(), mov_read_seek(), pred_gpm_blk(), put_main_header(), and qt_rtp_parse_packet().
| #define md m[1][0] |
Definition at line 101 of file vf_colormatrix.c.
Referenced by ac3_sum_square_butterfly_float_c(), ac3_sum_square_butterfly_int32_c(), apv_decode_metadata(), cbs_apv_free_metadata(), config_input(), filter_frame(), gnutls_x509_fingerprint(), init_pic_params(), inverse3x3(), main(), mbedtls_x509_fingerprint(), uninit(), vaapi_encode_av1_init_picture_params(), and x509_fingerprint().
| #define me m[1][1] |
Definition at line 102 of file vf_colormatrix.c.
Referenced by inverse3x3(), merge_context_after_me(), and read_ts().
| #define mf m[1][2] |
Definition at line 103 of file vf_colormatrix.c.
Referenced by inverse3x3().
| #define mg m[2][0] |
Definition at line 104 of file vf_colormatrix.c.
Referenced by find_mca_link_id(), inverse3x3(), lininterp(), mxf_add_metadata_set(), mxf_get_sorted_table_segments(), mxf_handle_missing_index_segment(), mxf_parse_structural_metadata(), mxf_read_close(), and mxf_resolve_strong_ref().
| #define mh m[2][1] |
Definition at line 105 of file vf_colormatrix.c.
Referenced by av_file_map(), dwt_decode53(), dwt_decode97_float(), dwt_decode97_int(), dwt_encode53(), dwt_encode97_float(), dwt_encode97_int(), ff_mlp_read_major_sync(), inverse3x3(), mlp_parse(), read_major_sync(), and vulkan_encode_ffv1_init().
| #define mi m[2][2] |
Definition at line 106 of file vf_colormatrix.c.
Referenced by affine_merge_candidate(), affine_merge_const1(), affine_merge_const2(), affine_merge_const3(), affine_merge_const4(), affine_merge_const5(), affine_merge_const6(), affine_merge_const_candidates(), affine_merge_zero_motion(), bcw_idx_decode(), cu_get_max_y(), derive_cb_prof_flag_lx(), derive_dmvr_bdof_flag(), estimate_affine_2d(), ff_vvc_affine_mvp(), ff_vvc_mvp(), ff_vvc_store_mv(), ff_vvc_store_sb_mvs(), ff_vvc_update_hmvp(), init_subblock_params(), inter_data(), interpolate_pchip(), inverse3x3(), merge_data_ciip(), merge_data_ibc(), minimize_error(), mode01(), mode21(), mode22(), mvds_decode(), mvf_to_mi(), mvp_add_difference(), mvp_data(), mvp_data_ibc(), optimize_model(), pred_affine_blk(), pred_regular_blk(), sb_mv_merge_mode(), sb_temporal_merge_candidate(), store_cp_mv(), and unwrap().
| #define ima im[0][0] |
Definition at line 108 of file vf_colormatrix.c.
Referenced by adpcm_compress_trellis(), and inverse3x3().
| #define imb im[0][1] |
Definition at line 109 of file vf_colormatrix.c.
Referenced by inverse3x3().
| #define imc im[0][2] |
Definition at line 110 of file vf_colormatrix.c.
Referenced by inverse3x3().
| #define imd im[1][0] |
Definition at line 111 of file vf_colormatrix.c.
Referenced by inverse3x3().
| #define ime im[1][1] |
Definition at line 112 of file vf_colormatrix.c.
Referenced by inverse3x3().
| #define imf im[1][2] |
Definition at line 113 of file vf_colormatrix.c.
Referenced by inverse3x3(), and min_cb_tl_init().
| #define img im[2][0] |
Definition at line 114 of file vf_colormatrix.c.
Referenced by add_hdr_plus(), add_hdr_smpte2094_app5(), aom_decode(), aom_encode(), aomfmt_to_pixfmt(), apply_color_indexing_transform(), apply_color_transform(), apply_predictor_transform(), apply_subtract_green_transform(), codecctl_imgp(), color_cache_put(), decode_entropy_coded_image(), decode_entropy_image(), decode_metadata(), ff_aom_image_copy_16_to_8(), fill_frame_from_iplimage(), fill_iplimage_from_frame(), get_huffman_group(), image_ctx_free(), inverse3x3(), mj2_create_image(), parse_transform_color_indexing(), set_pix_fmt(), set_pix_fmt(), vpx_decode(), write_header(), write_muxed_file(), write_packet(), write_packet_pipe(), write_picture(), and xcbgrab_frame().
| #define imh im[2][1] |
Definition at line 115 of file vf_colormatrix.c.
Referenced by inverse3x3().
| #define imi im[2][2] |
Definition at line 116 of file vf_colormatrix.c.
Referenced by inverse3x3().
| enum ColorMode |
| Enumerator | |
|---|---|
| COLOR_MODE_NONE | |
| COLOR_MODE_BT709 | |
| COLOR_MODE_FCC | |
| COLOR_MODE_BT601 | |
| COLOR_MODE_SMPTE240M | |
| COLOR_MODE_BT2020 | |
| COLOR_MODE_COUNT | |
Definition at line 49 of file vf_colormatrix.c.
| AVFILTER_DEFINE_CLASS | ( | colormatrix | ) |
Definition at line 118 of file vf_colormatrix.c.
Referenced by calc_coefficients().
Definition at line 133 of file vf_colormatrix.c.
Referenced by calc_coefficients().
|
static |
Definition at line 141 of file vf_colormatrix.c.
Referenced by init().
|
static |
Definition at line 184 of file vf_colormatrix.c.
|
static |
Definition at line 203 of file vf_colormatrix.c.
Referenced by filter_frame().
|
static |
Definition at line 241 of file vf_colormatrix.c.
Referenced by filter_frame().
|
static |
Definition at line 288 of file vf_colormatrix.c.
Referenced by filter_frame().
|
static |
Definition at line 336 of file vf_colormatrix.c.
Referenced by filter_frame().
|
static |
Definition at line 390 of file vf_colormatrix.c.
|
static |
Definition at line 405 of file vf_colormatrix.c.
|
static |
Definition at line 41 of file vf_colormatrix.c.
Referenced by calc_coefficients().
|
static |
Definition at line 82 of file vf_colormatrix.c.
|
static |
Definition at line 182 of file vf_colormatrix.c.
Referenced by config_input().
|
static |
Definition at line 475 of file vf_colormatrix.c.
| const FFFilter ff_vf_colormatrix |
Definition at line 484 of file vf_colormatrix.c.