#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
+#include "libavutil/aarch64/cpu.h"
#include "libavutil/ppc/cpu.h"
#include "libavutil/x86/asm.h"
#include "libavutil/x86/cpu.h"
+
+// We have to implement deprecated functions until they are removed, this is the
+// simplest way to prevent warnings
+#undef attribute_deprecated
+#define attribute_deprecated
+
#include "rgb2rgb.h"
#include "swscale.h"
#include "swscale_internal.h"
+#if !FF_API_SWS_VECTOR
+static SwsVector *sws_getIdentityVec(void);
+static void sws_addVec(SwsVector *a, SwsVector *b);
+static void sws_shiftVec(SwsVector *a, int shift);
+static void sws_printVec2(SwsVector *a, AVClass *log_ctx, int log_level);
+#endif
+
static void handle_formats(SwsContext *c);
unsigned swscale_version(void)
[AV_PIX_FMT_GBRP10BE] = { 1, 1 },
[AV_PIX_FMT_GBRP12LE] = { 1, 1 },
[AV_PIX_FMT_GBRP12BE] = { 1, 1 },
+ [AV_PIX_FMT_GBRAP12LE] = { 1, 0 },
+ [AV_PIX_FMT_GBRAP12BE] = { 1, 0 },
[AV_PIX_FMT_GBRP14LE] = { 1, 1 },
[AV_PIX_FMT_GBRP14BE] = { 1, 1 },
[AV_PIX_FMT_GBRP16LE] = { 1, 0 },
case AV_PIX_FMT_GBRAP: return AV_PIX_FMT_GBRP;
+ case AV_PIX_FMT_GBRAP12LE: return AV_PIX_FMT_GBRP12;
+ case AV_PIX_FMT_GBRAP12BE: return AV_PIX_FMT_GBRP12;
+
case AV_PIX_FMT_GBRAP16LE: return AV_PIX_FMT_GBRP16;
case AV_PIX_FMT_GBRAP16BE: return AV_PIX_FMT_GBRP16;
srcFormat != AV_PIX_FMT_GBRP9BE && srcFormat != AV_PIX_FMT_GBRP9LE &&
srcFormat != AV_PIX_FMT_GBRP10BE && srcFormat != AV_PIX_FMT_GBRP10LE &&
srcFormat != AV_PIX_FMT_GBRP12BE && srcFormat != AV_PIX_FMT_GBRP12LE &&
+ srcFormat != AV_PIX_FMT_GBRAP12BE && srcFormat != AV_PIX_FMT_GBRAP12LE &&
srcFormat != AV_PIX_FMT_GBRP14BE && srcFormat != AV_PIX_FMT_GBRP14LE &&
srcFormat != AV_PIX_FMT_GBRP16BE && srcFormat != AV_PIX_FMT_GBRP16LE &&
+ srcFormat != AV_PIX_FMT_GBRAP16BE && srcFormat != AV_PIX_FMT_GBRAP16LE &&
((dstW >> c->chrDstHSubSample) <= (srcW >> 1) ||
(flags & SWS_FAST_BILINEAR)))
c->chrSrcHSubSample = 1;
#endif /* HAVE_MMXEXT_INLINE */
{
const int filterAlign = X86_MMX(cpu_flags) ? 4 :
- PPC_ALTIVEC(cpu_flags) ? 8 : 1;
+ PPC_ALTIVEC(cpu_flags) ? 8 :
+ have_neon(cpu_flags) ? 4 : 1;
if ((ret = initFilter(&c->hLumFilter, &c->hLumFilterPos,
&c->hLumFilterSize, c->lumXInc,
return vec;
}
+/**
+ * Allocate and return a vector with length coefficients, all
+ * with the same value c.
+ */
+#if !FF_API_SWS_VECTOR
+static
+#endif
SwsVector *sws_getConstVec(double c, int length)
{
int i;
return vec;
}
+/**
+ * Allocate and return a vector with just one coefficient, with
+ * value 1.0.
+ */
+#if !FF_API_SWS_VECTOR
+static
+#endif
SwsVector *sws_getIdentityVec(void)
{
return sws_getConstVec(1.0, 1);
sws_scaleVec(a, height / sws_dcVec(a));
}
+#if FF_API_SWS_VECTOR
static SwsVector *sws_getConvVec(SwsVector *a, SwsVector *b)
{
int length = a->length + b->length - 1;
return vec;
}
+#endif
static SwsVector *sws_sumVec(SwsVector *a, SwsVector *b)
{
return vec;
}
+#if FF_API_SWS_VECTOR
static SwsVector *sws_diffVec(SwsVector *a, SwsVector *b)
{
int length = FFMAX(a->length, b->length);
return vec;
}
+#endif
/* shift left / or right if "shift" is negative */
static SwsVector *sws_getShiftedVec(SwsVector *a, int shift)
return vec;
}
+#if !FF_API_SWS_VECTOR
+static
+#endif
void sws_shiftVec(SwsVector *a, int shift)
{
SwsVector *shifted = sws_getShiftedVec(a, shift);
av_free(shifted);
}
+#if !FF_API_SWS_VECTOR
+static
+#endif
void sws_addVec(SwsVector *a, SwsVector *b)
{
SwsVector *sum = sws_sumVec(a, b);
av_free(sum);
}
+#if FF_API_SWS_VECTOR
void sws_subVec(SwsVector *a, SwsVector *b)
{
SwsVector *diff = sws_diffVec(a, b);
return vec;
}
+#endif
+/**
+ * Print with av_log() a textual representation of the vector a
+ * if log_level <= av_log_level.
+ */
+#if !FF_API_SWS_VECTOR
+static
+#endif
void sws_printVec2(SwsVector *a, AVClass *log_ctx, int log_level)
{
int i;