*/
/*
-tested special converters (most are tested actually but i didnt write it down ...)
+tested special converters (most are tested actually, but I did not write it down ...)
YV12 -> BGR16
YV12 -> YV12
BGR15 -> BGR16
#endif
#include "swscale.h"
#include "swscale_internal.h"
-#include "x86_cpu.h"
-#include "bswap.h"
#include "rgb2rgb.h"
+#include "libavutil/x86_cpu.h"
+#include "libavutil/bswap.h"
#include "libavcodec/opt.h"
#undef MOVNTQ
static volatile uint64_t attribute_used __attribute__((aligned(8))) g6Dither;
static volatile uint64_t attribute_used __attribute__((aligned(8))) r5Dither;
-static uint64_t __attribute__((aligned(8))) dither4[2]={
+const DECLARE_ALIGNED(8, uint64_t, ff_dither4[2]) = {
0x0103010301030103LL,
0x0200020002000200LL,};
-static uint64_t __attribute__((aligned(8))) dither8[2]={
+const DECLARE_ALIGNED(8, uint64_t, ff_dither8[2]) = {
0x0602060206020602LL,
0x0004000400040004LL,};
DECLARE_ASM_CONST(8, uint64_t, g15Mask)= 0x03E003E003E003E0LL;
DECLARE_ASM_CONST(8, uint64_t, r15Mask)= 0x7C007C007C007C00LL;
-DECLARE_ASM_CONST(8, uint64_t, M24A)= 0x00FF0000FF0000FFLL;
-DECLARE_ASM_CONST(8, uint64_t, M24B)= 0xFF0000FF0000FF00LL;
-DECLARE_ASM_CONST(8, uint64_t, M24C)= 0x0000FF0000FF0000LL;
+DECLARE_ALIGNED(8, const uint64_t, ff_M24A) = 0x00FF0000FF0000FFLL;
+DECLARE_ALIGNED(8, const uint64_t, ff_M24B) = 0xFF0000FF0000FF00LL;
+DECLARE_ALIGNED(8, const uint64_t, ff_M24C) = 0x0000FF0000FF0000LL;
#ifdef FAST_BGR2YV12
-DECLARE_ASM_CONST(8, uint64_t, bgr2YCoeff) = 0x000000210041000DULL;
-DECLARE_ASM_CONST(8, uint64_t, bgr2UCoeff) = 0x0000FFEEFFDC0038ULL;
-DECLARE_ASM_CONST(8, uint64_t, bgr2VCoeff) = 0x00000038FFD2FFF8ULL;
+DECLARE_ALIGNED(8, const uint64_t, ff_bgr2YCoeff) = 0x000000210041000DULL;
+DECLARE_ALIGNED(8, const uint64_t, ff_bgr2UCoeff) = 0x0000FFEEFFDC0038ULL;
+DECLARE_ALIGNED(8, const uint64_t, ff_bgr2VCoeff) = 0x00000038FFD2FFF8ULL;
#else
-DECLARE_ASM_CONST(8, uint64_t, bgr2YCoeff) = 0x000020E540830C8BULL;
-DECLARE_ASM_CONST(8, uint64_t, bgr2UCoeff) = 0x0000ED0FDAC23831ULL;
-DECLARE_ASM_CONST(8, uint64_t, bgr2VCoeff) = 0x00003831D0E6F6EAULL;
+DECLARE_ALIGNED(8, const uint64_t, ff_bgr2YCoeff) = 0x000020E540830C8BULL;
+DECLARE_ALIGNED(8, const uint64_t, ff_bgr2UCoeff) = 0x0000ED0FDAC23831ULL;
+DECLARE_ALIGNED(8, const uint64_t, ff_bgr2VCoeff) = 0x00003831D0E6F6EAULL;
#endif /* FAST_BGR2YV12 */
-DECLARE_ASM_CONST(8, uint64_t, bgr2YOffset) = 0x1010101010101010ULL;
-DECLARE_ASM_CONST(8, uint64_t, bgr2UVOffset) = 0x8080808080808080ULL;
-DECLARE_ASM_CONST(8, uint64_t, w1111) = 0x0001000100010001ULL;
+DECLARE_ALIGNED(8, const uint64_t, ff_bgr2YOffset) = 0x1010101010101010ULL;
+DECLARE_ALIGNED(8, const uint64_t, ff_bgr2UVOffset) = 0x8080808080808080ULL;
+DECLARE_ALIGNED(8, const uint64_t, ff_w1111) = 0x0001000100010001ULL;
#endif /* defined(ARCH_X86) */
// clipping helper table for C implementations:
#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
static const AVOption options[] = {
- { "sws_flags", "scaler/cpu flags", OFFSET(flags), FF_OPT_TYPE_FLAGS, DEFAULT, INT_MIN, INT_MAX, VE, "sws_flags" },
+ { "sws_flags", "scaler/cpu flags", OFFSET(flags), FF_OPT_TYPE_FLAGS, DEFAULT, 0, UINT_MAX, VE, "sws_flags" },
{ "fast_bilinear", "fast bilinear", 0, FF_OPT_TYPE_CONST, SWS_FAST_BILINEAR, INT_MIN, INT_MAX, VE, "sws_flags" },
{ "bilinear", "bilinear", 0, FF_OPT_TYPE_CONST, SWS_BILINEAR, INT_MIN, INT_MAX, VE, "sws_flags" },
{ "bicubic", "bicubic", 0, FF_OPT_TYPE_CONST, SWS_BICUBIC, INT_MIN, INT_MAX, VE, "sws_flags" },
#undef VE
#undef DEFAULT
-static AVClass sws_context_class = { "SWScaler", sws_context_to_name, options };
+static const AVClass sws_context_class = { "SWScaler", sws_context_to_name, options };
-char *sws_format_name(enum PixelFormat format)
+const char *sws_format_name(enum PixelFormat format)
{
switch (format) {
case PIX_FMT_YUV420P:
}
}
-#if defined(ARCH_X86) && defined (CONFIG_GPL)
-void in_asm_used_var_warning_killer()
-{
- volatile int i= bF8+bFC+w10+
- bm00001111+bm00000111+bm11111000+b16Mask+g16Mask+r16Mask+b15Mask+g15Mask+r15Mask+
- M24A+M24B+M24C+w02 + b5Dither+g5Dither+r5Dither+g6Dither+dither4[0]+dither8[0]+bm01010101;
- if (i) i=0;
-}
-#endif
-
static inline void yuv2yuvXinC(int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize,
int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize,
uint8_t *dest, uint8_t *uDest, uint8_t *vDest, int dstW, int chrDstW)
for (j=0; j<chrFilterSize; j++)
{
u += chrSrc[j][i] * chrFilter[j];
- v += chrSrc[j][i + 2048] * chrFilter[j];
+ v += chrSrc[j][i + VOFW] * chrFilter[j];
}
uDest[i]= av_clip_uint8(u>>19);
for (j=0; j<chrFilterSize; j++)
{
u += chrSrc[j][i] * chrFilter[j];
- v += chrSrc[j][i + 2048] * chrFilter[j];
+ v += chrSrc[j][i + VOFW] * chrFilter[j];
}
uDest[2*i]= av_clip_uint8(u>>19);
for (j=0; j<chrFilterSize; j++)
{
u += chrSrc[j][i] * chrFilter[j];
- v += chrSrc[j][i + 2048] * chrFilter[j];
+ v += chrSrc[j][i + VOFW] * chrFilter[j];
}
uDest[2*i]= av_clip_uint8(v>>19);
for (j=0; j<chrFilterSize; j++)\
{\
U += chrSrc[j][i] * chrFilter[j];\
- V += chrSrc[j][i+2048] * chrFilter[j];\
+ V += chrSrc[j][i+VOFW] * chrFilter[j];\
}\
Y1>>=19;\
Y2>>=19;\
int Y1= (buf0[i2 ]*yalpha1+buf1[i2 ]*yalpha)>>19; \
int Y2= (buf0[i2+1]*yalpha1+buf1[i2+1]*yalpha)>>19; \
int U= (uvbuf0[i ]*uvalpha1+uvbuf1[i ]*uvalpha)>>19; \
- int V= (uvbuf0[i+2048]*uvalpha1+uvbuf1[i+2048]*uvalpha)>>19; \
+ int V= (uvbuf0[i+VOFW]*uvalpha1+uvbuf1[i+VOFW]*uvalpha)>>19; \
#define YSCALE_YUV_2_RGB2_C(type) \
YSCALE_YUV_2_PACKED2_C\
int Y1= buf0[i2 ]>>7;\
int Y2= buf0[i2+1]>>7;\
int U= (uvbuf1[i ])>>7;\
- int V= (uvbuf1[i+2048])>>7;\
+ int V= (uvbuf1[i+VOFW])>>7;\
#define YSCALE_YUV_2_RGB1_C(type) \
YSCALE_YUV_2_PACKED1_C\
int Y1= buf0[i2 ]>>7;\
int Y2= buf0[i2+1]>>7;\
int U= (uvbuf0[i ] + uvbuf1[i ])>>8;\
- int V= (uvbuf0[i+2048] + uvbuf1[i+2048])>>8;\
+ int V= (uvbuf0[i+VOFW] + uvbuf1[i+VOFW])>>8;\
#define YSCALE_YUV_2_RGB1B_C(type) \
YSCALE_YUV_2_PACKED1B_C\
#include "swscale_template.c"
#endif
-#ifdef ARCH_POWERPC
#ifdef COMPILE_ALTIVEC
#undef RENAME
#define HAVE_ALTIVEC
#define RENAME(a) a ## _altivec
#include "swscale_template.c"
#endif
-#endif //ARCH_POWERPC
#if defined(ARCH_X86)
// End
"9: \n\t"
// "int $3 \n\t"
- "lea 0b, %0 \n\t"
- "lea 1b, %1 \n\t"
- "lea 2b, %2 \n\t"
+ "lea " LOCAL_MANGLE(0b) ", %0 \n\t"
+ "lea " LOCAL_MANGLE(1b) ", %1 \n\t"
+ "lea " LOCAL_MANGLE(2b) ", %2 \n\t"
"dec %1 \n\t"
"dec %2 \n\t"
"sub %0, %1 \n\t"
"sub %0, %2 \n\t"
- "lea 9b, %3 \n\t"
+ "lea " LOCAL_MANGLE(9b) ", %3 \n\t"
"sub %0, %3 \n\t"
// End
"9: \n\t"
// "int $3 \n\t"
- "lea 0b, %0 \n\t"
- "lea 1b, %1 \n\t"
- "lea 2b, %2 \n\t"
+ "lea " LOCAL_MANGLE(0b) ", %0 \n\t"
+ "lea " LOCAL_MANGLE(1b) ", %1 \n\t"
+ "lea " LOCAL_MANGLE(2b) ", %2 \n\t"
"dec %1 \n\t"
"dec %2 \n\t"
"sub %0, %1 \n\t"
"sub %0, %2 \n\t"
- "lea 9b, %3 \n\t"
+ "lea " LOCAL_MANGLE(9b) ", %3 \n\t"
"sub %0, %3 \n\t"
case 0x83: conv= rgb15to32; break;
case 0x84: conv= rgb16to32; break;
case 0x86: conv= rgb24to32; break;
- default: av_log(c, AV_LOG_ERROR, "swScaler: internal error %s -> %s converter\n",
+ default: av_log(c, AV_LOG_ERROR, "internal error %s -> %s converter\n",
sws_format_name(srcFormat), sws_format_name(dstFormat)); break;
}
}else if ( (isBGR(srcFormat) && isRGB(dstFormat))
case 0x84: conv= rgb16tobgr32; break;
case 0x86: conv= rgb24tobgr32; break;
case 0x88: conv= rgb32tobgr32; break;
- default: av_log(c, AV_LOG_ERROR, "swScaler: internal error %s -> %s converter\n",
+ default: av_log(c, AV_LOG_ERROR, "internal error %s -> %s converter\n",
sws_format_name(srcFormat), sws_format_name(dstFormat)); break;
}
}else{
- av_log(c, AV_LOG_ERROR, "swScaler: internal error %s -> %s converter\n",
+ av_log(c, AV_LOG_ERROR, "internal error %s -> %s converter\n",
sws_format_name(srcFormat), sws_format_name(dstFormat));
}
int y= srcSliceY;
int height= srcSliceH;
int i, j;
- uint16_t *srcPtr= src[0];
- uint16_t *dstPtr= dst[0] + dstStride[0]*y/2;
+ uint16_t *srcPtr= (uint16_t*)src[0];
+ uint16_t *dstPtr= (uint16_t*)(dst[0] + dstStride[0]*y/2);
for (i=0; i<height; i++)
{
for (j=0; j<length; j++) dstPtr[j] = bswap_16(srcPtr[j]);
if (!isSupportedIn(srcFormat))
{
- av_log(NULL, AV_LOG_ERROR, "swScaler: %s is not supported as input format\n", sws_format_name(srcFormat));
+ av_log(NULL, AV_LOG_ERROR, "swScaler: %s is not supported as input pixel format\n", sws_format_name(srcFormat));
return NULL;
}
if (!isSupportedOut(dstFormat))
{
- av_log(NULL, AV_LOG_ERROR, "swScaler: %s is not supported as output format\n", sws_format_name(dstFormat));
+ av_log(NULL, AV_LOG_ERROR, "swScaler: %s is not supported as output pixel format\n", sws_format_name(dstFormat));
return NULL;
}
srcW, srcH, dstW, dstH);
return NULL;
}
+ if(srcW > VOFW || dstW > VOFW){
+ av_log(NULL, AV_LOG_ERROR, "swScaler: Compile time max width is "AV_STRINGIFY(VOFW)" change VOF/VOFW and recompile\n");
+ return NULL;
+ }
if (!dstFilter) dstFilter= &dummyFilter;
if (!srcFilter) srcFilter= &dummyFilter;
if (c->swScale){
if (flags&SWS_PRINT_INFO)
- av_log(c, AV_LOG_INFO, "SwScaler: using unscaled %s -> %s special converter\n",
+ av_log(c, AV_LOG_INFO, "using unscaled %s -> %s special converter\n",
sws_format_name(srcFormat), sws_format_name(dstFormat));
return c;
}
if (!c->canMMX2BeUsed && dstW >=srcW && (srcW&15)==0 && (flags&SWS_FAST_BILINEAR))
{
if (flags&SWS_PRINT_INFO)
- av_log(c, AV_LOG_INFO, "SwScaler: output Width is not a multiple of 32 -> no MMX2 scaler\n");
+ av_log(c, AV_LOG_INFO, "output Width is not a multiple of 32 -> no MMX2 scaler\n");
}
if (usesHFilter) c->canMMX2BeUsed=0;
}
//Note we need at least one pixel more at the end because of the mmx code (just in case someone wanna replace the 4000/8000)
/* align at 16 bytes for AltiVec */
for (i=0; i<c->vLumBufSize; i++)
- c->lumPixBuf[i]= c->lumPixBuf[i+c->vLumBufSize]= av_mallocz(4000);
+ c->lumPixBuf[i]= c->lumPixBuf[i+c->vLumBufSize]= av_mallocz(VOF+1);
for (i=0; i<c->vChrBufSize; i++)
- c->chrPixBuf[i]= c->chrPixBuf[i+c->vChrBufSize]= av_malloc(8000);
+ c->chrPixBuf[i]= c->chrPixBuf[i+c->vChrBufSize]= av_malloc((VOF+1)*2);
//try to avoid drawing green stuff between the right end and the stride end
- for (i=0; i<c->vChrBufSize; i++) memset(c->chrPixBuf[i], 64, 8000);
+ for (i=0; i<c->vChrBufSize; i++) memset(c->chrPixBuf[i], 64, (VOF+1)*2);
+
+ assert(2*VOFW == VOF);
ASSERT(c->chrDstH <= dstH)
if (flags&SWS_PRINT_INFO)
{
#ifdef DITHER1XBPP
- char *dither= " dithered";
+ const char *dither= " dithered";
#else
- char *dither= "";
+ const char *dither= "";
#endif
if (flags&SWS_FAST_BILINEAR)
- av_log(c, AV_LOG_INFO, "SwScaler: FAST_BILINEAR scaler, ");
+ av_log(c, AV_LOG_INFO, "FAST_BILINEAR scaler, ");
else if (flags&SWS_BILINEAR)
- av_log(c, AV_LOG_INFO, "SwScaler: BILINEAR scaler, ");
+ av_log(c, AV_LOG_INFO, "BILINEAR scaler, ");
else if (flags&SWS_BICUBIC)
- av_log(c, AV_LOG_INFO, "SwScaler: BICUBIC scaler, ");
+ av_log(c, AV_LOG_INFO, "BICUBIC scaler, ");
else if (flags&SWS_X)
- av_log(c, AV_LOG_INFO, "SwScaler: Experimental scaler, ");
+ av_log(c, AV_LOG_INFO, "Experimental scaler, ");
else if (flags&SWS_POINT)
- av_log(c, AV_LOG_INFO, "SwScaler: Nearest Neighbor / POINT scaler, ");
+ av_log(c, AV_LOG_INFO, "Nearest Neighbor / POINT scaler, ");
else if (flags&SWS_AREA)
- av_log(c, AV_LOG_INFO, "SwScaler: Area Averageing scaler, ");
+ av_log(c, AV_LOG_INFO, "Area Averageing scaler, ");
else if (flags&SWS_BICUBLIN)
- av_log(c, AV_LOG_INFO, "SwScaler: luma BICUBIC / chroma BILINEAR scaler, ");
+ av_log(c, AV_LOG_INFO, "luma BICUBIC / chroma BILINEAR scaler, ");
else if (flags&SWS_GAUSS)
- av_log(c, AV_LOG_INFO, "SwScaler: Gaussian scaler, ");
+ av_log(c, AV_LOG_INFO, "Gaussian scaler, ");
else if (flags&SWS_SINC)
- av_log(c, AV_LOG_INFO, "SwScaler: Sinc scaler, ");
+ av_log(c, AV_LOG_INFO, "Sinc scaler, ");
else if (flags&SWS_LANCZOS)
- av_log(c, AV_LOG_INFO, "SwScaler: Lanczos scaler, ");
+ av_log(c, AV_LOG_INFO, "Lanczos scaler, ");
else if (flags&SWS_SPLINE)
- av_log(c, AV_LOG_INFO, "SwScaler: Bicubic spline scaler, ");
+ av_log(c, AV_LOG_INFO, "Bicubic spline scaler, ");
else
- av_log(c, AV_LOG_INFO, "SwScaler: ehh flags invalid?! ");
+ av_log(c, AV_LOG_INFO, "ehh flags invalid?! ");
if (dstFormat==PIX_FMT_BGR555 || dstFormat==PIX_FMT_BGR565)
av_log(c, AV_LOG_INFO, "from %s to%s %s ",
if (flags & SWS_CPU_CAPS_MMX)
{
if (c->canMMX2BeUsed && (flags&SWS_FAST_BILINEAR))
- av_log(c, AV_LOG_VERBOSE, "SwScaler: using FAST_BILINEAR MMX2 scaler for horizontal scaling\n");
+ av_log(c, AV_LOG_VERBOSE, "using FAST_BILINEAR MMX2 scaler for horizontal scaling\n");
else
{
if (c->hLumFilterSize==4)
- av_log(c, AV_LOG_VERBOSE, "SwScaler: using 4-tap MMX scaler for horizontal luminance scaling\n");
+ av_log(c, AV_LOG_VERBOSE, "using 4-tap MMX scaler for horizontal luminance scaling\n");
else if (c->hLumFilterSize==8)
- av_log(c, AV_LOG_VERBOSE, "SwScaler: using 8-tap MMX scaler for horizontal luminance scaling\n");
+ av_log(c, AV_LOG_VERBOSE, "using 8-tap MMX scaler for horizontal luminance scaling\n");
else
- av_log(c, AV_LOG_VERBOSE, "SwScaler: using n-tap MMX scaler for horizontal luminance scaling\n");
+ av_log(c, AV_LOG_VERBOSE, "using n-tap MMX scaler for horizontal luminance scaling\n");
if (c->hChrFilterSize==4)
- av_log(c, AV_LOG_VERBOSE, "SwScaler: using 4-tap MMX scaler for horizontal chrominance scaling\n");
+ av_log(c, AV_LOG_VERBOSE, "using 4-tap MMX scaler for horizontal chrominance scaling\n");
else if (c->hChrFilterSize==8)
- av_log(c, AV_LOG_VERBOSE, "SwScaler: using 8-tap MMX scaler for horizontal chrominance scaling\n");
+ av_log(c, AV_LOG_VERBOSE, "using 8-tap MMX scaler for horizontal chrominance scaling\n");
else
- av_log(c, AV_LOG_VERBOSE, "SwScaler: using n-tap MMX scaler for horizontal chrominance scaling\n");
+ av_log(c, AV_LOG_VERBOSE, "using n-tap MMX scaler for horizontal chrominance scaling\n");
}
}
else
{
#if defined(ARCH_X86)
- av_log(c, AV_LOG_VERBOSE, "SwScaler: using X86-Asm scaler for horizontal scaling\n");
+ av_log(c, AV_LOG_VERBOSE, "using X86-Asm scaler for horizontal scaling\n");
#else
if (flags & SWS_FAST_BILINEAR)
- av_log(c, AV_LOG_VERBOSE, "SwScaler: using FAST_BILINEAR C scaler for horizontal scaling\n");
+ av_log(c, AV_LOG_VERBOSE, "using FAST_BILINEAR C scaler for horizontal scaling\n");
else
- av_log(c, AV_LOG_VERBOSE, "SwScaler: using C scaler for horizontal scaling\n");
+ av_log(c, AV_LOG_VERBOSE, "using C scaler for horizontal scaling\n");
#endif
}
if (isPlanarYUV(dstFormat))
{
if (c->vLumFilterSize==1)
- av_log(c, AV_LOG_VERBOSE, "SwScaler: using 1-tap %s \"scaler\" for vertical scaling (YV12 like)\n", (flags & SWS_CPU_CAPS_MMX) ? "MMX" : "C");
+ av_log(c, AV_LOG_VERBOSE, "using 1-tap %s \"scaler\" for vertical scaling (YV12 like)\n", (flags & SWS_CPU_CAPS_MMX) ? "MMX" : "C");
else
- av_log(c, AV_LOG_VERBOSE, "SwScaler: using n-tap %s scaler for vertical scaling (YV12 like)\n", (flags & SWS_CPU_CAPS_MMX) ? "MMX" : "C");
+ av_log(c, AV_LOG_VERBOSE, "using n-tap %s scaler for vertical scaling (YV12 like)\n", (flags & SWS_CPU_CAPS_MMX) ? "MMX" : "C");
}
else
{
if (c->vLumFilterSize==1 && c->vChrFilterSize==2)
- av_log(c, AV_LOG_VERBOSE, "SwScaler: using 1-tap %s \"scaler\" for vertical luminance scaling (BGR)\n"
- "SwScaler: 2-tap scaler for vertical chrominance scaling (BGR)\n", (flags & SWS_CPU_CAPS_MMX) ? "MMX" : "C");
+ av_log(c, AV_LOG_VERBOSE, "using 1-tap %s \"scaler\" for vertical luminance scaling (BGR)\n"
+ " 2-tap scaler for vertical chrominance scaling (BGR)\n", (flags & SWS_CPU_CAPS_MMX) ? "MMX" : "C");
else if (c->vLumFilterSize==2 && c->vChrFilterSize==2)
- av_log(c, AV_LOG_VERBOSE, "SwScaler: using 2-tap linear %s scaler for vertical scaling (BGR)\n", (flags & SWS_CPU_CAPS_MMX) ? "MMX" : "C");
+ av_log(c, AV_LOG_VERBOSE, "using 2-tap linear %s scaler for vertical scaling (BGR)\n", (flags & SWS_CPU_CAPS_MMX) ? "MMX" : "C");
else
- av_log(c, AV_LOG_VERBOSE, "SwScaler: using n-tap %s scaler for vertical scaling (BGR)\n", (flags & SWS_CPU_CAPS_MMX) ? "MMX" : "C");
+ av_log(c, AV_LOG_VERBOSE, "using n-tap %s scaler for vertical scaling (BGR)\n", (flags & SWS_CPU_CAPS_MMX) ? "MMX" : "C");
}
if (dstFormat==PIX_FMT_BGR24)
- av_log(c, AV_LOG_VERBOSE, "SwScaler: using %s YV12->BGR24 Converter\n",
+ av_log(c, AV_LOG_VERBOSE, "using %s YV12->BGR24 Converter\n",
(flags & SWS_CPU_CAPS_MMX2) ? "MMX2" : ((flags & SWS_CPU_CAPS_MMX) ? "MMX" : "C"));
else if (dstFormat==PIX_FMT_RGB32)
- av_log(c, AV_LOG_VERBOSE, "SwScaler: using %s YV12->BGR32 Converter\n", (flags & SWS_CPU_CAPS_MMX) ? "MMX" : "C");
+ av_log(c, AV_LOG_VERBOSE, "using %s YV12->BGR32 Converter\n", (flags & SWS_CPU_CAPS_MMX) ? "MMX" : "C");
else if (dstFormat==PIX_FMT_BGR565)
- av_log(c, AV_LOG_VERBOSE, "SwScaler: using %s YV12->BGR16 Converter\n", (flags & SWS_CPU_CAPS_MMX) ? "MMX" : "C");
+ av_log(c, AV_LOG_VERBOSE, "using %s YV12->BGR16 Converter\n", (flags & SWS_CPU_CAPS_MMX) ? "MMX" : "C");
else if (dstFormat==PIX_FMT_BGR555)
- av_log(c, AV_LOG_VERBOSE, "SwScaler: using %s YV12->BGR15 Converter\n", (flags & SWS_CPU_CAPS_MMX) ? "MMX" : "C");
+ av_log(c, AV_LOG_VERBOSE, "using %s YV12->BGR15 Converter\n", (flags & SWS_CPU_CAPS_MMX) ? "MMX" : "C");
- av_log(c, AV_LOG_VERBOSE, "SwScaler: %dx%d -> %dx%d\n", srcW, srcH, dstW, dstH);
+ av_log(c, AV_LOG_VERBOSE, "%dx%d -> %dx%d\n", srcW, srcH, dstW, dstH);
}
if (flags & SWS_PRINT_INFO)
{
- av_log(c, AV_LOG_DEBUG, "SwScaler:Lum srcW=%d srcH=%d dstW=%d dstH=%d xInc=%d yInc=%d\n",
+ av_log(c, AV_LOG_DEBUG, "Lum srcW=%d srcH=%d dstW=%d dstH=%d xInc=%d yInc=%d\n",
c->srcW, c->srcH, c->dstW, c->dstH, c->lumXInc, c->lumYInc);
- av_log(c, AV_LOG_DEBUG, "SwScaler:Chr srcW=%d srcH=%d dstW=%d dstH=%d xInc=%d yInc=%d\n",
+ av_log(c, AV_LOG_DEBUG, "Chr srcW=%d srcH=%d dstW=%d dstH=%d xInc=%d yInc=%d\n",
c->chrSrcW, c->chrSrcH, c->chrDstW, c->chrDstH, c->chrXInc, c->chrYInc);
}
uint8_t* src2[4]= {src[0], src[1], src[2]};
uint32_t pal[256];
if (c->sliceDir == 0 && srcSliceY != 0 && srcSliceY + srcSliceH != c->srcH) {
- av_log(c, AV_LOG_ERROR, "swScaler: slices start in the middle!\n");
+ av_log(c, AV_LOG_ERROR, "Slices start in the middle!\n");
return 0;
}
if (c->sliceDir == 0) {
int v= av_clip_uint8(((RV*r + GV*g + BV*b)>>RGB2YUV_SHIFT) + 128);
pal[i]= y + (u<<8) + (v<<16);
}
- src2[1]= pal;
+ src2[1]= (uint8_t*)pal;
}
// copy strides, so they can safely be modified