|
FFmpeg
|
#include <stdlib.h>#include <math.h>#include "attributes.h"#include "csp.h"#include "pixfmt.h"#include "rational.h"Go to the source code of this file.
Macros | |
| #define | AVR(d) |
| #define | WP_D65 { AVR(0.3127), AVR(0.3290) } |
| #define | WP_C { AVR(0.3100), AVR(0.3160) } |
| #define | WP_DCI { AVR(0.3140), AVR(0.3510) } |
| #define | WP_E { {1, 3}, {1, 3} } |
| #define | BT709_alpha 1.099296826809442 |
| #define | BT709_beta 0.018053968510807 |
| #define | PQ_c1 ( 3424.0 / 4096.0) /* c3-c2 + 1 */ |
| #define | PQ_c2 ( 32.0 * 2413.0 / 4096.0) |
| #define | PQ_c3 ( 32.0 * 2392.0 / 4096.0) |
| #define | PQ_m (128.0 * 2523.0 / 4096.0) |
| #define | PQ_n ( 0.25 * 2610.0 / 4096.0) |
| #define | DCI_L 48.00 |
| #define | DCI_P 52.37 |
| #define | HLG_a 0.17883277 |
| #define | HLG_b 0.28466892 |
| #define | HLG_c 0.55991073 |
| #define | VLOG_c1 0.01 |
| #define | VLOG_c2 0.181 |
| #define | VLOG_b 0.00873 |
| #define | VLOG_c 0.241514 |
| #define | VLOG_d 0.598206 |
| #define | WRAP_SDR_OETF(name) |
| #define | WRAP_SDR_EOTF(name) |
| #define | DCI_L 48.00 |
| #define | DCI_P 52.37 |
| #define | DCI_X (42.94 / DCI_L) |
| #define | DCI_Z (45.82 / DCI_L) |
Variables | |
| static const struct AVLumaCoefficients | luma_coefficients [AVCOL_SPC_NB] |
| static const AVColorPrimariesDesc | color_primaries [AVCOL_PRI_NB] |
| static const AVColorPrimariesDesc | color_primaries_ext [AVCOL_PRI_EXT_NB - AVCOL_PRI_EXT_BASE] |
| static const double | approximate_gamma [AVCOL_TRC_NB] |
| static const double | approximate_gamma_ext [AVCOL_TRC_EXT_NB - AVCOL_TRC_EXT_BASE] |
| static const double | approximate_eotf_gamma [AVCOL_TRC_NB] |
| static const double | approximate_eotf_gamma_ext [AVCOL_TRC_EXT_NB - AVCOL_TRC_EXT_BASE] |
| static const av_csp_trc_function | trc_funcs [AVCOL_TRC_NB] |
| static const av_csp_trc_function | trc_funcs_ext [AVCOL_TRC_EXT_NB - AVCOL_TRC_EXT_BASE] |
| static const av_csp_trc_function | trc_inv_funcs [AVCOL_TRC_NB] |
| static const av_csp_trc_function | trc_inv_funcs_ext [AVCOL_TRC_EXT_NB - AVCOL_TRC_EXT_BASE] |
| static const av_csp_eotf_function | eotf_funcs [AVCOL_TRC_NB] |
| static const av_csp_eotf_function | eotf_inv_funcs [AVCOL_TRC_NB] |
| #define BT709_alpha 1.099296826809442 |
Definition at line 197 of file csp.c.
Referenced by trc_bt1361(), trc_bt1361_inv(), trc_bt709(), trc_bt709_inv(), trc_iec61966_2_4(), and trc_iec61966_2_4_inv().
| #define BT709_beta 0.018053968510807 |
Definition at line 198 of file csp.c.
Referenced by trc_bt1361(), trc_bt1361_inv(), trc_bt709(), trc_bt709_inv(), trc_iec61966_2_4(), and trc_iec61966_2_4_inv().
| #define PQ_c1 ( 3424.0 / 4096.0) /* c3-c2 + 1 */ |
Definition at line 347 of file csp.c.
Referenced by trc_smpte_st2084(), and trc_smpte_st2084_inv().
| #define PQ_c2 ( 32.0 * 2413.0 / 4096.0) |
Definition at line 348 of file csp.c.
Referenced by trc_smpte_st2084(), and trc_smpte_st2084_inv().
| #define PQ_c3 ( 32.0 * 2392.0 / 4096.0) |
Definition at line 349 of file csp.c.
Referenced by trc_smpte_st2084(), and trc_smpte_st2084_inv().
| #define PQ_m (128.0 * 2523.0 / 4096.0) |
Definition at line 350 of file csp.c.
Referenced by trc_smpte_st2084(), and trc_smpte_st2084_inv().
| #define PQ_n ( 0.25 * 2610.0 / 4096.0) |
Definition at line 351 of file csp.c.
Referenced by trc_smpte_st2084(), and trc_smpte_st2084_inv().
| #define DCI_L 48.00 |
Definition at line 381 of file csp.c.
Referenced by eotf_smpte_st428_1(), eotf_smpte_st428_1_inv(), trc_smpte_st428_1(), and trc_smpte_st428_1_inv().
| #define DCI_P 52.37 |
Definition at line 382 of file csp.c.
Referenced by eotf_smpte_st428_1(), eotf_smpte_st428_1_inv(), trc_smpte_st428_1(), and trc_smpte_st428_1_inv().
| #define HLG_a 0.17883277 |
Definition at line 394 of file csp.c.
Referenced by trc_arib_std_b67(), and trc_arib_std_b67_inv().
| #define HLG_b 0.28466892 |
Definition at line 395 of file csp.c.
Referenced by trc_arib_std_b67(), and trc_arib_std_b67_inv().
| #define HLG_c 0.55991073 |
Definition at line 396 of file csp.c.
Referenced by trc_arib_std_b67(), and trc_arib_std_b67_inv().
| #define VLOG_c1 0.01 |
Definition at line 418 of file csp.c.
Referenced by trc_v_log().
| #define VLOG_c2 0.181 |
Definition at line 419 of file csp.c.
Referenced by trc_v_log_inv().
| #define VLOG_b 0.00873 |
Definition at line 420 of file csp.c.
Referenced by trc_v_log(), and trc_v_log_inv().
| #define VLOG_c 0.241514 |
Definition at line 421 of file csp.c.
Referenced by trc_v_log(), and trc_v_log_inv().
| #define VLOG_d 0.598206 |
Definition at line 422 of file csp.c.
Referenced by trc_v_log(), and trc_v_log_inv().
| #define WRAP_SDR_OETF | ( | name | ) |
| #define WRAP_SDR_EOTF | ( | name | ) |
| #define DCI_X (42.94 / DCI_L) |
Definition at line 595 of file csp.c.
Referenced by eotf_smpte_st428_1(), and eotf_smpte_st428_1_inv().
| #define DCI_Z (45.82 / DCI_L) |
Definition at line 596 of file csp.c.
Referenced by eotf_smpte_st428_1(), and eotf_smpte_st428_1_inv().
|
static |
Definition at line 108 of file csp.c.
Referenced by av_csp_primaries_id_from_desc().
Definition at line 353 of file csp.c.
Referenced by eotf_smpte_st2084_inv().
Definition at line 368 of file csp.c.
Referenced by eotf_smpte_st2084().
Definition at line 398 of file csp.c.
Referenced by eotf_arib_std_b67_inv().
Definition at line 409 of file csp.c.
Referenced by eotf_arib_std_b67().
Definition at line 558 of file csp.c.
Referenced by eotf_bt1886().
Note: This equation is technically only accurate if the contrast ratio Lw:Lb is greater than 12:1; otherwise we would need to use a different, significantly more complicated solution. Ignore this as a highly degenerate case, since any real world reference display will have a static contrast ratio multiple orders of magnitude higher.
|
static |
Definition at line 46 of file csp.c.
Referenced by av_csp_luma_coeffs_from_avcsp().
|
static |
Definition at line 76 of file csp.c.
Referenced by av_csp_primaries_desc_from_id(), av_csp_primaries_id_from_desc(), color_config(), convert_primaries(), dovi_configure_ext(), ff_prores_kostya_write_frame_header(), frame_header(), mov_read_colr(), mov_read_vpcc(), print_film_grain_params(), print_primaries(), scale_vaapi_init(), scale_vt_init(), tonemap_vaapi_init(), vpp_init(), and write_frame_header().
|
static |
Definition at line 90 of file csp.c.
Referenced by av_csp_primaries_desc_from_id().
|
static |
Definition at line 140 of file csp.c.
Referenced by av_csp_approximate_trc_gamma().
|
static |
Definition at line 154 of file csp.c.
Referenced by av_csp_approximate_trc_gamma().
|
static |
Definition at line 168 of file csp.c.
Referenced by av_csp_approximate_eotf_gamma().
|
static |
Definition at line 182 of file csp.c.
Referenced by av_csp_approximate_eotf_gamma().
|
static |
Definition at line 444 of file csp.c.
Referenced by av_csp_trc_func_from_id().
|
static |
|
static |
Definition at line 478 of file csp.c.
Referenced by av_csp_trc_func_inv_from_id().
|
static |
Definition at line 497 of file csp.c.
Referenced by av_csp_trc_func_inv_from_id().
|
static |
Definition at line 661 of file csp.c.
Referenced by av_csp_itu_eotf().
|
static |
Definition at line 691 of file csp.c.
Referenced by av_csp_itu_eotf_inv().