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/pixdesc.h"
#include "libavutil/avstring.h"
Go to the source code of this file.
Data Structures | |
struct | ColorMatrixContext |
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 | 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] |
Functions | |
static void | inverse3x3 (double im[3][3], const double m[3][3]) |
static void | solve_coefficients (double cm[3][3], double rgb[3][3], const double yuv[3][3]) |
static void | calc_coefficients (AVFilterContext *ctx) |
static int | get_color_mode_index (const char *name) |
static av_cold int | init (AVFilterContext *ctx, const char *args) |
static void | process_frame_uyvy422 (ColorMatrixContext *color, AVFilterBufferRef *dst, AVFilterBufferRef *src) |
static void | process_frame_yuv422p (ColorMatrixContext *color, AVFilterBufferRef *dst, AVFilterBufferRef *src) |
static void | process_frame_yuv420p (ColorMatrixContext *color, AVFilterBufferRef *dst, AVFilterBufferRef *src) |
static int | config_input (AVFilterLink *inlink) |
static int | query_formats (AVFilterContext *ctx) |
static int | filter_frame (AVFilterLink *link, AVFilterBufferRef *in) |
Variables | |
static const double | yuv_coeff [4][3][3] |
static const char * | color_modes [] = {"bt709", "FCC", "bt601", "smpte240m"} |
static const AVFilterPad | colormatrix_inputs [] |
static const AVFilterPad | colormatrix_outputs [] |
AVFilter | avfilter_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 | ) | n < 0 ? (int)(n*65536.0-0.5+DBL_EPSILON) : (int)(n*65536.0+0.5) |
Definition at line 39 of file vf_colormatrix.c.
Referenced by calc_coefficients().
#define CB | ( | n | ) | av_clip_uint8(n) |
Definition at line 40 of file vf_colormatrix.c.
Referenced by process_frame_uyvy422(), process_frame_yuv420p(), and process_frame_yuv422p().
#define ma m[0][0] |
Definition at line 66 of file vf_colormatrix.c.
Referenced by inverse3x3().
#define mb m[0][1] |
Definition at line 67 of file vf_colormatrix.c.
Referenced by config_props(), decode_mb_info(), dnxhd_calc_bits_thread(), dnxhd_encode_fast(), dnxhd_encode_rdo(), dnxhd_encode_thread(), dnxhd_mb_var_thread(), dnxhd_setup_threads_slices(), draw_mandelbrot(), dv_decode_video_segment(), dv_encode_video_segment(), encode_frame(), escape124_decode_frame(), ff_h264_decode_mb_cabac(), ff_h264_decode_mb_cavlc(), ff_h264_find_frame_end(), fill_from_cache(), find_quant_thread(), init(), inverse3x3(), ivi_decode_blocks(), ivi_process_empty_tile(), main(), mpc7_decode_frame(), request_frame(), tm2_read_deltas(), uninit(), vp8_decode_mb_row_no_filter(), vp8_decode_mv_mb_modes(), and vp8_filter_mb_row().
#define mc m[0][2] |
Definition at line 68 of file vf_colormatrix.c.
Referenced by create_vorbis_context(), inverse3x3(), put_main_header(), and qt_rtp_parse_packet().
#define md m[1][0] |
Definition at line 69 of file vf_colormatrix.c.
Referenced by ac3_sum_square_butterfly_float_c(), ac3_sum_square_butterfly_int32_c(), ff_brktimegm(), and inverse3x3().
#define me m[1][1] |
Definition at line 70 of file vf_colormatrix.c.
Referenced by backup_duplicate_context(), diff_planes(), inverse3x3(), merge_context_after_me(), and read_ts().
#define mf m[1][2] |
Definition at line 71 of file vf_colormatrix.c.
Referenced by inverse3x3().
#define mg m[2][0] |
Definition at line 72 of file vf_colormatrix.c.
Referenced by inverse3x3().
#define mh m[2][1] |
Definition at line 73 of file vf_colormatrix.c.
Referenced by av_file_map(), dwt_decode53(), dwt_decode97(), dwt_encode53(), dwt_encode97(), inverse3x3(), mlp_parse(), and read_major_sync().
#define mi m[2][2] |
Definition at line 74 of file vf_colormatrix.c.
Referenced by inverse3x3().
#define ima im[0][0] |
Definition at line 76 of file vf_colormatrix.c.
Referenced by adpcm_compress_trellis(), and inverse3x3().
#define imb im[0][1] |
Definition at line 77 of file vf_colormatrix.c.
Referenced by inverse3x3().
#define imc im[0][2] |
Definition at line 78 of file vf_colormatrix.c.
Referenced by avcodec_register_all(), and inverse3x3().
#define imd im[1][0] |
Definition at line 79 of file vf_colormatrix.c.
Referenced by inverse3x3().
#define ime im[1][1] |
Definition at line 80 of file vf_colormatrix.c.
Referenced by inverse3x3().
#define imf im[1][2] |
Definition at line 81 of file vf_colormatrix.c.
Referenced by inverse3x3().
#define img im[2][0] |
Definition at line 82 of file vf_colormatrix.c.
Referenced by altivec_uyvy_rgb32(), inverse3x3(), mj2_create_image(), vp8_decode(), write_header(), and write_packet().
#define imh im[2][1] |
Definition at line 83 of file vf_colormatrix.c.
Referenced by inverse3x3().
#define imi im[2][2] |
Definition at line 84 of file vf_colormatrix.c.
Referenced by inverse3x3().
|
static |
Definition at line 86 of file vf_colormatrix.c.
Referenced by calc_coefficients().
|
static |
Definition at line 101 of file vf_colormatrix.c.
Referenced by calc_coefficients().
|
static |
Definition at line 109 of file vf_colormatrix.c.
Referenced by init().
|
static |
Definition at line 138 of file vf_colormatrix.c.
Referenced by init().
|
static |
Definition at line 148 of file vf_colormatrix.c.
|
static |
Definition at line 185 of file vf_colormatrix.c.
Referenced by filter_frame().
|
static |
Definition at line 217 of file vf_colormatrix.c.
Referenced by filter_frame().
|
static |
Definition at line 259 of file vf_colormatrix.c.
Referenced by filter_frame().
|
static |
Definition at line 307 of file vf_colormatrix.c.
|
static |
Definition at line 321 of file vf_colormatrix.c.
|
static |
Definition at line 335 of file vf_colormatrix.c.
|
static |
Definition at line 42 of file vf_colormatrix.c.
Referenced by calc_coefficients().
|
static |
Definition at line 136 of file vf_colormatrix.c.
Referenced by get_color_mode_index().
|
static |
Definition at line 360 of file vf_colormatrix.c.
|
static |
Definition at line 371 of file vf_colormatrix.c.
AVFilter avfilter_vf_colormatrix |
Definition at line 379 of file vf_colormatrix.c.