Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
b531e1ab
Commit
b531e1ab
authored
Mar 21, 2010
by
Vitor Sessak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reindent after r22618.
Originally committed as revision 22619 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
8305c76b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
42 deletions
+43
-42
dct.c
libavcodec/dct.c
+43
-42
No files found.
libavcodec/dct.c
View file @
b531e1ab
...
...
@@ -42,68 +42,69 @@ static void ff_dct_calc_III_c(DCTContext *ctx, FFTSample *data)
int
n
=
1
<<
ctx
->
nbits
;
int
i
;
float
next
=
data
[
n
-
1
];
float
inv_n
=
1
.
0
f
/
n
;
float
next
=
data
[
n
-
1
];
float
inv_n
=
1
.
0
f
/
n
;
for
(
i
=
n
-
2
;
i
>=
2
;
i
-=
2
)
{
float
val1
=
data
[
i
];
float
val2
=
data
[
i
-
1
]
-
data
[
i
+
1
];
float
c
=
COS
(
ctx
,
n
,
i
);
float
s
=
SIN
(
ctx
,
n
,
i
);
for
(
i
=
n
-
2
;
i
>=
2
;
i
-=
2
)
{
float
val1
=
data
[
i
];
float
val2
=
data
[
i
-
1
]
-
data
[
i
+
1
];
float
c
=
COS
(
ctx
,
n
,
i
);
float
s
=
SIN
(
ctx
,
n
,
i
);
data
[
i
]
=
c
*
val1
+
s
*
val2
;
data
[
i
+
1
]
=
s
*
val1
-
c
*
val2
;
}
data
[
i
]
=
c
*
val1
+
s
*
val2
;
data
[
i
+
1
]
=
s
*
val1
-
c
*
val2
;
}
data
[
1
]
=
2
*
next
;
data
[
1
]
=
2
*
next
;
ff_rdft_calc
(
&
ctx
->
rdft
,
data
);
ff_rdft_calc
(
&
ctx
->
rdft
,
data
);
for
(
i
=
0
;
i
<
n
/
2
;
i
++
)
{
float
tmp1
=
data
[
i
]
*
inv_n
;
float
tmp2
=
data
[
n
-
i
-
1
]
*
inv_n
;
float
csc
=
ctx
->
csc2
[
i
]
*
(
tmp1
-
tmp2
);
for
(
i
=
0
;
i
<
n
/
2
;
i
++
)
{
float
tmp1
=
data
[
i
]
*
inv_n
;
float
tmp2
=
data
[
n
-
i
-
1
]
*
inv_n
;
float
csc
=
ctx
->
csc2
[
i
]
*
(
tmp1
-
tmp2
);
tmp1
+=
tmp2
;
data
[
i
]
=
tmp1
+
csc
;
data
[
n
-
i
-
1
]
=
tmp1
-
csc
;
}
tmp1
+=
tmp2
;
data
[
i
]
=
tmp1
+
csc
;
data
[
n
-
i
-
1
]
=
tmp1
-
csc
;
}
}
static
void
ff_dct_calc_II_c
(
DCTContext
*
ctx
,
FFTSample
*
data
)
{
int
n
=
1
<<
ctx
->
nbits
;
int
i
;
float
next
;
for
(
i
=
0
;
i
<
n
/
2
;
i
++
)
{
float
tmp1
=
data
[
i
];
float
tmp2
=
data
[
n
-
i
-
1
];
float
s
=
SIN
(
ctx
,
n
,
2
*
i
+
1
);
float
next
;
s
*=
tmp1
-
tmp2
;
tmp1
=
(
tmp1
+
tmp2
)
*
0
.
5
f
;
for
(
i
=
0
;
i
<
n
/
2
;
i
++
)
{
float
tmp1
=
data
[
i
];
float
tmp2
=
data
[
n
-
i
-
1
];
float
s
=
SIN
(
ctx
,
n
,
2
*
i
+
1
);
data
[
i
]
=
tmp1
+
s
;
data
[
n
-
i
-
1
]
=
tmp1
-
s
;
}
s
*=
tmp1
-
tmp2
;
tmp1
=
(
tmp1
+
tmp2
)
*
0
.
5
f
;
ff_rdft_calc
(
&
ctx
->
rdft
,
data
);
data
[
i
]
=
tmp1
+
s
;
data
[
n
-
i
-
1
]
=
tmp1
-
s
;
}
next
=
data
[
1
]
*
0
.
5
;
data
[
1
]
*=
-
1
;
ff_rdft_calc
(
&
ctx
->
rdft
,
data
);
for
(
i
=
n
-
2
;
i
>=
0
;
i
-=
2
)
{
float
inr
=
data
[
i
];
float
ini
=
data
[
i
+
1
];
float
c
=
COS
(
ctx
,
n
,
i
);
float
s
=
SIN
(
ctx
,
n
,
i
);
next
=
data
[
1
]
*
0
.
5
;
data
[
1
]
*=
-
1
;
data
[
i
]
=
c
*
inr
+
s
*
ini
;
for
(
i
=
n
-
2
;
i
>=
0
;
i
-=
2
)
{
float
inr
=
data
[
i
];
float
ini
=
data
[
i
+
1
];
float
c
=
COS
(
ctx
,
n
,
i
);
float
s
=
SIN
(
ctx
,
n
,
i
);
data
[
i
+
1
]
=
next
;
data
[
i
]
=
c
*
inr
+
s
*
ini
;
next
+=
s
*
inr
-
c
*
ini
;
}
data
[
i
+
1
]
=
next
;
next
+=
s
*
inr
-
c
*
ini
;
}
}
void
ff_dct_calc
(
DCTContext
*
s
,
FFTSample
*
data
)
...
...
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