104 vfprintf(stdout, fmt, vl);
117 _setmode(_fileno(stdout), _O_BINARY);
120 for (
int i = 1;
i < argc;
i++) {
121 if (!strcmp(argv[
i],
"-help") || !strcmp(argv[
i],
"--help")) {
123 "sws_ops [options...]\n"
127 " Only test the specified destination pixel format\n"
129 " Only test the specified source pixel format\n"
131 " Enable log verbosity at given level\n"
135 if (!strcmp(argv[
i],
"-src")) {
140 fprintf(stderr,
"invalid pixel format %s\n", argv[
i + 1]);
144 }
else if (!strcmp(argv[
i],
"-dst")) {
149 fprintf(stderr,
"invalid pixel format %s\n", argv[
i + 1]);
153 }
else if (!strcmp(argv[
i],
"-v")) {
160 fprintf(stderr,
"bad option or argument missing (%s) see -help\n", argv[
i]);
#define flags(name, subs,...)
#define i(width, name, range_min, range_max)
SwsGraph * ff_sws_graph_alloc(void)
Allocate an empty SwsGraph.
void ff_sws_graph_free(SwsGraph **pgraph)
Uninitialize any state associate with this filter graph and free it.
#define av_err2str(errnum)
Convenience macro, the return value should be used only directly in function arguments but never stan...
#define AV_LOG_INFO
Standard information.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void av_log_set_callback(void(*callback)(void *, int, const char *, va_list))
Set the logging callback.
void av_log_set_level(int level)
Set the log level.
void av_log_default_callback(void *ptr, int level, const char *fmt, va_list vl)
Default logging callback.
int av_log_get_level(void)
Get the current log level.
SwsContext * sws_alloc_context(void)
Allocate an empty SwsContext and set its fields to default values.
void sws_free_context(SwsContext **ctx)
Free the context and everything associated with it, and write NULL to the provided pointer.
@ SWS_SCALE_BILINEAR
bilinear filtering
Memory handling functions.
static int ff_sws_enum_op_lists(SwsContext *ctx, void *opaque, const SwsLut3D *lut3d, enum AVPixelFormat src_fmt, enum AVPixelFormat dst_fmt, int(*cb)(SwsContext *ctx, void *opaque, SwsOpList *ops))
Helper function to enumerate over all possible (optimized) operation lists, under the current set of ...
bool ff_sws_op_list_is_noop(const SwsOpList *ops)
Returns whether an op list represents a true no-op operation, i.e.
void ff_sws_op_list_print(void *log, int lev, int lev_extra, const SwsOpList *ops)
Print out the contents of an operation list.
SwsOpList * ff_sws_op_list_duplicate(const SwsOpList *ops)
Returns a duplicate of ops, or NULL on OOM.
int ff_sws_compile_pass(SwsGraph *graph, const SwsOpBackend *backend, SwsOpList **pops, int flags, SwsPass *input, SwsPass **output)
Resolves an operation list to a graph pass.
@ SWS_OP_FLAG_SPLIT_MEMCPY
const char * av_get_pix_fmt_name(enum AVPixelFormat pix_fmt)
Return the short name for a pixel format, NULL in case pix_fmt is unknown.
enum AVPixelFormat av_get_pix_fmt(const char *name)
Return the pixel format corresponding to name.
AVPixelFormat
Pixel format.
Main external API structure.
Filter graph, which represents a 'baked' pixel format conversion.
Helper struct for representing a list of operations.
static const SwsOpBackend backend_print
static int print_passes(SwsContext *ctx, void *graph, SwsOpList *ops)
static void log_stdout(void *avcl, int level, const char *fmt, va_list vl)
static int print_ops(SwsContext *ctx, const SwsOpList *ops, SwsCompiledOp *out)
static AVFormatContext * ctx
int ff_sws_ops_translate(SwsContext *ctx, const SwsOpList *ops, SwsUOpFlags flags, SwsUOpList *uops)
Translate a list of operations down to micro-ops, which can be further optimized and then directly ex...
void ff_sws_uop_name(const SwsUOp *op, char buf[SWS_UOP_NAME_MAX])
SwsUOpList * ff_sws_uop_list_alloc(void)
void ff_sws_uop_list_free(SwsUOpList **p_ops)
#define SWS_UOP_NAME_MAX
Generate a unique name for a SwsUOp.
static void copy(const float *p1, float *p2, const int length)