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
5b8faaad
Commit
5b8faaad
authored
May 23, 2016
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_blend: fix incorrect Y variable when threading is used
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
6b852a3f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
blend.h
libavfilter/blend.h
+1
-1
vf_blend.c
libavfilter/vf_blend.c
+8
-8
vf_blend_init.c
libavfilter/x86/vf_blend_init.c
+1
-1
No files found.
libavfilter/blend.h
View file @
5b8faaad
...
@@ -70,7 +70,7 @@ typedef struct FilterParams {
...
@@ -70,7 +70,7 @@ typedef struct FilterParams {
const
uint8_t
*
bottom
,
ptrdiff_t
bottom_linesize
,
const
uint8_t
*
bottom
,
ptrdiff_t
bottom_linesize
,
uint8_t
*
dst
,
ptrdiff_t
dst_linesize
,
uint8_t
*
dst
,
ptrdiff_t
dst_linesize
,
ptrdiff_t
width
,
ptrdiff_t
height
,
ptrdiff_t
width
,
ptrdiff_t
height
,
struct
FilterParams
*
param
,
double
*
values
);
struct
FilterParams
*
param
,
double
*
values
,
int
starty
);
}
FilterParams
;
}
FilterParams
;
void
ff_blend_init
(
FilterParams
*
param
,
int
is_16bit
);
void
ff_blend_init
(
FilterParams
*
param
,
int
is_16bit
);
...
...
libavfilter/vf_blend.c
View file @
5b8faaad
...
@@ -125,7 +125,7 @@ static void blend_copy ## src(const uint8_t *top, ptrdiff_t top_linesize, \
...
@@ -125,7 +125,7 @@ static void blend_copy ## src(const uint8_t *top, ptrdiff_t top_linesize, \
const uint8_t *bottom, ptrdiff_t bottom_linesize,\
const uint8_t *bottom, ptrdiff_t bottom_linesize,\
uint8_t *dst, ptrdiff_t dst_linesize, \
uint8_t *dst, ptrdiff_t dst_linesize, \
ptrdiff_t width, ptrdiff_t height, \
ptrdiff_t width, ptrdiff_t height, \
FilterParams *param, double *values
)
\
FilterParams *param, double *values
, int starty)
\
{ \
{ \
av_image_copy_plane(dst, dst_linesize, src, src ## _linesize, \
av_image_copy_plane(dst, dst_linesize, src, src ## _linesize, \
width, height); \
width, height); \
...
@@ -140,7 +140,7 @@ static void blend_normal_8bit(const uint8_t *top, ptrdiff_t top_linesize,
...
@@ -140,7 +140,7 @@ static void blend_normal_8bit(const uint8_t *top, ptrdiff_t top_linesize,
const
uint8_t
*
bottom
,
ptrdiff_t
bottom_linesize
,
const
uint8_t
*
bottom
,
ptrdiff_t
bottom_linesize
,
uint8_t
*
dst
,
ptrdiff_t
dst_linesize
,
uint8_t
*
dst
,
ptrdiff_t
dst_linesize
,
ptrdiff_t
width
,
ptrdiff_t
height
,
ptrdiff_t
width
,
ptrdiff_t
height
,
FilterParams
*
param
,
double
*
values
)
FilterParams
*
param
,
double
*
values
,
int
starty
)
{
{
const
double
opacity
=
param
->
opacity
;
const
double
opacity
=
param
->
opacity
;
int
i
,
j
;
int
i
,
j
;
...
@@ -159,7 +159,7 @@ static void blend_normal_16bit(const uint8_t *_top, ptrdiff_t top_linesize,
...
@@ -159,7 +159,7 @@ static void blend_normal_16bit(const uint8_t *_top, ptrdiff_t top_linesize,
const
uint8_t
*
_bottom
,
ptrdiff_t
bottom_linesize
,
const
uint8_t
*
_bottom
,
ptrdiff_t
bottom_linesize
,
uint8_t
*
_dst
,
ptrdiff_t
dst_linesize
,
uint8_t
*
_dst
,
ptrdiff_t
dst_linesize
,
ptrdiff_t
width
,
ptrdiff_t
height
,
ptrdiff_t
width
,
ptrdiff_t
height
,
FilterParams
*
param
,
double
*
values
)
FilterParams
*
param
,
double
*
values
,
int
starty
)
{
{
const
uint16_t
*
top
=
(
uint16_t
*
)
_top
;
const
uint16_t
*
top
=
(
uint16_t
*
)
_top
;
const
uint16_t
*
bottom
=
(
uint16_t
*
)
_bottom
;
const
uint16_t
*
bottom
=
(
uint16_t
*
)
_bottom
;
...
@@ -185,7 +185,7 @@ static void blend_## name##_8bit(const uint8_t *top, ptrdiff_t top_linesize,
...
@@ -185,7 +185,7 @@ static void blend_## name##_8bit(const uint8_t *top, ptrdiff_t top_linesize,
const uint8_t *bottom, ptrdiff_t bottom_linesize, \
const uint8_t *bottom, ptrdiff_t bottom_linesize, \
uint8_t *dst, ptrdiff_t dst_linesize, \
uint8_t *dst, ptrdiff_t dst_linesize, \
ptrdiff_t width, ptrdiff_t height, \
ptrdiff_t width, ptrdiff_t height, \
FilterParams *param, double *values
)
\
FilterParams *param, double *values
, int starty)
\
{ \
{ \
double opacity = param->opacity; \
double opacity = param->opacity; \
int i, j; \
int i, j; \
...
@@ -205,7 +205,7 @@ static void blend_## name##_16bit(const uint8_t *_top, ptrdiff_t top_linesize,
...
@@ -205,7 +205,7 @@ static void blend_## name##_16bit(const uint8_t *_top, ptrdiff_t top_linesize,
const uint8_t *_bottom, ptrdiff_t bottom_linesize, \
const uint8_t *_bottom, ptrdiff_t bottom_linesize, \
uint8_t *_dst, ptrdiff_t dst_linesize, \
uint8_t *_dst, ptrdiff_t dst_linesize, \
ptrdiff_t width, ptrdiff_t height, \
ptrdiff_t width, ptrdiff_t height, \
FilterParams *param, double *values) \
FilterParams *param, double *values
, int starty
) \
{ \
{ \
const uint16_t *top = (uint16_t*)_top; \
const uint16_t *top = (uint16_t*)_top; \
const uint16_t *bottom = (uint16_t*)_bottom; \
const uint16_t *bottom = (uint16_t*)_bottom; \
...
@@ -313,7 +313,7 @@ static void blend_expr_## name(const uint8_t *_top, ptrdiff_t top_linesize,
...
@@ -313,7 +313,7 @@ static void blend_expr_## name(const uint8_t *_top, ptrdiff_t top_linesize,
const uint8_t *_bottom, ptrdiff_t bottom_linesize, \
const uint8_t *_bottom, ptrdiff_t bottom_linesize, \
uint8_t *_dst, ptrdiff_t dst_linesize, \
uint8_t *_dst, ptrdiff_t dst_linesize, \
ptrdiff_t width, ptrdiff_t height, \
ptrdiff_t width, ptrdiff_t height, \
FilterParams *param, double *values
)
\
FilterParams *param, double *values
, int starty)
\
{ \
{ \
const type *top = (type*)_top; \
const type *top = (type*)_top; \
const type *bottom = (type*)_bottom; \
const type *bottom = (type*)_bottom; \
...
@@ -325,7 +325,7 @@ static void blend_expr_## name(const uint8_t *_top, ptrdiff_t top_linesize,
...
@@ -325,7 +325,7 @@ static void blend_expr_## name(const uint8_t *_top, ptrdiff_t top_linesize,
bottom_linesize /= div; \
bottom_linesize /= div; \
\
\
for (y = 0; y < height; y++) { \
for (y = 0; y < height; y++) { \
values[VAR_Y] = y
;
\
values[VAR_Y] = y
+ starty;
\
for (x = 0; x < width; x++) { \
for (x = 0; x < width; x++) { \
values[VAR_X] = x; \
values[VAR_X] = x; \
values[VAR_TOP] = values[VAR_A] = top[x]; \
values[VAR_TOP] = values[VAR_A] = top[x]; \
...
@@ -365,7 +365,7 @@ static int filter_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
...
@@ -365,7 +365,7 @@ static int filter_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
td
->
bottom
->
linesize
[
td
->
plane
],
td
->
bottom
->
linesize
[
td
->
plane
],
dst
+
slice_start
*
td
->
dst
->
linesize
[
td
->
plane
],
dst
+
slice_start
*
td
->
dst
->
linesize
[
td
->
plane
],
td
->
dst
->
linesize
[
td
->
plane
],
td
->
dst
->
linesize
[
td
->
plane
],
td
->
w
,
height
,
td
->
param
,
&
values
[
0
]);
td
->
w
,
height
,
td
->
param
,
&
values
[
0
]
,
slice_start
);
return
0
;
return
0
;
}
}
...
...
libavfilter/x86/vf_blend_init.c
View file @
5b8faaad
...
@@ -28,7 +28,7 @@ void ff_blend_##name##_##opt(const uint8_t *top, ptrdiff_t top_linesize, \
...
@@ -28,7 +28,7 @@ void ff_blend_##name##_##opt(const uint8_t *top, ptrdiff_t top_linesize, \
const uint8_t *bottom, ptrdiff_t bottom_linesize, \
const uint8_t *bottom, ptrdiff_t bottom_linesize, \
uint8_t *dst, ptrdiff_t dst_linesize, \
uint8_t *dst, ptrdiff_t dst_linesize, \
ptrdiff_t width, ptrdiff_t height, \
ptrdiff_t width, ptrdiff_t height, \
struct FilterParams *param, double *values);
struct FilterParams *param, double *values
, int starty
);
BLEND_FUNC
(
addition
,
sse2
)
BLEND_FUNC
(
addition
,
sse2
)
BLEND_FUNC
(
addition128
,
sse2
)
BLEND_FUNC
(
addition128
,
sse2
)
...
...
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