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
e835a9d3
Commit
e835a9d3
authored
Oct 12, 2019
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_libvmaf: fix filtering of >8 bit data
This is what reference does.
parent
19587c93
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
vf_libvmaf.c
libavfilter/vf_libvmaf.c
+3
-2
No files found.
libavfilter/vf_libvmaf.c
View file @
e835a9d3
...
...
@@ -110,6 +110,7 @@ FRAMESYNC_DEFINE_CLASS(libvmaf, LIBVMAFContext, fs);
const type *main_ptr = (const type *) s->gmain->data[0]; \
\
float *ptr = ref_data; \
float factor = 1.f / (1 << (bits - 8)); \
\
int h = s->height; \
int w = s->width; \
...
...
@@ -118,7 +119,7 @@ FRAMESYNC_DEFINE_CLASS(libvmaf, LIBVMAFContext, fs);
\
for (i = 0; i < h; i++) { \
for ( j = 0; j < w; j++) { \
ptr[j] =
(float)ref_ptr[j];
\
ptr[j] =
ref_ptr[j] * factor;
\
} \
ref_ptr += ref_stride / sizeof(*ref_ptr); \
ptr += stride / sizeof(*ptr); \
...
...
@@ -128,7 +129,7 @@ FRAMESYNC_DEFINE_CLASS(libvmaf, LIBVMAFContext, fs);
\
for (i = 0; i < h; i++) { \
for (j = 0; j < w; j++) { \
ptr[j] =
(float)main_ptr[j];
\
ptr[j] =
main_ptr[j] * factor;
\
} \
main_ptr += main_stride / sizeof(*main_ptr); \
ptr += stride / sizeof(*ptr); \
...
...
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