Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
055c10d7
authored
Apr 04, 2022
by
claincly
Committed by
Ian Baker
Apr 07, 2022
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Add javadoc for SSIM helper.
PiperOrigin-RevId: 439332549
parent
1cbdad34
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
library/transformer/src/androidTest/java/com/google/android/exoplayer2/transformer/SsimHelper.java
library/transformer/src/androidTest/java/com/google/android/exoplayer2/transformer/SsimHelper.java
View file @
055c10d7
...
...
@@ -330,6 +330,17 @@ public final class SsimHelper {
private
static
final
double
C2
=
pow
(
IMAGE_DYNAMIC_RANGE
*
K2
,
2
);
private
static
final
int
WINDOW_SIZE
=
8
;
/**
* Calculates the Structural Similarity Index (SSIM) between two images.
*
* @param expected The luminance channel (Y) bitmap of the expected image.
* @param actual The luminance channel (Y) bitmap of the actual image.
* @param offset The offset.
* @param stride The stride of the bitmap.
* @param width The image width in pixels.
* @param height The image height in pixels.
* @return The SSIM score between the input images.
*/
public
static
double
calculate
(
int
[]
expected
,
int
[]
actual
,
int
offset
,
int
stride
,
int
width
,
int
height
)
{
double
totalSsim
=
0
;
...
...
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