Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
imagej-elphel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
imagej-elphel
Commits
1e8f23fb
Commit
1e8f23fb
authored
Feb 11, 2017
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modifying CLT window - using sin/cos rotation of the window
parent
24445249
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
10 deletions
+13
-10
DttRad2.java
src/main/java/DttRad2.java
+11
-8
ImageDtt.java
src/main/java/ImageDtt.java
+2
-2
No files found.
src/main/java/DttRad2.java
View file @
1e8f23fb
...
@@ -247,13 +247,18 @@ public class DttRad2 {
...
@@ -247,13 +247,18 @@ public class DttRad2 {
double
[][]
vert_k
=
new
double
[
2
][
2
];
double
[][]
vert_k
=
new
double
[
2
][
2
];
int
[]
hor_ind
=
new
int
[
2
];
int
[]
hor_ind
=
new
int
[
2
];
double
[][]
hor_k
=
new
double
[
2
][
2
];
double
[][]
hor_k
=
new
double
[
2
][
2
];
double
ahc
=
Math
.
cos
(
Math
.
PI
/
16
*
shift_hor
);
double
ahs
=
Math
.
sin
(
Math
.
PI
/
16
*
shift_hor
);
double
avc
=
Math
.
cos
(
Math
.
PI
/
16
*
shift_vert
);
double
avs
=
Math
.
sin
(
Math
.
PI
/
16
*
shift_vert
);
int
[][]
fi
;
int
[][]
fi
;
for
(
int
i
=
0
;
i
<
n
;
i
++
){
for
(
int
i
=
0
;
i
<
n
;
i
++
){
fi
=
get_fold_indices
(
i
,
n
);
fi
=
get_fold_indices
(
i
,
n
);
vert_ind
[
0
]
=
fi
[
0
][
0
];
vert_ind
[
0
]
=
fi
[
0
][
0
];
vert_ind
[
1
]
=
fi
[
1
][
0
];
vert_ind
[
1
]
=
fi
[
1
][
0
];
double
vw0
=
hwindow
[
fi
[
0
][
1
]]
+
hwindow
[
fi
[
0
][
4
]]*
fi
[
0
][
5
]*
shift_vert
;
double
vw0
=
avc
*
hwindow
[
fi
[
0
][
1
]]
+
avs
*
hwindow
[
fi
[
0
][
4
]]*
fi
[
0
][
5
]
;
double
vw1
=
hwindow
[
fi
[
1
][
1
]]
+
hwindow
[
fi
[
1
][
4
]]*
fi
[
1
][
5
]*
shift_vert
;
double
vw1
=
avc
*
hwindow
[
fi
[
1
][
1
]]
+
avs
*
hwindow
[
fi
[
1
][
4
]]*
fi
[
1
][
5
]
;
vert_k
[
0
][
0
]
=
fi
[
0
][
2
]
*
vw0
;
// use cosine sign
vert_k
[
0
][
0
]
=
fi
[
0
][
2
]
*
vw0
;
// use cosine sign
vert_k
[
0
][
1
]
=
fi
[
1
][
2
]
*
vw1
;
// use cosine sign
vert_k
[
0
][
1
]
=
fi
[
1
][
2
]
*
vw1
;
// use cosine sign
vert_k
[
1
][
0
]
=
fi
[
0
][
3
]
*
vw0
;
// use sine sign
vert_k
[
1
][
0
]
=
fi
[
0
][
3
]
*
vw0
;
// use sine sign
...
@@ -263,8 +268,8 @@ public class DttRad2 {
...
@@ -263,8 +268,8 @@ public class DttRad2 {
fi
=
get_fold_indices
(
j
,
n
);
fi
=
get_fold_indices
(
j
,
n
);
hor_ind
[
0
]
=
fi
[
0
][
0
];
hor_ind
[
0
]
=
fi
[
0
][
0
];
hor_ind
[
1
]
=
fi
[
1
][
0
];
hor_ind
[
1
]
=
fi
[
1
][
0
];
double
hw0
=
hwindow
[
fi
[
0
][
1
]]
+
hwindow
[
fi
[
0
][
4
]]*
fi
[
0
][
5
]*
shift_hor
;
double
hw0
=
ahc
*
hwindow
[
fi
[
0
][
1
]]
+
ahs
*
hwindow
[
fi
[
0
][
4
]]*
fi
[
0
][
5
]
;
double
hw1
=
hwindow
[
fi
[
1
][
1
]]
+
hwindow
[
fi
[
1
][
4
]]*
fi
[
1
][
5
]*
shift_hor
;
double
hw1
=
ahc
*
hwindow
[
fi
[
1
][
1
]]
+
ahs
*
hwindow
[
fi
[
1
][
4
]]*
fi
[
1
][
5
]
;
hor_k
[
0
][
0
]
=
fi
[
0
][
2
]
*
hw0
;
// use cosine sign
hor_k
[
0
][
0
]
=
fi
[
0
][
2
]
*
hw0
;
// use cosine sign
hor_k
[
0
][
1
]
=
fi
[
1
][
2
]
*
hw1
;
// use cosine sign
hor_k
[
0
][
1
]
=
fi
[
1
][
2
]
*
hw1
;
// use cosine sign
...
@@ -284,8 +289,6 @@ public class DttRad2 {
...
@@ -284,8 +289,6 @@ public class DttRad2 {
}
}
// return index and two signs (c,s) for 1-d imdct. x is index (0..2*n-1) of the imdct array, value is sign * (idct_index+1),
// return index and two signs (c,s) for 1-d imdct. x is index (0..2*n-1) of the imdct array, value is sign * (idct_index+1),
// where idct_index (0..n-1) is index in the dct-iv array
// where idct_index (0..n-1) is index in the dct-iv array
private
int
[]
get_unfold_index_signs
(
int
x
,
int
n
){
private
int
[]
get_unfold_index_signs
(
int
x
,
int
n
){
...
...
src/main/java/ImageDtt.java
View file @
1e8f23fb
...
@@ -1712,8 +1712,8 @@ public class ImageDtt {
...
@@ -1712,8 +1712,8 @@ public class ImageDtt {
if
(!
dbg_transpose
){
if
(!
dbg_transpose
){
fold_coeff
=
dtt
.
get_shifted_fold_2d
(
fold_coeff
=
dtt
.
get_shifted_fold_2d
(
transform_size
,
transform_size
,
residual_shift
[
0
]
*
Math
.
PI
/
16
,
residual_shift
[
0
],
residual_shift
[
1
]
*
Math
.
PI
/
16
);
residual_shift
[
1
]);
}
}
for
(
int
dct_mode
=
0
;
dct_mode
<
4
;
dct_mode
++)
{
for
(
int
dct_mode
=
0
;
dct_mode
<
4
;
dct_mode
++)
{
...
...
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