Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
516566a8
Commit
516566a8
authored
16 years ago
by
Måns Rullgård
Browse files
Options
Downloads
Patches
Plain Diff
SH4: fix IDCT
Originally committed as revision 15897 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
4d382e20
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavcodec/sh4/idct_sh4.c
+12
-13
12 additions, 13 deletions
libavcodec/sh4/idct_sh4.c
with
12 additions
and
13 deletions
libavcodec/sh4/idct_sh4.c
+
12
−
13
View file @
516566a8
...
@@ -21,6 +21,8 @@
...
@@ -21,6 +21,8 @@
*/
*/
#include
"libavcodec/dsputil.h"
#include
"libavcodec/dsputil.h"
#include
"sh4.h"
#define c1 1.38703984532214752434
/* sqrt(2)*cos(1*pi/16) */
#define c1 1.38703984532214752434
/* sqrt(2)*cos(1*pi/16) */
#define c2 1.30656296487637657577
/* sqrt(2)*cos(2*pi/16) */
#define c2 1.30656296487637657577
/* sqrt(2)*cos(2*pi/16) */
#define c3 1.17587560241935884520
/* sqrt(2)*cos(3*pi/16) */
#define c3 1.17587560241935884520
/* sqrt(2)*cos(3*pi/16) */
...
@@ -51,9 +53,11 @@ static const float odd_table[] __attribute__ ((aligned(8))) = {
...
@@ -51,9 +53,11 @@ static const float odd_table[] __attribute__ ((aligned(8))) = {
#undef c6
#undef c6
#undef c7
#undef c7
#if
defined(__SH4_SINGLE__) || defined(__SH4_SINGLE_ONLY__)
#if
1
#define load_matrix(table) \
#define load_matrix(table) \
do { \
const float *t = table; \
__asm__ volatile( \
__asm__ volatile( \
" fschg\n" \
" fschg\n" \
" fmov @%0+,xd0\n" \
" fmov @%0+,xd0\n" \
...
@@ -65,15 +69,13 @@ static const float odd_table[] __attribute__ ((aligned(8))) = {
...
@@ -65,15 +69,13 @@ static const float odd_table[] __attribute__ ((aligned(8))) = {
" fmov @%0+,xd12\n" \
" fmov @%0+,xd12\n" \
" fmov @%0+,xd14\n" \
" fmov @%0+,xd14\n" \
" fschg\n" \
" fschg\n" \
:\
: "+r"(t) \
: "r"(table)\
); \
: "0" \
} while (0)
)
#define ftrv() \
#define ftrv() \
__asm__ volatile("ftrv xmtrx,fv0" \
__asm__ volatile("ftrv xmtrx,fv0" \
: "=f"(fr0),"=f"(fr1),"=f"(fr2),"=f"(fr3) \
: "+f"(fr0),"+f"(fr1),"+f"(fr2),"+f"(fr3));
: "0"(fr0), "1"(fr1), "2"(fr2), "3"(fr3) );
#define DEFREG \
#define DEFREG \
register float fr0 __asm__("fr0"); \
register float fr0 __asm__("fr0"); \
...
@@ -136,10 +138,9 @@ void idct_sh4(DCTELEM *block)
...
@@ -136,10 +138,9 @@ void idct_sh4(DCTELEM *block)
int
i
;
int
i
;
float
tblock
[
8
*
8
],
*
fblock
;
float
tblock
[
8
*
8
],
*
fblock
;
int
ofs1
,
ofs2
,
ofs3
;
int
ofs1
,
ofs2
,
ofs3
;
int
fpscr
;
#if defined(__SH4__)
fp_single_enter
(
fpscr
);
__asm__
(
"fschg"
);
#endif
/* row */
/* row */
...
@@ -248,9 +249,7 @@ void idct_sh4(DCTELEM *block)
...
@@ -248,9 +249,7 @@ void idct_sh4(DCTELEM *block)
block
++
;
block
++
;
}
while
(
--
i
);
}
while
(
--
i
);
#if defined(__SH4__)
fp_single_leave
(
fpscr
);
__asm__
(
"fschg"
);
#endif
}
}
#else
#else
void
idct_sh4
(
DCTELEM
*
block
)
void
idct_sh4
(
DCTELEM
*
block
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment