Commit 9b734d44 authored by Ramiro Polla's avatar Ramiro Polla

Indent libswscale:

- Use 4 spaces throughout for indentation;
- Fix inconsistent indentation;
- Indent function calls and declarations aligning arguments on multiple lines
  to the column after the opening parentheses;
- Align asm code to the column 4 spaces after the call to __asm__();
- Align cases in switch statements to the same column as "switch".

Originally committed as revision 29522 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
parent 2513b2b4
...@@ -41,17 +41,17 @@ static char *args_parse(int argc, char *argv[]) ...@@ -41,17 +41,17 @@ static char *args_parse(int argc, char *argv[])
while ((o = getopt(argc, argv, "m23")) != -1) { while ((o = getopt(argc, argv, "m23")) != -1) {
switch (o) { switch (o) {
case 'm': case 'm':
cpu_caps |= SWS_CPU_CAPS_MMX; cpu_caps |= SWS_CPU_CAPS_MMX;
break; break;
case '2': case '2':
cpu_caps |= SWS_CPU_CAPS_MMX2; cpu_caps |= SWS_CPU_CAPS_MMX2;
break; break;
case '3': case '3':
cpu_caps |= SWS_CPU_CAPS_3DNOW; cpu_caps |= SWS_CPU_CAPS_3DNOW;
break; break;
default: default:
av_log(NULL, AV_LOG_ERROR, "Unknown option %c\n", o); av_log(NULL, AV_LOG_ERROR, "Unknown option %c\n", o);
} }
} }
......
...@@ -855,13 +855,13 @@ ff_yuv2packedX_altivec(SwsContext *c, ...@@ -855,13 +855,13 @@ ff_yuv2packedX_altivec(SwsContext *c,
B = vec_packclp (B0,B1); B = vec_packclp (B0,B1);
switch(c->dstFormat) { switch(c->dstFormat) {
case PIX_FMT_ABGR: out_abgr (R,G,B,out); break; case PIX_FMT_ABGR: out_abgr (R,G,B,out); break;
case PIX_FMT_BGRA: out_bgra (R,G,B,out); break; case PIX_FMT_BGRA: out_bgra (R,G,B,out); break;
case PIX_FMT_RGBA: out_rgba (R,G,B,out); break; case PIX_FMT_RGBA: out_rgba (R,G,B,out); break;
case PIX_FMT_ARGB: out_argb (R,G,B,out); break; case PIX_FMT_ARGB: out_argb (R,G,B,out); break;
case PIX_FMT_RGB24: out_rgb24 (R,G,B,out); break; case PIX_FMT_RGB24: out_rgb24 (R,G,B,out); break;
case PIX_FMT_BGR24: out_bgr24 (R,G,B,out); break; case PIX_FMT_BGR24: out_bgr24 (R,G,B,out); break;
default: default:
{ {
/* If this is reached, the caller should have called yuv2packedXinC /* If this is reached, the caller should have called yuv2packedXinC
instead. */ instead. */
...@@ -934,17 +934,17 @@ ff_yuv2packedX_altivec(SwsContext *c, ...@@ -934,17 +934,17 @@ ff_yuv2packedX_altivec(SwsContext *c,
nout = (vector unsigned char *)scratch; nout = (vector unsigned char *)scratch;
switch(c->dstFormat) { switch(c->dstFormat) {
case PIX_FMT_ABGR: out_abgr (R,G,B,nout); break; case PIX_FMT_ABGR: out_abgr (R,G,B,nout); break;
case PIX_FMT_BGRA: out_bgra (R,G,B,nout); break; case PIX_FMT_BGRA: out_bgra (R,G,B,nout); break;
case PIX_FMT_RGBA: out_rgba (R,G,B,nout); break; case PIX_FMT_RGBA: out_rgba (R,G,B,nout); break;
case PIX_FMT_ARGB: out_argb (R,G,B,nout); break; case PIX_FMT_ARGB: out_argb (R,G,B,nout); break;
case PIX_FMT_RGB24: out_rgb24 (R,G,B,nout); break; case PIX_FMT_RGB24: out_rgb24 (R,G,B,nout); break;
case PIX_FMT_BGR24: out_bgr24 (R,G,B,nout); break; case PIX_FMT_BGR24: out_bgr24 (R,G,B,nout); break;
default: default:
/* Unreachable, I think. */ /* Unreachable, I think. */
av_log(c, AV_LOG_ERROR, "altivec_yuv2packedX doesn't support %s output\n", av_log(c, AV_LOG_ERROR, "altivec_yuv2packedX doesn't support %s output\n",
sws_format_name(c->dstFormat)); sws_format_name(c->dstFormat));
return; return;
} }
memcpy (&((uint32_t*)dest)[i], scratch, (dstW-i)/4); memcpy (&((uint32_t*)dest)[i], scratch, (dstW-i)/4);
......
...@@ -88,17 +88,17 @@ void (*yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2, const uint8_t *sr ...@@ -88,17 +88,17 @@ void (*yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2, const uint8_t *sr
long srcStride1, long srcStride2, long srcStride1, long srcStride2,
long srcStride3, long dstStride); long srcStride3, long dstStride);
void (*uyvytoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, void (*uyvytoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
long width, long height, long width, long height,
long lumStride, long chromStride, long srcStride); long lumStride, long chromStride, long srcStride);
void (*uyvytoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, void (*uyvytoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
long width, long height, long width, long height,
long lumStride, long chromStride, long srcStride); long lumStride, long chromStride, long srcStride);
void (*yuyvtoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, void (*yuyvtoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
long width, long height, long width, long height,
long lumStride, long chromStride, long srcStride); long lumStride, long chromStride, long srcStride);
void (*yuyvtoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, void (*yuyvtoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
long width, long height, long width, long height,
long lumStride, long chromStride, long srcStride); long lumStride, long chromStride, long srcStride);
#if ARCH_X86 && CONFIG_GPL #if ARCH_X86 && CONFIG_GPL
......
...@@ -144,17 +144,17 @@ extern void (*yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2, const uint ...@@ -144,17 +144,17 @@ extern void (*yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2, const uint
extern void (*uyvytoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, extern void (*uyvytoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
long width, long height, long width, long height,
long lumStride, long chromStride, long srcStride); long lumStride, long chromStride, long srcStride);
extern void (*uyvytoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, extern void (*uyvytoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
long width, long height, long width, long height,
long lumStride, long chromStride, long srcStride); long lumStride, long chromStride, long srcStride);
extern void (*yuyvtoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, extern void (*yuyvtoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
long width, long height, long width, long height,
long lumStride, long chromStride, long srcStride); long lumStride, long chromStride, long srcStride);
extern void (*yuyvtoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, extern void (*yuyvtoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
long width, long height, long width, long height,
long lumStride, long chromStride, long srcStride); long lumStride, long chromStride, long srcStride);
void sws_rgb2rgb_init(int flags); void sws_rgb2rgb_init(int flags);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -83,105 +83,105 @@ ...@@ -83,105 +83,105 @@
// FIXME: must be changed to set alpha to 255 instead of 0 // FIXME: must be changed to set alpha to 255 instead of 0
static int vis_420P_ARGB32(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, static int vis_420P_ARGB32(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[]){ int srcSliceH, uint8_t* dst[], int dstStride[]){
int y, out1, out2, out3, out4, out5, out6; int y, out1, out2, out3, out4, out5, out6;
for(y=0;y < srcSliceH;++y) { for(y=0;y < srcSliceH;++y) {
__asm__ volatile ( __asm__ volatile (
YUV2RGB_INIT YUV2RGB_INIT
"wr %%g0, 0xd2, %%asi \n\t" /* ASI_FL16_P */ "wr %%g0, 0xd2, %%asi \n\t" /* ASI_FL16_P */
"1: \n\t" "1: \n\t"
"ldda [%1] %%asi, %%f2 \n\t" "ldda [%1] %%asi, %%f2 \n\t"
"ldda [%1+2] %%asi, %%f18 \n\t" "ldda [%1+2] %%asi, %%f18 \n\t"
"ldda [%2] %%asi, %%f4 \n\t" "ldda [%2] %%asi, %%f4 \n\t"
"ldda [%2+2] %%asi, %%f20 \n\t" "ldda [%2+2] %%asi, %%f20 \n\t"
"ld [%0], %%f0 \n\t" "ld [%0], %%f0 \n\t"
"ld [%0+4], %%f16 \n\t" "ld [%0+4], %%f16 \n\t"
"fpmerge %%f3, %%f3, %%f2 \n\t" "fpmerge %%f3, %%f3, %%f2 \n\t"
"fpmerge %%f19, %%f19, %%f18 \n\t" "fpmerge %%f19, %%f19, %%f18 \n\t"
"fpmerge %%f5, %%f5, %%f4 \n\t" "fpmerge %%f5, %%f5, %%f4 \n\t"
"fpmerge %%f21, %%f21, %%f20 \n\t" "fpmerge %%f21, %%f21, %%f20 \n\t"
YUV2RGB_KERNEL YUV2RGB_KERNEL
"fzero %%f0 \n\t" "fzero %%f0 \n\t"
"fpmerge %%f4, %%f6, %%f8 \n\t" // r,b,t1 "fpmerge %%f4, %%f6, %%f8 \n\t" // r,b,t1
"fpmerge %%f20, %%f22, %%f24 \n\t" // r,b,t1 "fpmerge %%f20, %%f22, %%f24 \n\t" // r,b,t1
"fpmerge %%f0, %%f2, %%f10 \n\t" // 0,g,t2 "fpmerge %%f0, %%f2, %%f10 \n\t" // 0,g,t2
"fpmerge %%f0, %%f18, %%f26 \n\t" // 0,g,t2 "fpmerge %%f0, %%f18, %%f26 \n\t" // 0,g,t2
"fpmerge %%f10, %%f8, %%f4 \n\t" // t2,t1,msb "fpmerge %%f10, %%f8, %%f4 \n\t" // t2,t1,msb
"fpmerge %%f26, %%f24, %%f20 \n\t" // t2,t1,msb "fpmerge %%f26, %%f24, %%f20 \n\t" // t2,t1,msb
"fpmerge %%f11, %%f9, %%f6 \n\t" // t2,t1,lsb "fpmerge %%f11, %%f9, %%f6 \n\t" // t2,t1,lsb
"fpmerge %%f27, %%f25, %%f22 \n\t" // t2,t1,lsb "fpmerge %%f27, %%f25, %%f22 \n\t" // t2,t1,lsb
"std %%f4, [%3] \n\t" "std %%f4, [%3] \n\t"
"std %%f20, [%3+16] \n\t" "std %%f20, [%3+16] \n\t"
"std %%f6, [%3+8] \n\t" "std %%f6, [%3+8] \n\t"
"std %%f22, [%3+24] \n\t" "std %%f22, [%3+24] \n\t"
"add %0, 8, %0 \n\t" "add %0, 8, %0 \n\t"
"add %1, 4, %1 \n\t" "add %1, 4, %1 \n\t"
"add %2, 4, %2 \n\t" "add %2, 4, %2 \n\t"
"subcc %4, 8, %4 \n\t" "subcc %4, 8, %4 \n\t"
"bne 1b \n\t" "bne 1b \n\t"
"add %3, 32, %3 \n\t" //delay slot "add %3, 32, %3 \n\t" //delay slot
: "=r" (out1), "=r" (out2), "=r" (out3), "=r" (out4), "=r" (out5), "=r" (out6) : "=r" (out1), "=r" (out2), "=r" (out3), "=r" (out4), "=r" (out5), "=r" (out6)
: "0" (src[0]+(y+srcSliceY)*srcStride[0]), "1" (src[1]+((y+srcSliceY)>>1)*srcStride[1]), : "0" (src[0]+(y+srcSliceY)*srcStride[0]), "1" (src[1]+((y+srcSliceY)>>1)*srcStride[1]),
"2" (src[2]+((y+srcSliceY)>>1)*srcStride[2]), "3" (dst[0]+(y+srcSliceY)*dstStride[0]), "2" (src[2]+((y+srcSliceY)>>1)*srcStride[2]), "3" (dst[0]+(y+srcSliceY)*dstStride[0]),
"4" (c->dstW), "4" (c->dstW),
"5" (c->sparc_coeffs) "5" (c->sparc_coeffs)
); );
} }
return srcSliceH; return srcSliceH;
} }
// FIXME: must be changed to set alpha to 255 instead of 0 // FIXME: must be changed to set alpha to 255 instead of 0
static int vis_422P_ARGB32(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, static int vis_422P_ARGB32(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[]){ int srcSliceH, uint8_t* dst[], int dstStride[]){
int y, out1, out2, out3, out4, out5, out6; int y, out1, out2, out3, out4, out5, out6;
for(y=0;y < srcSliceH;++y) { for(y=0;y < srcSliceH;++y) {
__asm__ volatile ( __asm__ volatile (
YUV2RGB_INIT YUV2RGB_INIT
"wr %%g0, 0xd2, %%asi \n\t" /* ASI_FL16_P */ "wr %%g0, 0xd2, %%asi \n\t" /* ASI_FL16_P */
"1: \n\t" "1: \n\t"
"ldda [%1] %%asi, %%f2 \n\t" "ldda [%1] %%asi, %%f2 \n\t"
"ldda [%1+2] %%asi, %%f18 \n\t" "ldda [%1+2] %%asi, %%f18 \n\t"
"ldda [%2] %%asi, %%f4 \n\t" "ldda [%2] %%asi, %%f4 \n\t"
"ldda [%2+2] %%asi, %%f20 \n\t" "ldda [%2+2] %%asi, %%f20 \n\t"
"ld [%0], %%f0 \n\t" "ld [%0], %%f0 \n\t"
"ld [%0+4], %%f16 \n\t" "ld [%0+4], %%f16 \n\t"
"fpmerge %%f3, %%f3, %%f2 \n\t" "fpmerge %%f3, %%f3, %%f2 \n\t"
"fpmerge %%f19, %%f19, %%f18 \n\t" "fpmerge %%f19, %%f19, %%f18 \n\t"
"fpmerge %%f5, %%f5, %%f4 \n\t" "fpmerge %%f5, %%f5, %%f4 \n\t"
"fpmerge %%f21, %%f21, %%f20 \n\t" "fpmerge %%f21, %%f21, %%f20 \n\t"
YUV2RGB_KERNEL YUV2RGB_KERNEL
"fzero %%f0 \n\t" "fzero %%f0 \n\t"
"fpmerge %%f4, %%f6, %%f8 \n\t" // r,b,t1 "fpmerge %%f4, %%f6, %%f8 \n\t" // r,b,t1
"fpmerge %%f20, %%f22, %%f24 \n\t" // r,b,t1 "fpmerge %%f20, %%f22, %%f24 \n\t" // r,b,t1
"fpmerge %%f0, %%f2, %%f10 \n\t" // 0,g,t2 "fpmerge %%f0, %%f2, %%f10 \n\t" // 0,g,t2
"fpmerge %%f0, %%f18, %%f26 \n\t" // 0,g,t2 "fpmerge %%f0, %%f18, %%f26 \n\t" // 0,g,t2
"fpmerge %%f10, %%f8, %%f4 \n\t" // t2,t1,msb "fpmerge %%f10, %%f8, %%f4 \n\t" // t2,t1,msb
"fpmerge %%f26, %%f24, %%f20 \n\t" // t2,t1,msb "fpmerge %%f26, %%f24, %%f20 \n\t" // t2,t1,msb
"fpmerge %%f11, %%f9, %%f6 \n\t" // t2,t1,lsb "fpmerge %%f11, %%f9, %%f6 \n\t" // t2,t1,lsb
"fpmerge %%f27, %%f25, %%f22 \n\t" // t2,t1,lsb "fpmerge %%f27, %%f25, %%f22 \n\t" // t2,t1,lsb
"std %%f4, [%3] \n\t" "std %%f4, [%3] \n\t"
"std %%f20, [%3+16] \n\t" "std %%f20, [%3+16] \n\t"
"std %%f6, [%3+8] \n\t" "std %%f6, [%3+8] \n\t"
"std %%f22, [%3+24] \n\t" "std %%f22, [%3+24] \n\t"
"add %0, 8, %0 \n\t" "add %0, 8, %0 \n\t"
"add %1, 4, %1 \n\t" "add %1, 4, %1 \n\t"
"add %2, 4, %2 \n\t" "add %2, 4, %2 \n\t"
"subcc %4, 8, %4 \n\t" "subcc %4, 8, %4 \n\t"
"bne 1b \n\t" "bne 1b \n\t"
"add %3, 32, %3 \n\t" //delay slot "add %3, 32, %3 \n\t" //delay slot
: "=r" (out1), "=r" (out2), "=r" (out3), "=r" (out4), "=r" (out5), "=r" (out6) : "=r" (out1), "=r" (out2), "=r" (out3), "=r" (out4), "=r" (out5), "=r" (out6)
: "0" (src[0]+(y+srcSliceY)*srcStride[0]), "1" (src[1]+(y+srcSliceY)*srcStride[1]), : "0" (src[0]+(y+srcSliceY)*srcStride[0]), "1" (src[1]+(y+srcSliceY)*srcStride[1]),
"2" (src[2]+(y+srcSliceY)*srcStride[2]), "3" (dst[0]+(y+srcSliceY)*dstStride[0]), "2" (src[2]+(y+srcSliceY)*srcStride[2]), "3" (dst[0]+(y+srcSliceY)*dstStride[0]),
"4" (c->dstW), "4" (c->dstW),
"5" (c->sparc_coeffs) "5" (c->sparc_coeffs)
); );
} }
return srcSliceH; return srcSliceH;
} }
SwsFunc ff_yuv2rgb_init_vis(SwsContext *c){ SwsFunc ff_yuv2rgb_init_vis(SwsContext *c){
......
...@@ -366,112 +366,112 @@ DECLARE_ALIGNED(8, const uint8_t, dither_8x8_220[8][8])={ ...@@ -366,112 +366,112 @@ DECLARE_ALIGNED(8, const uint8_t, dither_8x8_220[8][8])={
const char *sws_format_name(enum PixelFormat format) const char *sws_format_name(enum PixelFormat format)
{ {
switch (format) { switch (format) {
case PIX_FMT_YUV420P: case PIX_FMT_YUV420P:
return "yuv420p"; return "yuv420p";
case PIX_FMT_YUVA420P: case PIX_FMT_YUVA420P:
return "yuva420p"; return "yuva420p";
case PIX_FMT_YUYV422: case PIX_FMT_YUYV422:
return "yuyv422"; return "yuyv422";
case PIX_FMT_RGB24: case PIX_FMT_RGB24:
return "rgb24"; return "rgb24";
case PIX_FMT_BGR24: case PIX_FMT_BGR24:
return "bgr24"; return "bgr24";
case PIX_FMT_YUV422P: case PIX_FMT_YUV422P:
return "yuv422p"; return "yuv422p";
case PIX_FMT_YUV444P: case PIX_FMT_YUV444P:
return "yuv444p"; return "yuv444p";
case PIX_FMT_RGB32: case PIX_FMT_RGB32:
return "rgb32"; return "rgb32";
case PIX_FMT_YUV410P: case PIX_FMT_YUV410P:
return "yuv410p"; return "yuv410p";
case PIX_FMT_YUV411P: case PIX_FMT_YUV411P:
return "yuv411p"; return "yuv411p";
case PIX_FMT_RGB565: case PIX_FMT_RGB565:
return "rgb565"; return "rgb565";
case PIX_FMT_RGB555: case PIX_FMT_RGB555:
return "rgb555"; return "rgb555";
case PIX_FMT_GRAY16BE: case PIX_FMT_GRAY16BE:
return "gray16be"; return "gray16be";
case PIX_FMT_GRAY16LE: case PIX_FMT_GRAY16LE:
return "gray16le"; return "gray16le";
case PIX_FMT_GRAY8: case PIX_FMT_GRAY8:
return "gray8"; return "gray8";
case PIX_FMT_MONOWHITE: case PIX_FMT_MONOWHITE:
return "mono white"; return "mono white";
case PIX_FMT_MONOBLACK: case PIX_FMT_MONOBLACK:
return "mono black"; return "mono black";
case PIX_FMT_PAL8: case PIX_FMT_PAL8:
return "Palette"; return "Palette";
case PIX_FMT_YUVJ420P: case PIX_FMT_YUVJ420P:
return "yuvj420p"; return "yuvj420p";
case PIX_FMT_YUVJ422P: case PIX_FMT_YUVJ422P:
return "yuvj422p"; return "yuvj422p";
case PIX_FMT_YUVJ444P: case PIX_FMT_YUVJ444P:
return "yuvj444p"; return "yuvj444p";
case PIX_FMT_XVMC_MPEG2_MC: case PIX_FMT_XVMC_MPEG2_MC:
return "xvmc_mpeg2_mc"; return "xvmc_mpeg2_mc";
case PIX_FMT_XVMC_MPEG2_IDCT: case PIX_FMT_XVMC_MPEG2_IDCT:
return "xvmc_mpeg2_idct"; return "xvmc_mpeg2_idct";
case PIX_FMT_UYVY422: case PIX_FMT_UYVY422:
return "uyvy422"; return "uyvy422";
case PIX_FMT_UYYVYY411: case PIX_FMT_UYYVYY411:
return "uyyvyy411"; return "uyyvyy411";
case PIX_FMT_RGB32_1: case PIX_FMT_RGB32_1:
return "rgb32x"; return "rgb32x";
case PIX_FMT_BGR32_1: case PIX_FMT_BGR32_1:
return "bgr32x"; return "bgr32x";
case PIX_FMT_BGR32: case PIX_FMT_BGR32:
return "bgr32"; return "bgr32";
case PIX_FMT_BGR565: case PIX_FMT_BGR565:
return "bgr565"; return "bgr565";
case PIX_FMT_BGR555: case PIX_FMT_BGR555:
return "bgr555"; return "bgr555";
case PIX_FMT_BGR8: case PIX_FMT_BGR8:
return "bgr8"; return "bgr8";
case PIX_FMT_BGR4: case PIX_FMT_BGR4:
return "bgr4"; return "bgr4";
case PIX_FMT_BGR4_BYTE: case PIX_FMT_BGR4_BYTE:
return "bgr4 byte"; return "bgr4 byte";
case PIX_FMT_RGB8: case PIX_FMT_RGB8:
return "rgb8"; return "rgb8";
case PIX_FMT_RGB4: case PIX_FMT_RGB4:
return "rgb4"; return "rgb4";
case PIX_FMT_RGB4_BYTE: case PIX_FMT_RGB4_BYTE:
return "rgb4 byte"; return "rgb4 byte";
case PIX_FMT_RGB48BE: case PIX_FMT_RGB48BE:
return "rgb48be"; return "rgb48be";
case PIX_FMT_RGB48LE: case PIX_FMT_RGB48LE:
return "rgb48le"; return "rgb48le";
case PIX_FMT_NV12: case PIX_FMT_NV12:
return "nv12"; return "nv12";
case PIX_FMT_NV21: case PIX_FMT_NV21:
return "nv21"; return "nv21";
case PIX_FMT_YUV440P: case PIX_FMT_YUV440P:
return "yuv440p"; return "yuv440p";
case PIX_FMT_VDPAU_H264: case PIX_FMT_VDPAU_H264:
return "vdpau_h264"; return "vdpau_h264";
case PIX_FMT_VDPAU_MPEG1: case PIX_FMT_VDPAU_MPEG1:
return "vdpau_mpeg1"; return "vdpau_mpeg1";
case PIX_FMT_VDPAU_MPEG2: case PIX_FMT_VDPAU_MPEG2:
return "vdpau_mpeg2"; return "vdpau_mpeg2";
case PIX_FMT_VDPAU_WMV3: case PIX_FMT_VDPAU_WMV3:
return "vdpau_wmv3"; return "vdpau_wmv3";
case PIX_FMT_VDPAU_VC1: case PIX_FMT_VDPAU_VC1:
return "vdpau_vc1"; return "vdpau_vc1";
case PIX_FMT_YUV420PLE: case PIX_FMT_YUV420PLE:
return "yuv420ple"; return "yuv420ple";
case PIX_FMT_YUV422PLE: case PIX_FMT_YUV422PLE:
return "yuv422ple"; return "yuv422ple";
case PIX_FMT_YUV444PLE: case PIX_FMT_YUV444PLE:
return "yuv444ple"; return "yuv444ple";
case PIX_FMT_YUV420PBE: case PIX_FMT_YUV420PBE:
return "yuv420pbe"; return "yuv420pbe";
case PIX_FMT_YUV422PBE: case PIX_FMT_YUV422PBE:
return "yuv422pbe"; return "yuv422pbe";
case PIX_FMT_YUV444PBE: case PIX_FMT_YUV444PBE:
return "yuv444pbe"; return "yuv444pbe";
default: default:
return "Unknown format"; return "Unknown format";
} }
} }
...@@ -1443,12 +1443,12 @@ static inline void monoblack2Y(uint8_t *dst, const uint8_t *src, long width, uin ...@@ -1443,12 +1443,12 @@ static inline void monoblack2Y(uint8_t *dst, const uint8_t *src, long width, uin
static double getSplineCoeff(double a, double b, double c, double d, double dist) static double getSplineCoeff(double a, double b, double c, double d, double dist)
{ {
// printf("%f %f %f %f %f\n", a,b,c,d,dist); // printf("%f %f %f %f %f\n", a,b,c,d,dist);
if (dist<=1.0) return ((d*dist + c)*dist + b)*dist +a; if (dist<=1.0) return ((d*dist + c)*dist + b)*dist +a;
else return getSplineCoeff( 0.0, else return getSplineCoeff( 0.0,
b+ 2.0*c + 3.0*d, b+ 2.0*c + 3.0*d,
c + 3.0*d, c + 3.0*d,
-b- 3.0*c - 6.0*d, -b- 3.0*c - 6.0*d,
dist-1.0); dist-1.0);
} }
static inline int initFilter(int16_t **outFilter, int16_t **filterPos, int *outFilterSize, int xInc, static inline int initFilter(int16_t **outFilter, int16_t **filterPos, int *outFilterSize, int xInc,
...@@ -1515,14 +1515,14 @@ static inline int initFilter(int16_t **outFilter, int16_t **filterPos, int *outF ...@@ -1515,14 +1515,14 @@ static inline int initFilter(int16_t **outFilter, int16_t **filterPos, int *outF
int j; int j;
(*filterPos)[i]= xx; (*filterPos)[i]= xx;
//bilinear upscale / linear interpolate / area averaging //bilinear upscale / linear interpolate / area averaging
for (j=0; j<filterSize; j++) for (j=0; j<filterSize; j++)
{ {
int64_t coeff= fone - FFABS((xx<<16) - xDstInSrc)*(fone>>16); int64_t coeff= fone - FFABS((xx<<16) - xDstInSrc)*(fone>>16);
if (coeff<0) coeff=0; if (coeff<0) coeff=0;
filter[i*filterSize + j]= coeff; filter[i*filterSize + j]= coeff;
xx++; xx++;
} }
xDstInSrc+= xInc; xDstInSrc+= xInc;
} }
} }
...@@ -2562,20 +2562,20 @@ int sws_getColorspaceDetails(SwsContext *c, int **inv_table, int *srcRange, int ...@@ -2562,20 +2562,20 @@ int sws_getColorspaceDetails(SwsContext *c, int **inv_table, int *srcRange, int
static int handle_jpeg(enum PixelFormat *format) static int handle_jpeg(enum PixelFormat *format)
{ {
switch (*format) { switch (*format) {
case PIX_FMT_YUVJ420P: case PIX_FMT_YUVJ420P:
*format = PIX_FMT_YUV420P; *format = PIX_FMT_YUV420P;
return 1; return 1;
case PIX_FMT_YUVJ422P: case PIX_FMT_YUVJ422P:
*format = PIX_FMT_YUV422P; *format = PIX_FMT_YUV422P;
return 1; return 1;
case PIX_FMT_YUVJ444P: case PIX_FMT_YUVJ444P:
*format = PIX_FMT_YUV444P; *format = PIX_FMT_YUV444P;
return 1; return 1;
case PIX_FMT_YUVJ440P: case PIX_FMT_YUVJ440P:
*format = PIX_FMT_YUV440P; *format = PIX_FMT_YUV440P;
return 1; return 1;
default: default:
return 0; return 0;
} }
} }
...@@ -2837,7 +2837,7 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d ...@@ -2837,7 +2837,7 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d
if (c->swScale){ if (c->swScale){
if (flags&SWS_PRINT_INFO) if (flags&SWS_PRINT_INFO)
av_log(c, AV_LOG_INFO, "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)); sws_format_name(srcFormat), sws_format_name(dstFormat));
return c; return c;
} }
} }
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment