Go to the documentation of this file.
36 #define SWS_MAX_PADDING 64
41 int x_start,
int y_start,
int x_end,
int y_end)
44 const int lines = y_end - y_start;
48 for (
int i = 0;
i <
p->num_planes;
i++) {
50 const int idx =
p->index[
i];
52 if (idx < 0 && !use_loop) {
57 for (
int y = y_start; y < y_end; y++) {
58 memset(
out,
p->clear_value[
i], bytes);
62 const uint8_t *in = exec->
in[idx];
63 for (
int y = y_start; y < y_end; y++) {
64 memcpy(
out, in, bytes);
76 for (
int n = 0; n < ops->
num_ops; n++) {
80 if ((
op->rw.packed &&
op->rw.elems != 1) ||
op->rw.frac ||
op->rw.filter)
82 for (
int i = 0;
i <
op->rw.elems;
i++)
88 for (
int i = 0;
i < 4;
i++) {
91 for (
int j = 0; j <
i; j++) {
92 if (
op->swizzle.in[
i] ==
op->swizzle.in[j])
95 p.index[
i] = orig.index[
op->swizzle.in[
i]];
101 for (
int i = 0;
i < 4;
i++) {
102 if (!
op->clear.value[
i].den)
104 if (
op->clear.value[
i].den != 1)
109 uint8_t
val =
op->clear.value[
i].num & 0xFF;
112 case 2:
ref *= 0x101;
break;
113 case 4:
ref *= 0x1010101;
break;
115 if (
ref !=
op->clear.value[
i].num)
117 p.clear_value[
i] =
val;
123 if ((
op->rw.packed &&
op->rw.elems != 1) ||
op->rw.frac ||
op->rw.filter)
125 p.num_planes =
op->rw.elems;
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
#define SWS_MAX_PADDING
Switch to loop if total padding exceeds this number of bytes.
int ff_sws_pixel_type_size(SwsPixelType type)
void * av_memdup(const void *p, size_t size)
Duplicate a buffer with av_malloc().
static double val(void *priv, double ch)
const SwsOpBackend backend_murder
static int op(uint8_t **dst, const uint8_t *dst_end, GetByteContext *gb, int pixel, int count, int *x, int width, int linesize)
Perform decode operation.
static AVFormatContext * ctx
Copyright (C) 2026 Niklas Haas.
static int compile(SwsContext *ctx, SwsOpList *ops, SwsCompiledOp *out)
#define i(width, name, range_min, range_max)
static void process(const SwsOpExec *exec, const void *priv, int x_start, int y_start, int x_end, int y_end)
#define av_assert1(cond)
assert() equivalent, that does not lie in speed critical code.
static int ref[MAX_W *MAX_W]
IDirect3DDxgiInterfaceAccess _COM_Outptr_ void ** p
Copyright (C) 2025 Niklas Haas.
Helper struct for representing a list of operations.
Main external API structure.