#include "swscale_internal.h"
#include "swscale.h"
-DECLARE_ALIGNED(8, const uint8_t, dither_8x8_128)[8][8] = {
+DECLARE_ALIGNED(8, const uint8_t, ff_dither_8x8_128)[8][8] = {
{ 36, 68, 60, 92, 34, 66, 58, 90, },
{ 100, 4, 124, 28, 98, 2, 122, 26, },
{ 52, 84, 44, 76, 50, 82, 42, 74, },
{ 112, 16, 104, 8, 118, 22, 110, 14, },
};
-DECLARE_ALIGNED(8, const uint8_t, ff_sws_pb_64)[8] = {
+DECLARE_ALIGNED(8, static const uint8_t, sws_pb_64)[8] = {
64, 64, 64, 64, 64, 64, 64, 64
};
int i;
int32_t *dst = (int32_t *) _dst;
const uint16_t *src = (const uint16_t *) _src;
- int bits = desc->comp[0].depth_minus1;
+ int bits = desc->comp[0].depth - 1;
int sh = bits - 4;
for (i = 0; i < dstW; i++) {
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(c->srcFormat);
int i;
const uint16_t *src = (const uint16_t *) _src;
- int sh = desc->comp[0].depth_minus1;
+ int sh = desc->comp[0].depth - 1;
for (i = 0; i < dstW; i++) {
int j;
} else if (c->readLumPlanar && !isAlpha) {
c->readLumPlanar(formatConvBuffer, src_in, srcW);
src = formatConvBuffer;
+ } else if (c->readAlpPlanar && isAlpha) {
+ c->readAlpPlanar(formatConvBuffer, src_in, srcW);
+ src = formatConvBuffer;
}
if (!c->hyscale_fast) {
if (DEBUG_SWSCALE_BUFFERS) \
av_log(c, AV_LOG_DEBUG, __VA_ARGS__)
-static int swScale(SwsContext *c, const uint8_t *src[],
+static int swscale(SwsContext *c, const uint8_t *src[],
int srcStride[], int srcSliceY,
int srcSliceH, uint8_t *dst[], int dstStride[])
{
srcStride[1] <<= c->vChrDrop;
srcStride[2] <<= c->vChrDrop;
- DEBUG_BUFFERS("swScale() %p[%d] %p[%d] %p[%d] %p[%d] -> %p[%d] %p[%d] %p[%d] %p[%d]\n",
+ DEBUG_BUFFERS("swscale() %p[%d] %p[%d] %p[%d] %p[%d] -> %p[%d] %p[%d] %p[%d] %p[%d]\n",
src[0], srcStride[0], src[1], srcStride[1],
src[2], srcStride[2], src[3], srcStride[3],
dst[0], dstStride[0], dst[1], dstStride[1],
}
if (!should_dither) {
- c->chrDither8 = c->lumDither8 = ff_sws_pb_64;
+ c->chrDither8 = c->lumDither8 = sws_pb_64;
}
lastDstY = dstY;
lastInLumBuf, lastInChrBuf);
#endif
if (should_dither) {
- c->chrDither8 = dither_8x8_128[chrDstY & 7];
- c->lumDither8 = dither_8x8_128[dstY & 7];
+ c->chrDither8 = ff_dither_8x8_128[chrDstY & 7];
+ c->lumDither8 = ff_dither_8x8_128[dstY & 7];
}
if (dstY >= dstH - 2) {
/* hmm looks like we can't use MMX here without overwriting
if (is9_OR_10BPS(dstFormat)) {
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(dstFormat);
fill_plane9or10(dst[3], dstStride[3], length, height, lastDstY,
- 255, desc->comp[3].depth_minus1 + 1,
- isBE(dstFormat));
+ 255, desc->comp[3].depth, isBE(dstFormat));
} else
fillPlane(dst[3], dstStride[3], length, height, lastDstY, 255);
}
return dstY - lastDstY;
}
-static av_cold void sws_init_swScale_c(SwsContext *c)
+static av_cold void sws_init_swscale(SwsContext *c)
{
enum AVPixelFormat srcFormat = c->srcFormat;
SwsFunc ff_getSwsFunc(SwsContext *c)
{
- sws_init_swScale_c(c);
+ sws_init_swscale(c);
- if (HAVE_MMX)
- ff_sws_init_swScale_mmx(c);
- if (HAVE_ALTIVEC)
- ff_sws_init_swScale_altivec(c);
+ if (ARCH_PPC)
+ ff_sws_init_swscale_ppc(c);
+ if (ARCH_X86)
+ ff_sws_init_swscale_x86(c);
- return swScale;
+ return swscale;
}