Go to the documentation of this file.
21 #ifndef SWSCALE_GRAPH_H
22 #define SWSCALE_GRAPH_H
35 return (plane == 1 || plane == 2) ?
desc->log2_chroma_h : 0;
172 void *priv,
void (*free)(
void *priv),
AVPixelFormat
Pixel format.
AVSliceThread * slicethread
Represents a single filter pass in the scaling graph.
SwsPass ** passes
Sorted sequence of filter passes to apply.
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
enum AVPixelFormat format
void ff_sws_graph_run(SwsGraph *graph, const AVFrame *dst, const AVFrame *src)
Dispatch the filter graph on a single field of the given frames.
SwsFormat src
Currently active format and processing parameters.
This structure describes decoded (raw) audio or video data.
SwsPassSetup setup
Called once from the main thread before running the filter.
int ff_sws_graph_add_pass(SwsGraph *graph, enum AVPixelFormat fmt, int width, int height, SwsPass *input, int align, SwsPassFunc run, SwsPassSetup setup, void *priv, void(*free)(void *priv), SwsPass **out_pass)
Allocate and add a new pass to the filter graph.
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.
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.
Represents a view into a single field of frame data.
void ff_sws_graph_update_metadata(SwsGraph *graph, const SwsColor *color)
Update dynamic per-frame HDR metadata without requiring a full reinit.
static AVFormatContext * ctx
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
SwsPassFunc run
Filter main execution function.
struct SwsGraph::@542 exec
Temporary execution state inside ff_sws_graph_run(); used to pass data to worker threads.
AVBufferRef * hw_frames_ref
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.
SwsPassBuffer * output
Filter output buffer.
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)
void(* SwsPassFunc)(const SwsFrame *out, const SwsFrame *in, int y, int h, const SwsPass *pass)
Output h lines of filtered data.
void(* SwsPassSetup)(const SwsFrame *out, const SwsFrame *in, const SwsPass *pass)
Function to run from the main thread before processing any lines.
A reference to a data buffer.
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...
const SwsPass * input
Filter input.
Represents an allocated output buffer for a filter pass.
Main external API structure.
void ff_sws_graph_free(SwsGraph **graph)
Uninitialize any state associate with this filter graph and free it.