summaryrefslogtreecommitdiff
path: root/libavcodec/simple_idct.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2005-12-22 01:10:11 +0000
committerDiego Biurrun <diego@biurrun.de>2005-12-22 01:10:11 +0000
commitbb270c0896b39e1ae9277355e3c120ed3feb64a3 (patch)
treefc2fc2b1216d19acb3879abb6ea5a3b400f43fe4 /libavcodec/simple_idct.c
parent50827fcf44f34521df4708cdb633809b56fb9df3 (diff)
COSMETICS: tabs --> spaces, some prettyprinting
Originally committed as revision 4764 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/simple_idct.c')
-rw-r--r--libavcodec/simple_idct.c110
1 files changed, 55 insertions, 55 deletions
diff --git a/libavcodec/simple_idct.c b/libavcodec/simple_idct.c
index c751aabbcb..1049091d68 100644
--- a/libavcodec/simple_idct.c
+++ b/libavcodec/simple_idct.c
@@ -75,7 +75,7 @@
static inline void idctRowCondDC (DCTELEM * row)
{
- int a0, a1, a2, a3, b0, b1, b2, b3;
+ int a0, a1, a2, a3, b0, b1, b2, b3;
#ifdef FAST_64BIT
uint64_t temp;
#else
@@ -97,7 +97,7 @@ static inline void idctRowCondDC (DCTELEM * row)
((uint64_t *)row)[0] = temp;
((uint64_t *)row)[1] = temp;
return;
- }
+ }
}else{
if (!(row[1]|row[2]|row[3]|row[4]|row[5]|row[6]|row[7])) {
row[0]=row[1]=row[2]=row[3]=row[4]=row[5]=row[6]=row[7]= row[0] << 3;
@@ -125,9 +125,9 @@ static inline void idctRowCondDC (DCTELEM * row)
#endif
a0 = (W4 * row[0]) + (1 << (ROW_SHIFT - 1));
- a1 = a0;
- a2 = a0;
- a3 = a0;
+ a1 = a0;
+ a2 = a0;
+ a3 = a0;
/* no need to optimize : gcc does it */
a0 += W2 * row[2];
@@ -149,7 +149,7 @@ static inline void idctRowCondDC (DCTELEM * row)
#else
temp = ((uint32_t*)row)[2] | ((uint32_t*)row)[3];
#endif
- if (temp != 0) {
+ if (temp != 0) {
a0 += W4*row[4] + W6*row[6];
a1 += - W4*row[4] - W2*row[6];
a2 += - W4*row[4] + W2*row[6];
@@ -166,29 +166,29 @@ static inline void idctRowCondDC (DCTELEM * row)
MAC16(b3, W3, row[5]);
MAC16(b3, -W1, row[7]);
- }
-
- row[0] = (a0 + b0) >> ROW_SHIFT;
- row[7] = (a0 - b0) >> ROW_SHIFT;
- row[1] = (a1 + b1) >> ROW_SHIFT;
- row[6] = (a1 - b1) >> ROW_SHIFT;
- row[2] = (a2 + b2) >> ROW_SHIFT;
- row[5] = (a2 - b2) >> ROW_SHIFT;
- row[3] = (a3 + b3) >> ROW_SHIFT;
- row[4] = (a3 - b3) >> ROW_SHIFT;
+ }
+
+ row[0] = (a0 + b0) >> ROW_SHIFT;
+ row[7] = (a0 - b0) >> ROW_SHIFT;
+ row[1] = (a1 + b1) >> ROW_SHIFT;
+ row[6] = (a1 - b1) >> ROW_SHIFT;
+ row[2] = (a2 + b2) >> ROW_SHIFT;
+ row[5] = (a2 - b2) >> ROW_SHIFT;
+ row[3] = (a3 + b3) >> ROW_SHIFT;
+ row[4] = (a3 - b3) >> ROW_SHIFT;
}
static inline void idctSparseColPut (uint8_t *dest, int line_size,
DCTELEM * col)
{
- int a0, a1, a2, a3, b0, b1, b2, b3;
+ int a0, a1, a2, a3, b0, b1, b2, b3;
uint8_t *cm = cropTbl + MAX_NEG_CROP;
/* XXX: I did that only to give same values as previous code */
- a0 = W4 * (col[8*0] + ((1<<(COL_SHIFT-1))/W4));
- a1 = a0;
- a2 = a0;
- a3 = a0;
+ a0 = W4 * (col[8*0] + ((1<<(COL_SHIFT-1))/W4));
+ a1 = a0;
+ a2 = a0;
+ a3 = a0;
a0 += + W2*col[8*2];
a1 += + W6*col[8*2];
@@ -205,33 +205,33 @@ static inline void idctSparseColPut (uint8_t *dest, int line_size,
MAC16(b2, - W1, col[8*3]);
MAC16(b3, - W5, col[8*3]);
- if(col[8*4]){
+ if(col[8*4]){
a0 += + W4*col[8*4];
a1 += - W4*col[8*4];
a2 += - W4*col[8*4];
a3 += + W4*col[8*4];
- }
+ }
- if (col[8*5]) {
+ if (col[8*5]) {
MAC16(b0, + W5, col[8*5]);
MAC16(b1, - W1, col[8*5]);
MAC16(b2, + W7, col[8*5]);
MAC16(b3, + W3, col[8*5]);
- }
+ }
- if(col[8*6]){
+ if(col[8*6]){
a0 += + W6*col[8*6];
a1 += - W2*col[8*6];
a2 += + W2*col[8*6];
a3 += - W6*col[8*6];
- }
+ }
- if (col[8*7]) {
+ if (col[8*7]) {
MAC16(b0, + W7, col[8*7]);
MAC16(b1, - W5, col[8*7]);
MAC16(b2, + W3, col[8*7]);
MAC16(b3, - W1, col[8*7]);
- }
+ }
dest[0] = cm[(a0 + b0) >> COL_SHIFT];
dest += line_size;
@@ -253,14 +253,14 @@ static inline void idctSparseColPut (uint8_t *dest, int line_size,
static inline void idctSparseColAdd (uint8_t *dest, int line_size,
DCTELEM * col)
{
- int a0, a1, a2, a3, b0, b1, b2, b3;
+ int a0, a1, a2, a3, b0, b1, b2, b3;
uint8_t *cm = cropTbl + MAX_NEG_CROP;
/* XXX: I did that only to give same values as previous code */
- a0 = W4 * (col[8*0] + ((1<<(COL_SHIFT-1))/W4));
- a1 = a0;
- a2 = a0;
- a3 = a0;
+ a0 = W4 * (col[8*0] + ((1<<(COL_SHIFT-1))/W4));
+ a1 = a0;
+ a2 = a0;
+ a3 = a0;
a0 += + W2*col[8*2];
a1 += + W6*col[8*2];
@@ -277,33 +277,33 @@ static inline void idctSparseColAdd (uint8_t *dest, int line_size,
MAC16(b2, - W1, col[8*3]);
MAC16(b3, - W5, col[8*3]);
- if(col[8*4]){
+ if(col[8*4]){
a0 += + W4*col[8*4];
a1 += - W4*col[8*4];
a2 += - W4*col[8*4];
a3 += + W4*col[8*4];
- }
+ }
- if (col[8*5]) {
+ if (col[8*5]) {
MAC16(b0, + W5, col[8*5]);
MAC16(b1, - W1, col[8*5]);
MAC16(b2, + W7, col[8*5]);
MAC16(b3, + W3, col[8*5]);
- }
+ }
- if(col[8*6]){
+ if(col[8*6]){
a0 += + W6*col[8*6];
a1 += - W2*col[8*6];
a2 += + W2*col[8*6];
a3 += - W6*col[8*6];
- }
+ }
- if (col[8*7]) {
+ if (col[8*7]) {
MAC16(b0, + W7, col[8*7]);
MAC16(b1, - W5, col[8*7]);
MAC16(b2, + W3, col[8*7]);
MAC16(b3, - W1, col[8*7]);
- }
+ }
dest[0] = cm[dest[0] + ((a0 + b0) >> COL_SHIFT)];
dest += line_size;
@@ -324,13 +324,13 @@ static inline void idctSparseColAdd (uint8_t *dest, int line_size,
static inline void idctSparseCol (DCTELEM * col)
{
- int a0, a1, a2, a3, b0, b1, b2, b3;
+ int a0, a1, a2, a3, b0, b1, b2, b3;
/* XXX: I did that only to give same values as previous code */
- a0 = W4 * (col[8*0] + ((1<<(COL_SHIFT-1))/W4));
- a1 = a0;
- a2 = a0;
- a3 = a0;
+ a0 = W4 * (col[8*0] + ((1<<(COL_SHIFT-1))/W4));
+ a1 = a0;
+ a2 = a0;
+ a3 = a0;
a0 += + W2*col[8*2];
a1 += + W6*col[8*2];
@@ -347,33 +347,33 @@ static inline void idctSparseCol (DCTELEM * col)
MAC16(b2, - W1, col[8*3]);
MAC16(b3, - W5, col[8*3]);
- if(col[8*4]){
+ if(col[8*4]){
a0 += + W4*col[8*4];
a1 += - W4*col[8*4];
a2 += - W4*col[8*4];
a3 += + W4*col[8*4];
- }
+ }
- if (col[8*5]) {
+ if (col[8*5]) {
MAC16(b0, + W5, col[8*5]);
MAC16(b1, - W1, col[8*5]);
MAC16(b2, + W7, col[8*5]);
MAC16(b3, + W3, col[8*5]);
- }
+ }
- if(col[8*6]){
+ if(col[8*6]){
a0 += + W6*col[8*6];
a1 += - W2*col[8*6];
a2 += + W2*col[8*6];
a3 += - W6*col[8*6];
- }
+ }
- if (col[8*7]) {
+ if (col[8*7]) {
MAC16(b0, + W7, col[8*7]);
MAC16(b1, - W5, col[8*7]);
MAC16(b2, + W3, col[8*7]);
MAC16(b3, - W1, col[8*7]);
- }
+ }
col[0 ] = ((a0 + b0) >> COL_SHIFT);
col[8 ] = ((a1 + b1) >> COL_SHIFT);