du = (int)u[i] - ctx->chromakey_uv[0];
dv = (int)v[i] - ctx->chromakey_uv[1];
- diff += sqrt((du * du + dv * dv) / (255.0 * 255.0));
+ diff += sqrt((du * du + dv * dv) / (255.0 * 255.0 * 2));
}
diff /= 9.0;
du = (int)u[i] - ctx->chromakey_uv[0];
dv = (int)v[i] - ctx->chromakey_uv[1];
- diff += sqrt((du * du + dv * dv) / (max * max));
+ diff += sqrt((du * du + dv * dv) / (max * max * 2));
}
diff /= 9.0;
AVFILTER_DEFINE_CLASS(chromakey);
-AVFilter ff_vf_chromakey = {
+const AVFilter ff_vf_chromakey = {
.name = "chromakey",
.description = NULL_IF_CONFIG_SMALL("Turns a certain color into transparency. Operates on YUV colors."),
.priv_size = sizeof(ChromakeyContext),
AVFILTER_DEFINE_CLASS(chromahold);
-AVFilter ff_vf_chromahold = {
+const AVFilter ff_vf_chromahold = {
.name = "chromahold",
.description = NULL_IF_CONFIG_SMALL("Turns a certain color range into gray."),
.priv_size = sizeof(ChromakeyContext),