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;
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.
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.
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.
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
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
void(* sws_filter_run_t)(const SwsFrame *out, const SwsFrame *in, int y, int h, const SwsPass *pass)
Output h lines of filtered data.
static av_always_inline av_const int ff_fmt_vshift(enum AVPixelFormat fmt, int plane)
void(* setup)(const SwsFrame *out, const SwsFrame *in, const SwsPass *pass)
Called once from the main thread before running the filter.
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...
sws_filter_run_t run
Filter main execution function.
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.
struct SwsGraph::@541 exec
Temporary execution state inside ff_sws_graph_run(); used to pass data to worker threads.