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
dc541ee7
Commit
dc541ee7
authored
Aug 07, 2001
by
Fabrice Bellard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added idct reference code
Originally committed as revision 46 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
e0eac44e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
fdctref.c
libavcodec/fdctref.c
+36
-0
No files found.
libavcodec/fdctref.c
View file @
dc541ee7
...
...
@@ -116,3 +116,39 @@ short *block;
*/
}
}
/* perform IDCT matrix multiply for 8x8 coefficient block */
void
idct
(
block
)
short
*
block
;
{
int
i
,
j
,
k
,
v
;
double
partial_product
;
double
tmp
[
64
];
for
(
i
=
0
;
i
<
8
;
i
++
)
for
(
j
=
0
;
j
<
8
;
j
++
)
{
partial_product
=
0
.
0
;
for
(
k
=
0
;
k
<
8
;
k
++
)
partial_product
+=
c
[
k
][
j
]
*
block
[
8
*
i
+
k
];
tmp
[
8
*
i
+
j
]
=
partial_product
;
}
/* Transpose operation is integrated into address mapping by switching
loop order of i and j */
for
(
j
=
0
;
j
<
8
;
j
++
)
for
(
i
=
0
;
i
<
8
;
i
++
)
{
partial_product
=
0
.
0
;
for
(
k
=
0
;
k
<
8
;
k
++
)
partial_product
+=
c
[
k
][
i
]
*
tmp
[
8
*
k
+
j
];
v
=
(
int
)
floor
(
partial_product
+
0
.
5
);
block
[
8
*
i
+
j
]
=
v
;
}
}
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