swscale: K&R formatting cosmetics for SPARC code

This commit is contained in:
Diego Biurrun
2012-01-18 18:33:16 +01:00
parent 37390d5cca
commit 06b320ad78

View File

@@ -78,15 +78,14 @@
"fpack16 %%f2, %%f2 \n\t" \ "fpack16 %%f2, %%f2 \n\t" \
"fpack16 %%f18, %%f18 \n\t" "fpack16 %%f18, %%f18 \n\t"
// 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 srcSliceH, uint8_t* dst[], int dstStride[]) int srcSliceY, 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 */
@@ -128,18 +127,18 @@ static int vis_420P_ARGB32(SwsContext *c, uint8_t* src[], int srcStride[], int s
"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 srcSliceH, uint8_t* dst[], int dstStride[]) int srcSliceY, 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 */
@@ -181,7 +180,6 @@ static int vis_422P_ARGB32(SwsContext *c, uint8_t* src[], int srcStride[], int s
"4" (c->dstW), "4" (c->dstW),
"5" (c->sparc_coeffs) "5" (c->sparc_coeffs)
); );
}
return srcSliceH; 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; 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) { 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; return vis_422P_ARGB32;
} } else if (c->dstFormat == PIX_FMT_RGB32 && c->srcFormat == PIX_FMT_YUV420P && (c->dstW & 7) == 0) {
else if (c->dstFormat == PIX_FMT_RGB32 && c->srcFormat == PIX_FMT_YUV420P && (c->dstW & 7)==0) { av_log(c, AV_LOG_INFO,
av_log(c, AV_LOG_INFO, "SPARC VIS accelerated YUV420P -> RGB32 (WARNING: alpha value is wrong)\n"); "SPARC VIS accelerated YUV420P -> RGB32 (WARNING: alpha value is wrong)\n");
return vis_420P_ARGB32; return vis_420P_ARGB32;
} }
return NULL; return NULL;