Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
e0ae2174
Commit
e0ae2174
authored
Jul 17, 2011
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simple_idct: remove disabled code
parent
473e547e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
145 deletions
+0
-145
simple_idct.c
libavcodec/simple_idct.c
+0
-12
simple_idct_mmx.c
libavcodec/x86/simple_idct_mmx.c
+0
-133
No files found.
libavcodec/simple_idct.c
View file @
e0ae2174
...
@@ -34,17 +34,6 @@
...
@@ -34,17 +34,6 @@
#include "mathops.h"
#include "mathops.h"
#include "simple_idct.h"
#include "simple_idct.h"
#if 0
#define W1 2841 /* 2048*sqrt (2)*cos (1*pi/16) */
#define W2 2676 /* 2048*sqrt (2)*cos (2*pi/16) */
#define W3 2408 /* 2048*sqrt (2)*cos (3*pi/16) */
#define W4 2048 /* 2048*sqrt (2)*cos (4*pi/16) */
#define W5 1609 /* 2048*sqrt (2)*cos (5*pi/16) */
#define W6 1108 /* 2048*sqrt (2)*cos (6*pi/16) */
#define W7 565 /* 2048*sqrt (2)*cos (7*pi/16) */
#define ROW_SHIFT 8
#define COL_SHIFT 17
#else
#define W1 22725 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
#define W1 22725 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
#define W2 21407 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
#define W2 21407 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
#define W3 19266 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
#define W3 19266 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
...
@@ -54,7 +43,6 @@
...
@@ -54,7 +43,6 @@
#define W7 4520 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
#define W7 4520 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
#define ROW_SHIFT 11
#define ROW_SHIFT 11
#define COL_SHIFT 20 // 6
#define COL_SHIFT 20 // 6
#endif
static
inline
void
idctRowCondDC
(
DCTELEM
*
row
)
static
inline
void
idctRowCondDC
(
DCTELEM
*
row
)
{
{
...
...
libavcodec/x86/simple_idct_mmx.c
View file @
e0ae2174
...
@@ -37,11 +37,7 @@
...
@@ -37,11 +37,7 @@
#define C1 22725 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
#define C1 22725 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
#define C2 21407 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
#define C2 21407 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
#define C3 19266 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
#define C3 19266 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
#if 0
#define C4 16384 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
#else
#define C4 16383 //cos(i*M_PI/16)*sqrt(2)*(1<<14) - 0.5
#define C4 16383 //cos(i*M_PI/16)*sqrt(2)*(1<<14) - 0.5
#endif
#define C5 12873 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
#define C5 12873 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
#define C6 8867 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
#define C6 8867 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
#define C7 4520 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
#define C7 4520 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
...
@@ -80,135 +76,6 @@ DECLARE_ALIGNED(8, static const int16_t, coeffs)[]= {
...
@@ -80,135 +76,6 @@ DECLARE_ALIGNED(8, static const int16_t, coeffs)[]= {
C3
,
-
C1
,
C3
,
-
C1
C3
,
-
C1
,
C3
,
-
C1
};
};
#if 0
static void unused_var_killer(void)
{
int a= wm1010 + d40000;
temp[0]=a;
}
static void inline idctCol (int16_t * col, int16_t *input)
{
#undef C0
#undef C1
#undef C2
#undef C3
#undef C4
#undef C5
#undef C6
#undef C7
int a0, a1, a2, a3, b0, b1, b2, b3;
const int C0 = 23170; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
const int C1 = 22725; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
const int C2 = 21407; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
const int C3 = 19266; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
const int C4 = 16383; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
const int C5 = 12873; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
const int C6 = 8867; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
const int C7 = 4520; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
/*
if( !(col[8*1] | col[8*2] |col[8*3] |col[8*4] |col[8*5] |col[8*6] | col[8*7])) {
col[8*0] = col[8*1] = col[8*2] = col[8*3] = col[8*4] =
col[8*5] = col[8*6] = col[8*7] = col[8*0]<<3;
return;
}*/
col[8*0] = input[8*0 + 0];
col[8*1] = input[8*2 + 0];
col[8*2] = input[8*0 + 1];
col[8*3] = input[8*2 + 1];
col[8*4] = input[8*4 + 0];
col[8*5] = input[8*6 + 0];
col[8*6] = input[8*4 + 1];
col[8*7] = input[8*6 + 1];
a0 = C4*col[8*0] + C2*col[8*2] + C4*col[8*4] + C6*col[8*6] + (1<<(COL_SHIFT-1));
a1 = C4*col[8*0] + C6*col[8*2] - C4*col[8*4] - C2*col[8*6] + (1<<(COL_SHIFT-1));
a2 = C4*col[8*0] - C6*col[8*2] - C4*col[8*4] + C2*col[8*6] + (1<<(COL_SHIFT-1));
a3 = C4*col[8*0] - C2*col[8*2] + C4*col[8*4] - C6*col[8*6] + (1<<(COL_SHIFT-1));
b0 = C1*col[8*1] + C3*col[8*3] + C5*col[8*5] + C7*col[8*7];
b1 = C3*col[8*1] - C7*col[8*3] - C1*col[8*5] - C5*col[8*7];
b2 = C5*col[8*1] - C1*col[8*3] + C7*col[8*5] + C3*col[8*7];
b3 = C7*col[8*1] - C5*col[8*3] + C3*col[8*5] - C1*col[8*7];
col[8*0] = (a0 + b0) >> COL_SHIFT;
col[8*1] = (a1 + b1) >> COL_SHIFT;
col[8*2] = (a2 + b2) >> COL_SHIFT;
col[8*3] = (a3 + b3) >> COL_SHIFT;
col[8*4] = (a3 - b3) >> COL_SHIFT;
col[8*5] = (a2 - b2) >> COL_SHIFT;
col[8*6] = (a1 - b1) >> COL_SHIFT;
col[8*7] = (a0 - b0) >> COL_SHIFT;
}
static void inline idctRow (int16_t * output, int16_t * input)
{
int16_t row[8];
int a0, a1, a2, a3, b0, b1, b2, b3;
const int C0 = 23170; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
const int C1 = 22725; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
const int C2 = 21407; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
const int C3 = 19266; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
const int C4 = 16383; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
const int C5 = 12873; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
const int C6 = 8867; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
const int C7 = 4520; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
row[0] = input[0];
row[2] = input[1];
row[4] = input[4];
row[6] = input[5];
row[1] = input[8];
row[3] = input[9];
row[5] = input[12];
row[7] = input[13];
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;
output[0] = row[0];
output[2] = row[1];
output[4] = row[2];
output[6] = row[3];
output[8] = row[4];
output[10] = row[5];
output[12] = row[6];
output[14] = row[7];
return;
}
a0 = C4*row[0] + C2*row[2] + C4*row[4] + C6*row[6] + (1<<(ROW_SHIFT-1));
a1 = C4*row[0] + C6*row[2] - C4*row[4] - C2*row[6] + (1<<(ROW_SHIFT-1));
a2 = C4*row[0] - C6*row[2] - C4*row[4] + C2*row[6] + (1<<(ROW_SHIFT-1));
a3 = C4*row[0] - C2*row[2] + C4*row[4] - C6*row[6] + (1<<(ROW_SHIFT-1));
b0 = C1*row[1] + C3*row[3] + C5*row[5] + C7*row[7];
b1 = C3*row[1] - C7*row[3] - C1*row[5] - C5*row[7];
b2 = C5*row[1] - C1*row[3] + C7*row[5] + C3*row[7];
b3 = C7*row[1] - C5*row[3] + C3*row[5] - C1*row[7];
row[0] = (a0 + b0) >> ROW_SHIFT;
row[1] = (a1 + b1) >> ROW_SHIFT;
row[2] = (a2 + b2) >> ROW_SHIFT;
row[3] = (a3 + b3) >> ROW_SHIFT;
row[4] = (a3 - b3) >> ROW_SHIFT;
row[5] = (a2 - b2) >> ROW_SHIFT;
row[6] = (a1 - b1) >> ROW_SHIFT;
row[7] = (a0 - b0) >> ROW_SHIFT;
output[0] = row[0];
output[2] = row[1];
output[4] = row[2];
output[6] = row[3];
output[8] = row[4];
output[10] = row[5];
output[12] = row[6];
output[14] = row[7];
}
#endif
static
inline
void
idct
(
int16_t
*
block
)
static
inline
void
idct
(
int16_t
*
block
)
{
{
DECLARE_ALIGNED
(
8
,
int64_t
,
align_tmp
)[
16
];
DECLARE_ALIGNED
(
8
,
int64_t
,
align_tmp
)[
16
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment