Go to the documentation of this file.
21 #ifndef SWSCALE_GRAPH_H
22 #define SWSCALE_GRAPH_H
42 return (plane == 1 || plane == 2) ?
desc->log2_chroma_h : 0;
48 for (
int i = 0;
i < 4 &&
img.data[
i];
i++)
188 const int out_linesize[4],
189 const uint8_t *
const in_data[4],
190 const int in_linesize[4]);
AVPixelFormat
Pixel format.
AVSliceThread * slicethread
Represents a single filter pass in the scaling graph.
SwsPass ** passes
Sorted sequence of filter passes to apply.
SwsImg output
Filter output buffer.
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
enum AVPixelFormat format
void(* sws_filter_run_t)(const SwsImg *out, const SwsImg *in, int y, int h, const SwsPass *pass)
Output h lines of filtered data.
SwsFormat src
Currently active format and processing parameters.
int ff_sws_graph_create(SwsContext *ctx, const SwsFormat *dst, const SwsFormat *src, int field, SwsGraph **out_graph)
Allocate and initialize the filter graph.
void(* free)(void *priv)
Optional private state and associated free() function.
Represents a view into a single field of frame data.
struct AVSliceThread AVSliceThread
SwsContext opts_copy
Cached copy of the public options that were used to construct this SwsGraph.
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.
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.
void(* setup)(const SwsImg *out, const SwsImg *in, const SwsPass *pass)
Called once from the main thread before running the filter.
void ff_sws_graph_update_metadata(SwsGraph *graph, const SwsColor *color)
Update dynamic per-frame HDR metadata without requiring a full reinit.
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this field
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.
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
static const uint8_t *BS_FUNC() align(BSCTX *bc)
Skip bits to a byte boundary.
and forward the test the status of outputs and forward it to the corresponding return FFERROR_NOT_READY If the filters stores internally one or a few frame for some input
static av_always_inline av_const int ff_fmt_vshift(enum AVPixelFormat fmt, int plane)
#define i(width, name, range_min, range_max)
static av_const SwsImg ff_sws_img_shift(const SwsImg *base, const int y)
Filter graph, which represents a 'baked' pixel format conversion.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
sws_filter_run_t run
Filter main execution function.
const SwsPass * input
Filter input.
struct SwsGraph::@499 exec
Temporary execution state inside ff_sws_graph_run.
Main external API structure.
void ff_sws_graph_free(SwsGraph **graph)
Uninitialize any state associate with this filter graph and free it.