Commit dd68318c authored by Ramiro Polla's avatar Ramiro Polla
Browse files

Cosmetics:

- Place curly brackets in the same line as while/for/if/switch/else/do;
- Place curly brackets at column 0 in the next line starting a function.

Originally committed as revision 29523 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
parent 9dc6bb7b
......@@ -71,7 +71,7 @@ int main(int argc, char **argv)
av_log(NULL, AV_LOG_INFO, "CPU capabilities forced to %x\n", cpu_caps);
sws_rgb2rgb_init(cpu_caps);
for(funcNum=0; ; funcNum++){
for(funcNum=0; ; funcNum++) {
struct func_info_s {
int src_bpp;
int dst_bpp;
......@@ -118,13 +118,13 @@ int main(int argc, char **argv)
av_log(NULL, AV_LOG_INFO,".");
memset(srcBuffer, srcByte, SIZE);
for(width=63; width>0; width--){
for(width=63; width>0; width--) {
int dstOffset;
for(dstOffset=128; dstOffset<196; dstOffset+=4){
for(dstOffset=128; dstOffset<196; dstOffset+=4) {
int srcOffset;
memset(dstBuffer, dstByte, SIZE);
for(srcOffset=128; srcOffset<196; srcOffset+=4){
for(srcOffset=128; srcOffset<196; srcOffset+=4) {
uint8_t *src= srcBuffer+srcOffset;
uint8_t *dst= dstBuffer+dstOffset;
const char *name=NULL;
......@@ -139,24 +139,24 @@ int main(int argc, char **argv)
if(!srcBpp) break;
for(i=0; i<SIZE; i++){
if(srcBuffer[i]!=srcByte){
for(i=0; i<SIZE; i++) {
if(srcBuffer[i]!=srcByte) {
av_log(NULL, AV_LOG_INFO, "src damaged at %d w:%d src:%d dst:%d %s\n",
i, width, srcOffset, dstOffset, name);
failed=1;
break;
}
}
for(i=0; i<dstOffset; i++){
if(dstBuffer[i]!=dstByte){
for(i=0; i<dstOffset; i++) {
if(dstBuffer[i]!=dstByte) {
av_log(NULL, AV_LOG_INFO, "dst damaged at %d w:%d src:%d dst:%d %s\n",
i, width, srcOffset, dstOffset, name);
failed=1;
break;
}
}
for(i=dstOffset + width*dstBpp; i<SIZE; i++){
if(dstBuffer[i]!=dstByte){
for(i=dstOffset + width*dstBpp; i<SIZE; i++) {
if(dstBuffer[i]!=dstByte) {
av_log(NULL, AV_LOG_INFO, "dst damaged at %d w:%d src:%d dst:%d %s\n",
i, width, srcOffset, dstOffset, name);
failed=1;
......
......@@ -31,8 +31,9 @@
#include "libswscale/swscale.h"
static int mlib_YUV2ARGB420_32(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[]){
if(c->srcFormat == PIX_FMT_YUV422P){
int srcSliceH, uint8_t* dst[], int dstStride[])
{
if(c->srcFormat == PIX_FMT_YUV422P) {
srcStride[1] *= 2;
srcStride[2] *= 2;
}
......@@ -45,8 +46,9 @@ static int mlib_YUV2ARGB420_32(SwsContext *c, uint8_t* src[], int srcStride[], i
}
static int mlib_YUV2ABGR420_32(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[]){
if(c->srcFormat == PIX_FMT_YUV422P){
int srcSliceH, uint8_t* dst[], int dstStride[])
{
if(c->srcFormat == PIX_FMT_YUV422P) {
srcStride[1] *= 2;
srcStride[2] *= 2;
}
......@@ -59,8 +61,9 @@ static int mlib_YUV2ABGR420_32(SwsContext *c, uint8_t* src[], int srcStride[], i
}
static int mlib_YUV2RGB420_24(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[]){
if(c->srcFormat == PIX_FMT_YUV422P){
int srcSliceH, uint8_t* dst[], int dstStride[])
{
if(c->srcFormat == PIX_FMT_YUV422P) {
srcStride[1] *= 2;
srcStride[2] *= 2;
}
......@@ -75,7 +78,7 @@ static int mlib_YUV2RGB420_24(SwsContext *c, uint8_t* src[], int srcStride[], in
SwsFunc ff_yuv2rgb_init_mlib(SwsContext *c)
{
switch(c->dstFormat){
switch(c->dstFormat) {
case PIX_FMT_RGB24: return mlib_YUV2RGB420_24;
case PIX_FMT_BGR32: return mlib_YUV2ARGB420_32;
case PIX_FMT_RGB32: return mlib_YUV2ABGR420_32;
......
......@@ -23,7 +23,8 @@
#include "swscale.h"
#include "swscale_internal.h"
static const char * sws_context_to_name(void * ptr) {
static const char * sws_context_to_name(void * ptr)
{
return "swscaler";
}
......
......@@ -24,7 +24,8 @@
#define vzero vec_splat_s32(0)
static inline void
altivec_packIntArrayToCharArray(int *val, uint8_t* dest, int dstW) {
altivec_packIntArrayToCharArray(int *val, uint8_t* dest, int dstW)
{
register int i;
vector unsigned int altivec_vectorShiftInt19 =
vec_add(vec_splat_u32(10), vec_splat_u32(9));
......@@ -389,7 +390,8 @@ static inline void hScale_altivec_real(int16_t *dst, int dstW,
}
static inline int yv12toyuy2_unscaled_altivec(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dstParam[], int dstStride_a[]) {
int srcSliceH, uint8_t* dstParam[], int dstStride_a[])
{
uint8_t *dst=dstParam[0] + dstStride_a[0]*srcSliceY;
// yv12toyuy2(src[0], src[1], src[2], dst, c->srcW, srcSliceH, srcStride[0], srcStride[1], dstStride[0]);
uint8_t *ysrc = src[0];
......@@ -466,7 +468,8 @@ static inline int yv12toyuy2_unscaled_altivec(SwsContext *c, uint8_t* src[], int
}
static inline int yv12touyvy_unscaled_altivec(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dstParam[], int dstStride_a[]) {
int srcSliceH, uint8_t* dstParam[], int dstStride_a[])
{
uint8_t *dst=dstParam[0] + dstStride_a[0]*srcSliceY;
// yv12toyuy2(src[0], src[1], src[2], dst, c->srcW, srcSliceH, srcStride[0], srcStride[1], dstStride[0]);
uint8_t *ysrc = src[0];
......
......@@ -714,7 +714,7 @@ SwsFunc ff_yuv2rgb_init_altivec(SwsContext *c)
if ((c->srcH & 0x1) != 0)
return NULL;
switch(c->dstFormat){
switch(c->dstFormat) {
case PIX_FMT_RGB24:
av_log(c, AV_LOG_WARNING, "ALTIVEC: Color Space RGB24\n");
return altivec_yuv2_rgb24;
......@@ -738,7 +738,7 @@ SwsFunc ff_yuv2rgb_init_altivec(SwsContext *c)
break;
case PIX_FMT_UYVY422:
switch(c->dstFormat){
switch(c->dstFormat) {
case PIX_FMT_BGR32:
av_log(c, AV_LOG_WARNING, "ALTIVEC: Color Space UYVY -> RGB32\n");
return altivec_uyvy_rgb32;
......@@ -800,7 +800,7 @@ ff_yuv2packedX_altivec(SwsContext *c,
out = (vector unsigned char *)dest;
for (i=0; i<dstW; i+=16){
for (i=0; i<dstW; i+=16) {
Y0 = RND;
Y1 = RND;
/* extract 16 coeffs from lumSrc */
......
......@@ -196,7 +196,8 @@ DECLARE_ASM_CONST(8, uint64_t, blue_15mask) = 0x0000001f0000001fULL;
32-bit C version, and and&add trick by Michael Niedermayer
*/
void sws_rgb2rgb_init(int flags){
void sws_rgb2rgb_init(int flags)
{
#if (HAVE_MMX2 || HAVE_AMD3DNOW || HAVE_MMX) && CONFIG_GPL
if (flags & SWS_CPU_CAPS_MMX2)
rgb2rgb_init_MMX2();
......@@ -227,8 +228,7 @@ void palette8topacked24(const uint8_t *src, uint8_t *dst, long num_pixels, const
{
long i;
for (i=0; i<num_pixels; i++)
{
for (i=0; i<num_pixels; i++) {
//FIXME slow?
dst[0]= palette[src[i]*4+0];
dst[1]= palette[src[i]*4+1];
......@@ -273,8 +273,7 @@ void rgb32to24(const uint8_t *src, uint8_t *dst, long src_size)
{
long i;
long num_pixels = src_size >> 2;
for (i=0; i<num_pixels; i++)
{
for (i=0; i<num_pixels; i++) {
#if HAVE_BIGENDIAN
/* RGB32 (= A,B,G,R) -> BGR24 (= B,G,R) */
dst[3*i + 0] = src[4*i + 1];
......@@ -291,8 +290,7 @@ void rgb32to24(const uint8_t *src, uint8_t *dst, long src_size)
void rgb24to32(const uint8_t *src, uint8_t *dst, long src_size)
{
long i;
for (i=0; 3*i<src_size; i++)
{
for (i=0; 3*i<src_size; i++) {
#if HAVE_BIGENDIAN
/* RGB24 (= R,G,B) -> BGR32 (= A,R,G,B) */
dst[4*i + 0] = 255;
......@@ -314,8 +312,7 @@ void rgb16tobgr32(const uint8_t *src, uint8_t *dst, long src_size)
uint8_t *d = dst;
const uint16_t *s = (const uint16_t *)src;
end = s + src_size/2;
while (s < end)
{
while (s < end) {
register uint16_t bgr;
bgr = *s++;
#if HAVE_BIGENDIAN
......@@ -338,8 +335,7 @@ void rgb16to24(const uint8_t *src, uint8_t *dst, long src_size)
uint8_t *d = dst;
const uint16_t *s = (const uint16_t *)src;
end = s + src_size/2;
while (s < end)
{
while (s < end) {
register uint16_t bgr;
bgr = *s++;
*d++ = (bgr&0xF800)>>8;
......@@ -353,8 +349,7 @@ void rgb16tobgr16(const uint8_t *src, uint8_t *dst, long src_size)
long i;
long num_pixels = src_size >> 1;
for (i=0; i<num_pixels; i++)
{
for (i=0; i<num_pixels; i++) {
unsigned rgb = ((const uint16_t*)src)[i];
((uint16_t*)dst)[i] = (rgb>>11) | (rgb&0x7E0) | (rgb<<11);
}
......@@ -365,8 +360,7 @@ void rgb16tobgr15(const uint8_t *src, uint8_t *dst, long src_size)
long i;
long num_pixels = src_size >> 1;
for (i=0; i<num_pixels; i++)
{
for (i=0; i<num_pixels; i++) {
unsigned rgb = ((const uint16_t*)src)[i];
((uint16_t*)dst)[i] = (rgb>>11) | ((rgb&0x7C0)>>1) | ((rgb&0x1F)<<10);
}
......@@ -378,8 +372,7 @@ void rgb15tobgr32(const uint8_t *src, uint8_t *dst, long src_size)
uint8_t *d = dst;
const uint16_t *s = (const uint16_t *)src;
end = s + src_size/2;
while (s < end)
{
while (s < end) {
register uint16_t bgr;
bgr = *s++;
#if HAVE_BIGENDIAN
......@@ -402,8 +395,7 @@ void rgb15to24(const uint8_t *src, uint8_t *dst, long src_size)
uint8_t *d = dst;
const uint16_t *s = (const uint16_t *)src;
end = s + src_size/2;
while (s < end)
{
while (s < end) {
register uint16_t bgr;
bgr = *s++;
*d++ = (bgr&0x7C00)>>7;
......@@ -417,8 +409,7 @@ void rgb15tobgr16(const uint8_t *src, uint8_t *dst, long src_size)
long i;
long num_pixels = src_size >> 1;
for (i=0; i<num_pixels; i++)
{
for (i=0; i<num_pixels; i++) {
unsigned rgb = ((const uint16_t*)src)[i];
((uint16_t*)dst)[i] = ((rgb&0x7C00)>>10) | ((rgb&0x3E0)<<1) | (rgb<<11);
}
......@@ -429,8 +420,7 @@ void rgb15tobgr15(const uint8_t *src, uint8_t *dst, long src_size)
long i;
long num_pixels = src_size >> 1;
for (i=0; i<num_pixels; i++)
{
for (i=0; i<num_pixels; i++) {
unsigned br;
unsigned rgb = ((const uint16_t*)src)[i];
br = rgb&0x7c1F;
......@@ -442,8 +432,7 @@ void bgr8torgb8(const uint8_t *src, uint8_t *dst, long src_size)
{
long i;
long num_pixels = src_size;
for (i=0; i<num_pixels; i++)
{
for (i=0; i<num_pixels; i++) {
unsigned b,g,r;
register uint8_t rgb;
rgb = src[i];
......
This diff is collapsed.
......@@ -82,7 +82,8 @@
// 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,
int srcSliceH, uint8_t* dst[], int dstStride[]){
int srcSliceH, uint8_t* dst[], int dstStride[])
{
int y, out1, out2, out3, out4, out5, out6;
for(y=0;y < srcSliceH;++y) {
......@@ -134,7 +135,8 @@ static int vis_420P_ARGB32(SwsContext *c, uint8_t* src[], int srcStride[], int s
// 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,
int srcSliceH, uint8_t* dst[], int dstStride[]){
int srcSliceH, uint8_t* dst[], int dstStride[])
{
int y, out1, out2, out3, out4, out5, out6;
for(y=0;y < srcSliceH;++y) {
......@@ -184,7 +186,8 @@ static int vis_422P_ARGB32(SwsContext *c, uint8_t* src[], int srcStride[], int s
return srcSliceH;
}
SwsFunc ff_yuv2rgb_init_vis(SwsContext *c){
SwsFunc ff_yuv2rgb_init_vis(SwsContext *c)
{
c->sparc_coeffs[5]=c->yCoeff;
c->sparc_coeffs[6]=c->vgCoeff;
c->sparc_coeffs[7]=c->vrCoeff;
......
......@@ -50,14 +50,15 @@ const char *sws_format_name(enum PixelFormat format);
|| (x)==PIX_FMT_YUVA420P \
)
static uint64_t getSSD(uint8_t *src1, uint8_t *src2, int stride1, int stride2, int w, int h){
static uint64_t getSSD(uint8_t *src1, uint8_t *src2, int stride1, int stride2, int w, int h)
{
int x,y;
uint64_t ssd=0;
//printf("%d %d\n", w, h);
for (y=0; y<h; y++){
for (x=0; x<w; x++){
for (y=0; y<h; y++) {
for (x=0; x<w; x++) {
int d= src1[x + y*stride1] - src2[x + y*stride2];
ssd+= d*d;
//printf("%d", abs(src1[x + y*stride1] - src2[x + y*stride2])/26 );
......@@ -70,7 +71,8 @@ static uint64_t getSSD(uint8_t *src1, uint8_t *src2, int stride1, int stride2, i
// test by ref -> src -> dst -> out & compare out against ref
// ref & out are YV12
static int doTest(uint8_t *ref[4], int refStride[4], int w, int h, int srcFormat, int dstFormat,
int srcW, int srcH, int dstW, int dstH, int flags){
int srcW, int srcH, int dstW, int dstH, int flags)
{
uint8_t *src[4] = {0};
uint8_t *dst[4] = {0};
uint8_t *out[4] = {0};
......@@ -82,7 +84,7 @@ static int doTest(uint8_t *ref[4], int refStride[4], int w, int h, int srcFormat
int res;
res = 0;
for (i=0; i<4; i++){
for (i=0; i<4; i++) {
// avoid stride % bpp != 0
if (srcFormat==PIX_FMT_RGB24 || srcFormat==PIX_FMT_BGR24)
srcStride[i]= srcW*3;
......@@ -169,7 +171,7 @@ static int doTest(uint8_t *ref[4], int refStride[4], int w, int h, int srcFormat
sws_freeContext(dstContext);
sws_freeContext(outContext);
for (i=0; i<4; i++){
for (i=0; i<4; i++) {
free(src[i]);
free(dst[i]);
free(out[i]);
......@@ -178,7 +180,8 @@ static int doTest(uint8_t *ref[4], int refStride[4], int w, int h, int srcFormat
return res;
}
static void selfTest(uint8_t *src[4], int stride[4], int w, int h){
static void selfTest(uint8_t *src[4], int stride[4], int w, int h)
{
enum PixelFormat srcFormat, dstFormat;
int srcW, srcH, dstW, dstH;
int flags;
......@@ -206,7 +209,8 @@ static void selfTest(uint8_t *src[4], int stride[4], int w, int h){
#define W 96
#define H 96
int main(int argc, char **argv){
int main(int argc, char **argv)
{
uint8_t *rgb_data = malloc (W*H*4);
uint8_t *rgb_src[3]= {rgb_data, NULL, NULL};
int rgb_stride[3]={4*W, 0, 0};
......@@ -221,8 +225,8 @@ int main(int argc, char **argv){
av_lfg_init(&rand, 1);
for (y=0; y<H; y++){
for (x=0; x<W*4; x++){
for (y=0; y<H; y++) {
for (x=0; x<W*4; x++) {
rgb_data[ x + y*4*W]= av_lfg_get(&rand);
}
}
......
This diff is collapsed.
......@@ -64,7 +64,7 @@ typedef int (*SwsFunc)(struct SwsContext *context, uint8_t* src[],
uint8_t* dst[], int dstStride[]);
/* This struct should be aligned on at least a 32-byte boundary. */
typedef struct SwsContext{
typedef struct SwsContext {
/**
* info on struct for av_log
*/
......
This diff is collapsed.
......@@ -63,15 +63,15 @@ SwsFunc ff_yuv2rgb_init_mmx(SwsContext *c)
if (c->flags & SWS_CPU_CAPS_MMX2) {
switch (c->dstFormat) {
case PIX_FMT_RGB32:
if (CONFIG_SWSCALE_ALPHA && c->srcFormat == PIX_FMT_YUVA420P){
if (CONFIG_SWSCALE_ALPHA && c->srcFormat == PIX_FMT_YUVA420P) {
if (HAVE_7REGS) return yuva420_rgb32_MMX2;
break;
}else return yuv420_rgb32_MMX2;
} else return yuv420_rgb32_MMX2;
case PIX_FMT_BGR32:
if (CONFIG_SWSCALE_ALPHA && c->srcFormat == PIX_FMT_YUVA420P){
if (CONFIG_SWSCALE_ALPHA && c->srcFormat == PIX_FMT_YUVA420P) {
if (HAVE_7REGS) return yuva420_bgr32_MMX2;
break;
}else return yuv420_bgr32_MMX2;
} else return yuv420_bgr32_MMX2;
case PIX_FMT_BGR24: return yuv420_rgb24_MMX2;
case PIX_FMT_RGB565: return yuv420_rgb16_MMX2;
case PIX_FMT_RGB555: return yuv420_rgb15_MMX2;
......@@ -80,15 +80,15 @@ SwsFunc ff_yuv2rgb_init_mmx(SwsContext *c)
if (c->flags & SWS_CPU_CAPS_MMX) {
switch (c->dstFormat) {
case PIX_FMT_RGB32:
if (CONFIG_SWSCALE_ALPHA && c->srcFormat == PIX_FMT_YUVA420P){
if (CONFIG_SWSCALE_ALPHA && c->srcFormat == PIX_FMT_YUVA420P) {
if (HAVE_7REGS) return yuva420_rgb32_MMX;
break;
}else return yuv420_rgb32_MMX;
} else return yuv420_rgb32_MMX;
case PIX_FMT_BGR32:
if (CONFIG_SWSCALE_ALPHA && c->srcFormat == PIX_FMT_YUVA420P){
if (CONFIG_SWSCALE_ALPHA && c->srcFormat == PIX_FMT_YUVA420P) {
if (HAVE_7REGS) return yuva420_bgr32_MMX;
break;
}else return yuv420_bgr32_MMX;
} else return yuv420_bgr32_MMX;
case PIX_FMT_BGR24: return yuv420_rgb24_MMX;
case PIX_FMT_RGB565: return yuv420_rgb16_MMX;
case PIX_FMT_RGB555: return yuv420_rgb15_MMX;
......
......@@ -122,7 +122,7 @@
#define YUV422_UNSHIFT \
if(c->srcFormat == PIX_FMT_YUV422P){ \
if(c->srcFormat == PIX_FMT_YUV422P) {\
srcStride[1] *= 2; \
srcStride[2] *= 2; \
} \
......@@ -180,7 +180,8 @@
return srcSliceH; \
static inline int RENAME(yuv420_rgb16)(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, h_size;
YUV422_UNSHIFT
......@@ -236,7 +237,8 @@ static inline int RENAME(yuv420_rgb16)(SwsContext *c, uint8_t* src[], int srcStr
}
static inline int RENAME(yuv420_rgb15)(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, h_size;
YUV422_UNSHIFT
......@@ -294,7 +296,8 @@ static inline int RENAME(yuv420_rgb15)(SwsContext *c, uint8_t* src[], int srcStr
}
static inline int RENAME(yuv420_rgb24)(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, h_size;
YUV422_UNSHIFT
......@@ -470,7 +473,8 @@ etc.
"movq 8 (%5, %0, 2), %%mm6;" /* Load 8 Y Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 */ \
static inline int RENAME(yuv420_rgb32)(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, h_size;
YUV422_UNSHIFT
......@@ -486,7 +490,8 @@ static inline int RENAME(yuv420_rgb32)(SwsContext *c, uint8_t* src[], int srcStr
}
static inline int RENAME(yuva420_rgb32)(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[]){
int srcSliceH, uint8_t* dst[], int dstStride[])
{
#if HAVE_7REGS
int y, h_size;
......@@ -504,7 +509,8 @@ static inline int RENAME(yuva420_rgb32)(SwsContext *c, uint8_t* src[], int srcSt
}
static inline int RENAME(yuv420_bgr32)(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[]){
int srcSliceH, uint8_t* dst[], int dstStride[])
{
int y, h_size;
YUV422_UNSHIFT
......@@ -520,7 +526,8 @@ static inline int RENAME(yuv420_bgr32)(SwsContext *c, const uint8_t* src[], int
}
static inline int RENAME(yuva420_bgr32)(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[]){
int srcSliceH, uint8_t* dst[], int dstStride[])
{
#if HAVE_7REGS
int y, h_size;
......
......@@ -92,7 +92,8 @@ const int32_t ff_yuv2rgb_coeffs[8][4] = {
#define YUV2RGBFUNC(func_name, dst_type, alpha) \
static int func_name(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;\
\
if (!alpha && c->srcFormat == PIX_FMT_YUV422P) {\
......@@ -110,7 +111,7 @@ static int func_name(SwsContext *c, uint8_t* src[], int srcStride[], int srcSlic
uint8_t *pv = src[2] + (y>>1)*srcStride[2];\
uint8_t av_unused *pa_1, *pa_2;\
unsigned int h_size = c->dstW>>3;\
if (alpha){\
if (alpha) {\
pa_1 = src[3] + y*srcStride[3];\
pa_2 = pa_1 + srcStride[3];\
}\
......
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