Commit bf29ed5d authored by Luca Barbato's avatar Luca Barbato

Cosmetics: 2->4 spaces and some braces

Originally committed as revision 5940 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 634b8cfa
......@@ -1311,28 +1311,27 @@ POWERPC_PERF_STOP_COUNT(altivec_put_no_rnd_pixels16_xy2_num, 1);
int hadamard8_diff8x8_altivec(/*MpegEncContext*/ void *s, uint8_t *dst, uint8_t *src, int stride, int h){
POWERPC_PERF_DECLARE(altivec_hadamard8_diff8x8_num, 1);
int sum;
register const_vector unsigned char vzero = (const_vector unsigned char)vec_splat_u8(0);
register vector signed short temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7;
register const_vector unsigned char vzero =
(const_vector unsigned char)vec_splat_u8(0);
register vector signed short temp0, temp1, temp2, temp3, temp4,
temp5, temp6, temp7;
POWERPC_PERF_START_COUNT(altivec_hadamard8_diff8x8_num, 1);
{
register const_vector signed short vprod1 = (const_vector signed short)AVV( 1,-1, 1,-1, 1,-1, 1,-1);
register const_vector signed short vprod2 = (const_vector signed short)AVV( 1, 1,-1,-1, 1, 1,-1,-1);
register const_vector signed short vprod3 = (const_vector signed short)AVV( 1, 1, 1, 1,-1,-1,-1,-1);
register const_vector signed short vprod1 =(const_vector signed short)
AVV( 1,-1, 1,-1, 1,-1, 1,-1);
register const_vector signed short vprod2 =(const_vector signed short)
AVV( 1, 1,-1,-1, 1, 1,-1,-1);
register const_vector signed short vprod3 =(const_vector signed short)
AVV( 1, 1, 1, 1,-1,-1,-1,-1);
register const_vector unsigned char perm1 = (const_vector unsigned char)
AVV(0x02, 0x03, 0x00, 0x01,
0x06, 0x07, 0x04, 0x05,
0x0A, 0x0B, 0x08, 0x09,
0x0E, 0x0F, 0x0C, 0x0D);
AVV(0x02, 0x03, 0x00, 0x01, 0x06, 0x07, 0x04, 0x05,
0x0A, 0x0B, 0x08, 0x09, 0x0E, 0x0F, 0x0C, 0x0D);
register const_vector unsigned char perm2 = (const_vector unsigned char)
AVV(0x04, 0x05, 0x06, 0x07,
0x00, 0x01, 0x02, 0x03,
0x0C, 0x0D, 0x0E, 0x0F,
0x08, 0x09, 0x0A, 0x0B);
AVV(0x04, 0x05, 0x06, 0x07, 0x00, 0x01, 0x02, 0x03,
0x0C, 0x0D, 0x0E, 0x0F, 0x08, 0x09, 0x0A, 0x0B);
register const_vector unsigned char perm3 = (const_vector unsigned char)
AVV(0x08, 0x09, 0x0A, 0x0B,
0x0C, 0x0D, 0x0E, 0x0F,
0x00, 0x01, 0x02, 0x03,
0x04, 0x05, 0x06, 0x07);
AVV(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07);
#define ONEITERBUTTERFLY(i, res) \
{ \
......@@ -1462,26 +1461,27 @@ static int hadamard8_diff16x8_altivec(/*MpegEncContext*/ void *s, uint8_t *dst,
temp5S REG_v(v13),
temp6S REG_v(v14),
temp7S REG_v(v15);
register const_vector unsigned char vzero REG_v(v31)= (const_vector unsigned char)vec_splat_u8(0);
register const_vector unsigned char vzero REG_v(v31)=
(const_vector unsigned char)vec_splat_u8(0);
{
register const_vector signed short vprod1 REG_v(v16)= (const_vector signed short)AVV( 1,-1, 1,-1, 1,-1, 1,-1);
register const_vector signed short vprod2 REG_v(v17)= (const_vector signed short)AVV( 1, 1,-1,-1, 1, 1,-1,-1);
register const_vector signed short vprod3 REG_v(v18)= (const_vector signed short)AVV( 1, 1, 1, 1,-1,-1,-1,-1);
register const_vector unsigned char perm1 REG_v(v19)= (const_vector unsigned char)
AVV(0x02, 0x03, 0x00, 0x01,
0x06, 0x07, 0x04, 0x05,
0x0A, 0x0B, 0x08, 0x09,
0x0E, 0x0F, 0x0C, 0x0D);
register const_vector unsigned char perm2 REG_v(v20)= (const_vector unsigned char)
AVV(0x04, 0x05, 0x06, 0x07,
0x00, 0x01, 0x02, 0x03,
0x0C, 0x0D, 0x0E, 0x0F,
0x08, 0x09, 0x0A, 0x0B);
register const_vector unsigned char perm3 REG_v(v21)= (const_vector unsigned char)
AVV(0x08, 0x09, 0x0A, 0x0B,
0x0C, 0x0D, 0x0E, 0x0F,
0x00, 0x01, 0x02, 0x03,
0x04, 0x05, 0x06, 0x07);
register const_vector signed short vprod1 REG_v(v16)=
(const_vector signed short)AVV( 1,-1, 1,-1, 1,-1, 1,-1);
register const_vector signed short vprod2 REG_v(v17)=
(const_vector signed short)AVV( 1, 1,-1,-1, 1, 1,-1,-1);
register const_vector signed short vprod3 REG_v(v18)=
(const_vector signed short)AVV( 1, 1, 1, 1,-1,-1,-1,-1);
register const_vector unsigned char perm1 REG_v(v19)=
(const_vector unsigned char)
AVV(0x02, 0x03, 0x00, 0x01, 0x06, 0x07, 0x04, 0x05,
0x0A, 0x0B, 0x08, 0x09, 0x0E, 0x0F, 0x0C, 0x0D);
register const_vector unsigned char perm2 REG_v(v20)=
(const_vector unsigned char)
AVV(0x04, 0x05, 0x06, 0x07, 0x00, 0x01, 0x02, 0x03,
0x0C, 0x0D, 0x0E, 0x0F, 0x08, 0x09, 0x0A, 0x0B);
register const_vector unsigned char perm3 REG_v(v21)=
(const_vector unsigned char)
AVV(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07);
#define ONEITERBUTTERFLY(i, res1, res2) \
{ \
......@@ -1758,25 +1758,21 @@ POWERPC_PERF_START_COUNT(altivec_avg_pixels8_xy2_num, 1);
POWERPC_PERF_STOP_COUNT(altivec_avg_pixels8_xy2_num, 1);
#else /* ALTIVEC_USE_REFERENCE_C_CODE */
register int i;
register vector unsigned char
pixelsv1, pixelsv2,
pixelsavg;
register vector unsigned char
blockv, temp1, temp2, blocktemp;
register vector unsigned short
pixelssum1, pixelssum2, temp3;
register const_vector unsigned char vczero = (const_vector unsigned char)vec_splat_u8(0);
register const_vector unsigned short vctwo = (const_vector unsigned short)vec_splat_u16(2);
register vector unsigned char pixelsv1, pixelsv2, pixelsavg;
register vector unsigned char blockv, temp1, temp2, blocktemp;
register vector unsigned short pixelssum1, pixelssum2, temp3;
register const_vector unsigned char vczero = (const_vector unsigned char)
vec_splat_u8(0);
register const_vector unsigned short vctwo = (const_vector unsigned short)
vec_splat_u16(2);
temp1 = vec_ld(0, pixels);
temp2 = vec_ld(16, pixels);
pixelsv1 = vec_perm(temp1, temp2, vec_lvsl(0, pixels));
if ((((unsigned long)pixels) & 0x0000000F) == 0x0000000F)
{
if ((((unsigned long)pixels) & 0x0000000F) == 0x0000000F) {
pixelsv2 = temp2;
}
else
{
} else {
pixelsv2 = vec_perm(temp1, temp2, vec_lvsl(1, pixels));
}
pixelsv1 = vec_mergeh(vczero, pixelsv1);
......@@ -1796,9 +1792,7 @@ POWERPC_PERF_START_COUNT(altivec_avg_pixels8_xy2_num, 1);
if (((((unsigned long)pixels) + line_size) & 0x0000000F) == 0x0000000F)
{
pixelsv2 = temp2;
}
else
{
} else {
pixelsv2 = vec_perm(temp1, temp2, vec_lvsl(line_size + 1, pixels));
}
......@@ -1811,12 +1805,9 @@ POWERPC_PERF_START_COUNT(altivec_avg_pixels8_xy2_num, 1);
pixelssum1 = vec_add(pixelssum2, vctwo);
pixelsavg = vec_packsu(temp3, (vector unsigned short) vczero);
if (rightside)
{
if (rightside) {
blocktemp = vec_perm(blockv, pixelsavg, vcprm(0, 1, s0, s1));
}
else
{
} else {
blocktemp = vec_perm(blockv, pixelsavg, vcprm(s0, s1, 2, 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