FFmpeg
|
ColorMatrix 2.0 is based on the original ColorMatrix filter by Wilbert Dijkhof. More...
#include <float.h>
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "video.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "libavutil/avstring.h"
Go to the source code of this file.
Data Structures | |
struct | ColorMatrixContext |
struct | ThreadData |
Macros | |
#define | NS(n) ((n) < 0 ? (int)((n)*65536.0-0.5+DBL_EPSILON) : (int)((n)*65536.0+0.5)) |
#define | CB(n) av_clip_uint8(n) |
#define | OFFSET(x) offsetof(ColorMatrixContext, 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 { CHANNEL, INTENSITY, RAINBOW, MORELAND, NEBULAE, FIRE, FIERY, FRUIT, COOL, NB_CLMODES, 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 | query_formats (AVFilterContext *ctx) |
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 [] |
static const AVFilterPad | colormatrix_outputs [] |
AVFilter | 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.
Definition at line 40 of file vf_colormatrix.c.
Referenced by calc_coefficients().
Definition at line 41 of file vf_colormatrix.c.
Referenced by process_slice_uyvy422(), process_slice_yuv420p(), process_slice_yuv422p(), and process_slice_yuv444p().
#define OFFSET | ( | x | ) | offsetof(ColorMatrixContext, x) |
Definition at line 81 of file vf_colormatrix.c.
#define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM |
Definition at line 82 of file vf_colormatrix.c.
#define ma m[0][0] |
Definition at line 100 of file vf_colormatrix.c.
Referenced by fill_whitepoint_conv_table(), inverse3x3(), mode01(), mode21(), and mode22().
#define mb m[0][1] |
Definition at line 101 of file vf_colormatrix.c.
Referenced by aic_decode_coeffs(), aic_decode_slice(), calculate_mode_score(), decode_mb_info(), decode_mb_row_no_filter(), dnxhd_calc_bits_thread(), dnxhd_encode_fast(), dnxhd_encode_rdo(), dnxhd_encode_thread(), dnxhd_mb_var_thread(), dnxhd_setup_threads_slices(), dv_decode_video_segment(), dv_encode_video_segment(), encode_frame(), encode_mode(), escape124_decode_frame(), ff_h264_decode_mb_cabac(), ff_h264_decode_mb_cavlc(), filter_mb_row(), find_quant_thread(), h264_find_frame_end(), inverse3x3(), ivi_decode_blocks(), ivi_process_empty_tile(), main(), mpc7_decode_frame(), parse_value(), quantize(), search_for_quantizers_twoloop(), tm2_read_deltas(), and vp78_decode_mv_mb_modes().
#define mc m[0][2] |
Definition at line 102 of file vf_colormatrix.c.
Referenced by create_vorbis_context(), inter_pred(), inverse3x3(), ivi_mc(), mc_chroma_scaled(), mc_chroma_unscaled(), mc_luma_scaled(), mc_luma_unscaled(), mov_read_seek(), put_main_header(), and qt_rtp_parse_packet().
#define md m[1][0] |
Definition at line 103 of file vf_colormatrix.c.
Referenced by ac3_sum_square_butterfly_float_c(), ac3_sum_square_butterfly_int32_c(), config_input(), filter_frame(), inverse3x3(), and uninit().
#define me m[1][1] |
Definition at line 104 of file vf_colormatrix.c.
Referenced by backup_duplicate_context(), inverse3x3(), merge_context_after_me(), and read_ts().
#define mf m[1][2] |
Definition at line 105 of file vf_colormatrix.c.
Referenced by inverse3x3().
#define mg m[2][0] |
Definition at line 106 of file vf_colormatrix.c.
Referenced by inverse3x3().
#define mh m[2][1] |
Definition at line 107 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(), inverse3x3(), mlp_parse(), and read_major_sync().
#define mi m[2][2] |
Definition at line 108 of file vf_colormatrix.c.
Referenced by inverse3x3(), mode01(), mode21(), and mode22().
#define ima im[0][0] |
Definition at line 110 of file vf_colormatrix.c.
Referenced by adpcm_compress_trellis(), and inverse3x3().
#define imb im[0][1] |
Definition at line 111 of file vf_colormatrix.c.
Referenced by inverse3x3().
#define imc im[0][2] |
Definition at line 112 of file vf_colormatrix.c.
Referenced by avcodec_register_all(), and inverse3x3().
#define imd im[1][0] |
Definition at line 113 of file vf_colormatrix.c.
Referenced by inverse3x3().
#define ime im[1][1] |
Definition at line 114 of file vf_colormatrix.c.
Referenced by inverse3x3().
#define imf im[1][2] |
Definition at line 115 of file vf_colormatrix.c.
Referenced by inverse3x3().
#define img im[2][0] |
Definition at line 116 of file vf_colormatrix.c.
Referenced by apply_color_indexing_transform(), apply_color_transform(), apply_predictor_transform(), apply_subtract_green_transform(), decode_entropy_coded_image(), decode_entropy_image(), decode_packet(), inverse3x3(), mj2_create_image(), parse_transform_color_indexing(), setup_shm(), vp8_decode(), write_header(), write_packet(), write_picture(), and xcbgrab_frame().
#define imh im[2][1] |
Definition at line 117 of file vf_colormatrix.c.
Referenced by inverse3x3().
#define imi im[2][2] |
Definition at line 118 of file vf_colormatrix.c.
Referenced by inverse3x3().
enum ColorMode |
Definition at line 51 of file vf_colormatrix.c.
AVFILTER_DEFINE_CLASS | ( | colormatrix | ) |
|
static |
Definition at line 120 of file vf_colormatrix.c.
Referenced by calc_coefficients().
|
static |
Definition at line 135 of file vf_colormatrix.c.
Referenced by calc_coefficients().
|
static |
Definition at line 143 of file vf_colormatrix.c.
Referenced by init().
|
static |
Definition at line 186 of file vf_colormatrix.c.
|
static |
Definition at line 205 of file vf_colormatrix.c.
Referenced by filter_frame().
|
static |
Definition at line 243 of file vf_colormatrix.c.
Referenced by filter_frame().
|
static |
Definition at line 290 of file vf_colormatrix.c.
Referenced by filter_frame().
|
static |
Definition at line 338 of file vf_colormatrix.c.
Referenced by filter_frame().
|
static |
Definition at line 392 of file vf_colormatrix.c.
|
static |
Definition at line 407 of file vf_colormatrix.c.
|
static |
Definition at line 422 of file vf_colormatrix.c.
|
static |
Definition at line 43 of file vf_colormatrix.c.
Referenced by calc_coefficients().
|
static |
Definition at line 84 of file vf_colormatrix.c.
|
static |
Definition at line 184 of file vf_colormatrix.c.
Referenced by config_input().
|
static |
Definition at line 492 of file vf_colormatrix.c.
|
static |
Definition at line 502 of file vf_colormatrix.c.
AVFilter ff_vf_colormatrix |
Definition at line 510 of file vf_colormatrix.c.