FFmpeg
|
Go to the source code of this file.
Data Structures | |
struct | SwsImg |
Represents a view into a single field of frame data. More... | |
struct | SwsPass |
Represents a single filter pass in the scaling graph. More... | |
struct | SwsGraph |
Filter graph, which represents a 'baked' pixel format conversion. More... | |
Typedefs | |
typedef void(* | sws_filter_run_t) (const SwsImg *out, const SwsImg *in, int y, int h, const SwsPass *pass) |
Output h lines of filtered data. More... | |
Functions | |
static av_always_inline av_const int | ff_fmt_vshift (enum AVPixelFormat fmt, int plane) |
static av_const SwsImg | ff_sws_img_shift (const SwsImg *base, const int y) |
int | ff_sws_graph_create (SwsContext *ctx, const SwsFormat *dst, const SwsFormat *src, int field, SwsGraph **out_graph) |
Allocate and initialize the filter graph. More... | |
SwsPass * | ff_sws_graph_add_pass (SwsGraph *graph, enum AVPixelFormat fmt, int width, int height, SwsPass *input, int align, void *priv, sws_filter_run_t run) |
Allocate and add a new pass to the filter graph. More... | |
void | ff_sws_graph_free (SwsGraph **graph) |
Uninitialize any state associate with this filter graph and free it. More... | |
void | ff_sws_graph_update_metadata (SwsGraph *graph, const SwsColor *color) |
Update dynamic per-frame HDR metadata without requiring a full reinit. More... | |
int | ff_sws_graph_reinit (SwsContext *ctx, const SwsFormat *dst, const SwsFormat *src, int field, SwsGraph **graph) |
Wrapper around ff_sws_graph_create() that reuses the existing graph if the format is compatible. More... | |
void | ff_sws_graph_run (SwsGraph *graph, uint8_t *const out_data[4], const int out_linesize[4], const uint8_t *const in_data[4], const int in_linesize[4]) |
Dispatch the filter graph on a single field. More... | |
|
static |
Definition at line 39 of file graph.h.
Referenced by ff_sws_img_shift(), and run_copy().
Definition at line 45 of file graph.h.
Referenced by run_copy(), run_legacy_swscale(), run_legacy_unscaled(), and run_lut3d().
int ff_sws_graph_create | ( | SwsContext * | ctx, |
const SwsFormat * | dst, | ||
const SwsFormat * | src, | ||
int | field, | ||
SwsGraph ** | out_graph | ||
) |
Allocate and initialize the filter graph.
Returns 0 or a negative error.
Definition at line 599 of file graph.c.
Referenced by ff_sws_graph_reinit().
SwsPass* ff_sws_graph_add_pass | ( | SwsGraph * | graph, |
enum AVPixelFormat | fmt, | ||
int | width, | ||
int | height, | ||
SwsPass * | input, | ||
int | align, | ||
void * | priv, | ||
sws_filter_run_t | run | ||
) |
Allocate and add a new pass to the filter graph.
graph | Filter graph to add the pass to. |
fmt | Pixel format of the output image. |
w | Width of the output image. |
h | Height of the output image. |
input | Previous pass to read from, or NULL for the input image. |
align | Minimum slice alignment for this pass, or 0 for no threading. |
priv | Private state for the filter run function. |
run | Filter function to run. |
Definition at line 47 of file graph.c.
Referenced by adapt_colors(), init_legacy_subpass(), init_passes(), and pass_append().
void ff_sws_graph_free | ( | SwsGraph ** | graph | ) |
Uninitialize any state associate with this filter graph and free it.
Definition at line 637 of file graph.c.
Referenced by ff_sws_graph_create(), ff_sws_graph_reinit(), sws_frame_setup(), and sws_freeContext().
Update dynamic per-frame HDR metadata without requiring a full reinit.
Definition at line 692 of file graph.c.
Referenced by ff_sws_graph_reinit().
int ff_sws_graph_reinit | ( | SwsContext * | ctx, |
const SwsFormat * | dst, | ||
const SwsFormat * | src, | ||
int | field, | ||
SwsGraph ** | graph | ||
) |
Wrapper around ff_sws_graph_create() that reuses the existing graph if the format is compatible.
This will also update dynamic per-frame metadata. Must be called after changing any of the fields in ctx
, or else they will have no effect.
Definition at line 676 of file graph.c.
Referenced by sws_frame_setup().