|
FFmpeg
|
#include "libavutil/avassert.h"#include "libavutil/cpu.h"#include "libavutil/error.h"#include "libavutil/imgutils.h"#include "libavutil/macros.h"#include "libavutil/mem.h"#include "libavutil/opt.h"#include "libavutil/pixdesc.h"#include "libavutil/refstruct.h"#include "libavutil/slicethread.h"#include "libswscale/swscale.h"#include "libswscale/format.h"#include "cms.h"#include "lut3d.h"#include "swscale_internal.h"#include "graph.h"#include "ops.h"Go to the source code of this file.
Macros | |
| #define | add_convert_pass add_legacy_sws_pass |
Functions | |
| static int | buffer_get_sizes (SwsPassBuffer *buffer, size_t sizes[4]) |
| static int | pass_alloc_output (SwsPass *pass) |
| static void | free_buffer (AVRefStructOpaque opaque, void *obj) |
| 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... | |
| static int | pass_append (SwsGraph *graph, enum AVPixelFormat fmt, int w, int h, SwsPass **pass, int align, void *priv, sws_filter_run_t run) |
| static void | run_copy (const SwsImg *out_base, const SwsImg *in_base, int y, int h, const SwsPass *pass) |
| static void | run_rgb0 (const SwsImg *out, const SwsImg *in, int y, int h, const SwsPass *pass) |
| static void | run_xyz2rgb (const SwsImg *out, const SwsImg *in, int y, int h, const SwsPass *pass) |
| static void | run_rgb2xyz (const SwsImg *out, const SwsImg *in, int y, int h, const SwsPass *pass) |
| static void | free_legacy_swscale (void *priv) |
| static void | setup_legacy_swscale (const SwsImg *out, const SwsImg *in, const SwsPass *pass) |
| static SwsContext * | slice_ctx (const SwsPass *pass, int y) |
| static void | run_legacy_unscaled (const SwsImg *out, const SwsImg *in_base, int y, int h, const SwsPass *pass) |
| static void | run_legacy_swscale (const SwsImg *out_base, const SwsImg *in, int y, int h, const SwsPass *pass) |
| static void | get_chroma_pos (SwsGraph *graph, int *h_chr_pos, int *v_chr_pos, const SwsFormat *fmt) |
| static void | legacy_chr_pos (SwsGraph *graph, int *chr_pos, int override, int *warned) |
| static int | init_legacy_subpass (SwsGraph *graph, SwsContext *sws, SwsPass *input, SwsPass **output) |
| static int | add_legacy_sws_pass (SwsGraph *graph, SwsFormat src, SwsFormat dst, SwsPass *input, SwsPass **output) |
| static void | free_lut3d (void *priv) |
| static void | setup_lut3d (const SwsImg *out, const SwsImg *in, const SwsPass *pass) |
| static void | run_lut3d (const SwsImg *out_base, const SwsImg *in_base, int y, int h, const SwsPass *pass) |
| static int | adapt_colors (SwsGraph *graph, SwsFormat src, SwsFormat dst, SwsPass *input, SwsPass **output) |
| static int | init_passes (SwsGraph *graph) |
| static void | sws_graph_worker (void *priv, int jobnr, int threadnr, int nb_jobs, int nb_threads) |
| 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... | |
| void | ff_sws_graph_free (SwsGraph **pgraph) |
| Uninitialize any state associate with this filter graph and free it. More... | |
| static int | opts_equal (const SwsContext *c1, const SwsContext *c2) |
| int | ff_sws_graph_reinit (SwsContext *ctx, const SwsFormat *dst, const SwsFormat *src, int field, SwsGraph **out_graph) |
| Wrapper around ff_sws_graph_create() that reuses the existing graph if the format is compatible. More... | |
| void | ff_sws_graph_update_metadata (SwsGraph *graph, const SwsColor *color) |
| Update dynamic per-frame HDR metadata without requiring a full reinit. More... | |
| static SwsImg | pass_output (const SwsPass *pass, const SwsImg *fallback) |
| void | ff_sws_graph_run (SwsGraph *graph, const SwsImg *output, const SwsImg *input) |
| Dispatch the filter graph on a single field. More... | |
| #define add_convert_pass add_legacy_sws_pass |
|
static |
Definition at line 41 of file graph.c.
Referenced by pass_alloc_output().
|
static |
Definition at line 65 of file graph.c.
Referenced by ff_sws_graph_add_pass().
|
static |
Definition at line 92 of file graph.c.
Referenced by ff_sws_graph_add_pass().
| 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 99 of file graph.c.
Referenced by adapt_colors(), init_legacy_subpass(), init_passes(), and pass_append().
|
static |
Definition at line 150 of file graph.c.
Referenced by init_legacy_subpass().
|
static |
Definition at line 160 of file graph.c.
Referenced by init_passes(), and palette_subblock_data().
|
static |
Definition at line 185 of file graph.c.
Referenced by init_legacy_subpass().
|
static |
Definition at line 206 of file graph.c.
Referenced by init_legacy_subpass().
|
static |
Definition at line 215 of file graph.c.
Referenced by init_legacy_subpass().
|
static |
Definition at line 230 of file graph.c.
Referenced by init_legacy_subpass().
|
static |
Definition at line 236 of file graph.c.
Referenced by init_legacy_subpass().
|
inlinestatic |
Definition at line 250 of file graph.c.
Referenced by run_legacy_swscale(), and run_legacy_unscaled().
|
static |
Definition at line 269 of file graph.c.
Referenced by init_legacy_subpass().
|
static |
Definition at line 280 of file graph.c.
Referenced by init_legacy_subpass().
|
static |
Definition at line 291 of file graph.c.
Referenced by add_legacy_sws_pass().
|
static |
Definition at line 334 of file graph.c.
Referenced by add_legacy_sws_pass().
|
static |
For slice threading, we need to create sub contexts, similar to how swscale normally handles it internally. The most important difference is that we handle cascaded contexts before threaded contexts; whereas context_init_threaded() does it the other way around.
Definition at line 350 of file graph.c.
Referenced by add_legacy_sws_pass().
|
static |
Definition at line 605 of file graph.c.
Referenced by adapt_colors().
Definition at line 611 of file graph.c.
Referenced by adapt_colors().
|
static |
Definition at line 619 of file graph.c.
Referenced by adapt_colors().
|
static |
Grayspace does not really have primaries, so just force the use of the equivalent other primary set to avoid a conversion. Technically, this does affect the weights used for the Grayscale conversion, but in practise, that should give the expected results more often than not.
Definition at line 630 of file graph.c.
Referenced by init_passes().
|
static |
Definition at line 698 of file graph.c.
Referenced by ff_sws_graph_create().
|
static |
Definition at line 731 of file graph.c.
Referenced by ff_sws_graph_create().
| 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 742 of file graph.c.
Referenced by ff_sws_graph_reinit().
| void ff_sws_graph_free | ( | SwsGraph ** | pgraph | ) |
Uninitialize any state associate with this filter graph and free it.
Definition at line 777 of file graph.c.
Referenced by ff_sws_graph_create(), ff_sws_graph_reinit(), sws_frame_setup(), and sws_freeContext().
|
static |
Definition at line 799 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 815 of file graph.c.
Referenced by sws_frame_setup().
Update dynamic per-frame HDR metadata without requiring a full reinit.
Definition at line 831 of file graph.c.
Referenced by ff_sws_graph_reinit().
Definition at line 839 of file graph.c.
Referenced by ff_sws_graph_run().
1.8.17