You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-06-19 19:03:00 +02:00
swscale/ops: pass SwsLinearOp by pointer instead of value in ff_sws_linear_mask()
This commit is contained in:
+3
-3
@@ -1203,7 +1203,7 @@ static SwsLinearOp fmt_encode_range(const SwsFormat *fmt, bool *incomplete)
|
||||
c.m[0][0] = av_neg_q(c.m[0][0]);
|
||||
}
|
||||
|
||||
c.mask = ff_sws_linear_mask(c);
|
||||
c.mask = ff_sws_linear_mask(&c);
|
||||
return c;
|
||||
}
|
||||
|
||||
@@ -1222,7 +1222,7 @@ static SwsLinearOp fmt_decode_range(const SwsFormat *fmt, bool *incomplete)
|
||||
if (!(fmt->desc->flags & AV_PIX_FMT_FLAG_ALPHA))
|
||||
c.m[3][4] = Q1;
|
||||
|
||||
c.mask = ff_sws_linear_mask(c);
|
||||
c.mask = ff_sws_linear_mask(&c);
|
||||
return c;
|
||||
}
|
||||
|
||||
@@ -1388,7 +1388,7 @@ linear_mat3(const AVRational m00, const AVRational m01, const AVRational m02,
|
||||
{ Q0, Q0, Q0, Q1, Q0 },
|
||||
}};
|
||||
|
||||
c.mask = ff_sws_linear_mask(c);
|
||||
c.mask = ff_sws_linear_mask(&c);
|
||||
return c;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -773,12 +773,12 @@ int ff_sws_op_list_max_size(const SwsOpList *ops)
|
||||
return max_size;
|
||||
}
|
||||
|
||||
uint32_t ff_sws_linear_mask(const SwsLinearOp c)
|
||||
uint32_t ff_sws_linear_mask(const SwsLinearOp *c)
|
||||
{
|
||||
uint32_t mask = 0;
|
||||
for (int i = 0; i < 4; i++) {
|
||||
for (int j = 0; j < 5; j++) {
|
||||
if (av_cmp_q(c.m[i][j], Q(i == j)))
|
||||
if (av_cmp_q(c->m[i][j], Q(i == j)))
|
||||
mask |= SWS_MASK(i, j);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -216,7 +216,7 @@ enum {
|
||||
};
|
||||
|
||||
/* Helper function to compute the correct mask */
|
||||
uint32_t ff_sws_linear_mask(SwsLinearOp);
|
||||
uint32_t ff_sws_linear_mask(const SwsLinearOp *c);
|
||||
|
||||
typedef struct SwsFilterOp {
|
||||
SwsFilterWeights *kernel; /* filter kernel (refstruct) */
|
||||
|
||||
@@ -331,7 +331,7 @@ static bool extract_swizzle(SwsLinearOp *op, SwsComps prev, SwsSwizzleOp *out_sw
|
||||
if (swiz.mask == SWS_SWIZZLE(0, 1, 2, 3).mask)
|
||||
return false; /* no swizzle was identified */
|
||||
|
||||
c.mask = ff_sws_linear_mask(c);
|
||||
c.mask = ff_sws_linear_mask(&c);
|
||||
*out_swiz = swiz;
|
||||
*op = c;
|
||||
return true;
|
||||
@@ -658,7 +658,7 @@ retry:
|
||||
op->lin.m[i][j] = sum;
|
||||
}
|
||||
}
|
||||
op->lin.mask = ff_sws_linear_mask(op->lin);
|
||||
op->lin.mask = ff_sws_linear_mask(&op->lin);
|
||||
ff_sws_op_list_remove_at(ops, n + 1, 1);
|
||||
goto retry;
|
||||
}
|
||||
|
||||
@@ -697,7 +697,7 @@ static void check_linear(const char *name, const SwsUOp *uop)
|
||||
}
|
||||
}
|
||||
|
||||
lin.mask = ff_sws_linear_mask(lin);
|
||||
lin.mask = ff_sws_linear_mask(&lin);
|
||||
CHECK(name, 4, 4, type, type, {
|
||||
.op = SWS_OP_LINEAR,
|
||||
.type = type,
|
||||
|
||||
Reference in New Issue
Block a user