FFmpeg
Data Structures | Enumerations | Functions
utils.h File Reference
#include "libavutil/csp.h"
#include "libavutil/pixdesc.h"
#include "swscale.h"

Go to the source code of this file.

Data Structures

struct  SwsColor
 
struct  SwsFormat
 

Enumerations

enum  { FIELD_TOP, FIELD_BOTTOM }
 

Functions

static int ff_q_isnan (const AVRational a)
 
static int ff_q_equal (const AVRational a, const AVRational b)
 
static int ff_cie_xy_equal (const AVCIExy a, const AVCIExy b)
 
static int ff_prim_equal (const AVPrimaryCoefficients *a, const AVPrimaryCoefficients *b)
 
static void ff_color_update_dynamic (SwsColor *dst, const SwsColor *src)
 
SwsFormat ff_fmt_from_frame (const AVFrame *frame, int field)
 This function also sanitizes and strips the input data, removing irrelevant fields for certain formats. More...
 
static int ff_color_equal (const SwsColor *c1, const SwsColor *c2)
 
static int ff_props_equal (const SwsFormat *fmt1, const SwsFormat *fmt2)
 
static int ff_fmt_equal (const SwsFormat *fmt1, const SwsFormat *fmt2)
 
static int ff_fmt_align (enum AVPixelFormat fmt)
 
int ff_test_fmt (const SwsFormat *fmt, int output)
 
int ff_infer_colors (SwsColor *src, SwsColor *dst)
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
FIELD_TOP 
FIELD_BOTTOM 

Definition at line 53 of file utils.h.

Function Documentation

◆ ff_q_isnan()

static int ff_q_isnan ( const AVRational  a)
inlinestatic

Definition at line 29 of file utils.h.

Referenced by ff_q_equal().

◆ ff_q_equal()

static int ff_q_equal ( const AVRational  a,
const AVRational  b 
)
inlinestatic

Definition at line 35 of file utils.h.

Referenced by ff_cie_xy_equal(), and ff_color_equal().

◆ ff_cie_xy_equal()

static int ff_cie_xy_equal ( const AVCIExy  a,
const AVCIExy  b 
)
inlinestatic

Definition at line 40 of file utils.h.

Referenced by apply_chromatic_adaptation(), and ff_prim_equal().

◆ ff_prim_equal()

static int ff_prim_equal ( const AVPrimaryCoefficients a,
const AVPrimaryCoefficients b 
)
inlinestatic

Definition at line 45 of file utils.h.

Referenced by ff_color_equal(), and ff_sws_color_map_noop().

◆ ff_color_update_dynamic()

static void ff_color_update_dynamic ( SwsColor dst,
const SwsColor src 
)
inlinestatic

Definition at line 68 of file utils.h.

Referenced by ff_sws_graph_update_metadata().

◆ ff_fmt_from_frame()

SwsFormat ff_fmt_from_frame ( const AVFrame frame,
int  field 
)

This function also sanitizes and strips the input data, removing irrelevant fields for certain formats.

Calculate largest value from histogram to use as fallback for clips with missing MaxSCL information. Note that this may end up picking the "reserved" value at the 5% percentile, which in practice appears to track the brightest pixel in the scene.

Definition at line 2692 of file utils.c.

Referenced by sws_frame_setup(), sws_is_noop(), and sws_test_frame().

◆ ff_color_equal()

static int ff_color_equal ( const SwsColor c1,
const SwsColor c2 
)
inlinestatic

Definition at line 92 of file utils.h.

Referenced by ff_props_equal().

◆ ff_props_equal()

static int ff_props_equal ( const SwsFormat fmt1,
const SwsFormat fmt2 
)
inlinestatic

Definition at line 102 of file utils.h.

Referenced by ff_fmt_equal(), and sws_frame_setup().

◆ ff_fmt_equal()

static int ff_fmt_equal ( const SwsFormat fmt1,
const SwsFormat fmt2 
)
inlinestatic

Definition at line 113 of file utils.h.

Referenced by ff_sws_graph_reinit(), init_passes(), and sws_is_noop().

◆ ff_fmt_align()

static int ff_fmt_align ( enum AVPixelFormat  fmt)
inlinestatic

Definition at line 120 of file utils.h.

◆ ff_test_fmt()

int ff_test_fmt ( const SwsFormat fmt,
int  output 
)

Definition at line 2955 of file utils.c.

Referenced by sws_frame_setup(), and sws_test_frame().

◆ ff_infer_colors()

int ff_infer_colors ( SwsColor src,
SwsColor dst 
)

Definition at line 2893 of file utils.c.

Referenced by adapt_colors().