swscale: K&R formatting cosmetics for SPARC code

pull/3/merge
Diego Biurrun 13 years ago
parent 37390d5cca
commit 06b320ad78
  1. 27
      libswscale/sparc/yuv2rgb_vis.c

@ -78,15 +78,14 @@
"fpack16 %%f2, %%f2 \n\t" \
"fpack16 %%f18, %%f18 \n\t"
// 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[])
static int vis_420P_ARGB32(SwsContext *c, uint8_t *src[], int srcStride[],
int srcSliceY, int srcSliceH,
uint8_t *dst[], int dstStride[])
{
int y, out1, out2, out3, out4, out5, out6;
for(y=0;y < srcSliceH;++y) {
for (y = 0; y < srcSliceH; ++y)
__asm__ volatile (
YUV2RGB_INIT
"wr %%g0, 0xd2, %%asi \n\t" /* ASI_FL16_P */
@ -128,18 +127,18 @@ static int vis_420P_ARGB32(SwsContext *c, uint8_t* src[], int srcStride[], int s
"4" (c->dstW),
"5" (c->sparc_coeffs)
);
}
return srcSliceH;
}
// 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[])
static int vis_422P_ARGB32(SwsContext *c, uint8_t *src[], int srcStride[],
int srcSliceY, int srcSliceH,
uint8_t *dst[], int dstStride[])
{
int y, out1, out2, out3, out4, out5, out6;
for(y=0;y < srcSliceH;++y) {
for (y = 0; y < srcSliceH; ++y)
__asm__ volatile (
YUV2RGB_INIT
"wr %%g0, 0xd2, %%asi \n\t" /* ASI_FL16_P */
@ -181,7 +180,6 @@ static int vis_422P_ARGB32(SwsContext *c, uint8_t* src[], int srcStride[], int s
"4" (c->dstW),
"5" (c->sparc_coeffs)
);
}
return srcSliceH;
}
@ -201,11 +199,12 @@ SwsFunc ff_yuv2rgb_init_vis(SwsContext *c)
c->sparc_coeffs[4] = (((int16_t)c->vOffset * (int16_t)c->vrCoeff >> 11) & 0xffff) * 0x0001000100010001ULL;
if (c->dstFormat == PIX_FMT_RGB32 && c->srcFormat == PIX_FMT_YUV422P && (c->dstW & 7) == 0) {
av_log(c, AV_LOG_INFO, "SPARC VIS accelerated YUV422P -> RGB32 (WARNING: alpha value is wrong)\n");
av_log(c, AV_LOG_INFO,
"SPARC VIS accelerated YUV422P -> RGB32 (WARNING: alpha value is wrong)\n");
return vis_422P_ARGB32;
}
else if (c->dstFormat == PIX_FMT_RGB32 && c->srcFormat == PIX_FMT_YUV420P && (c->dstW & 7)==0) {
av_log(c, AV_LOG_INFO, "SPARC VIS accelerated YUV420P -> RGB32 (WARNING: alpha value is wrong)\n");
} else if (c->dstFormat == PIX_FMT_RGB32 && c->srcFormat == PIX_FMT_YUV420P && (c->dstW & 7) == 0) {
av_log(c, AV_LOG_INFO,
"SPARC VIS accelerated YUV420P -> RGB32 (WARNING: alpha value is wrong)\n");
return vis_420P_ARGB32;
}
return NULL;

Loading…
Cancel
Save