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
87c6c786
Commit
87c6c786
authored
Aug 23, 2016
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vp8: Change type of stride parameters to ptrdiff_t
ptrdiff_t is the correct type for array strides and similar.
parent
d9d26a36
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
12 deletions
+13
-12
vp8.c
libavcodec/vp8.c
+9
-8
vp8.h
libavcodec/vp8.h
+2
-2
vp8dsp.c
tests/checkasm/vp8dsp.c
+2
-2
No files found.
libavcodec/vp8.c
View file @
87c6c786
...
...
@@ -426,7 +426,7 @@ static void copy_luma(AVFrame *dst, AVFrame *src, int width, int height)
}
static
void
fade
(
uint8_t
*
dst
,
uint8_t
*
src
,
int
width
,
int
height
,
in
t
linesize
,
int
width
,
int
height
,
ptrdiff_
t
linesize
,
int
alpha
,
int
beta
)
{
int
i
,
j
;
...
...
@@ -1427,7 +1427,7 @@ void decode_mb_coeffs(VP8Context *s, VP8ThreadData *td, VP56RangeCoder *c,
static
av_always_inline
void
backup_mb_border
(
uint8_t
*
top_border
,
uint8_t
*
src_y
,
uint8_t
*
src_cb
,
uint8_t
*
src_cr
,
int
linesize
,
in
t
uvlinesize
,
int
simple
)
ptrdiff_t
linesize
,
ptrdiff_
t
uvlinesize
,
int
simple
)
{
AV_COPY128
(
top_border
,
src_y
+
15
*
linesize
);
if
(
!
simple
)
{
...
...
@@ -1438,7 +1438,7 @@ void backup_mb_border(uint8_t *top_border, uint8_t *src_y,
static
av_always_inline
void
xchg_mb_border
(
uint8_t
*
top_border
,
uint8_t
*
src_y
,
uint8_t
*
src_cb
,
uint8_t
*
src_cr
,
int
linesize
,
in
t
uvlinesize
,
int
mb_x
,
uint8_t
*
src_cr
,
ptrdiff_t
linesize
,
ptrdiff_
t
uvlinesize
,
int
mb_x
,
int
mb_y
,
int
mb_width
,
int
simple
,
int
xchg
)
{
uint8_t
*
top_border_m1
=
top_border
-
32
;
// for TL prediction
...
...
@@ -1591,7 +1591,8 @@ void intra_predict(VP8Context *s, VP8ThreadData *td, uint8_t *dst[3],
for
(
y
=
0
;
y
<
4
;
y
++
)
{
uint8_t
*
topright
=
ptr
+
4
-
s
->
linesize
;
for
(
x
=
0
;
x
<
4
;
x
++
)
{
int
copy
=
0
,
linesize
=
s
->
linesize
;
int
copy
=
0
;
ptrdiff_t
linesize
=
s
->
linesize
;
uint8_t
*
dst
=
ptr
+
4
*
x
;
DECLARE_ALIGNED
(
4
,
uint8_t
,
copy_dst
)[
5
*
8
];
...
...
@@ -1697,7 +1698,7 @@ void vp8_mc_luma(VP8Context *s, VP8ThreadData *td, uint8_t *dst,
uint8_t
*
src
=
ref
->
f
->
data
[
0
];
if
(
AV_RN32A
(
mv
))
{
in
t
src_linesize
=
linesize
;
ptrdiff_
t
src_linesize
=
linesize
;
int
mx
=
(
mv
->
x
<<
1
)
&
7
,
mx_idx
=
subpel_idx
[
0
][
mx
];
int
my
=
(
mv
->
y
<<
1
)
&
7
,
my_idx
=
subpel_idx
[
0
][
my
];
...
...
@@ -2041,8 +2042,8 @@ void filter_mb(VP8Context *s, uint8_t *dst[3], VP8FilterStrength *f,
int
filter_level
=
f
->
filter_level
;
int
inner_limit
=
f
->
inner_limit
;
int
inner_filter
=
f
->
inner_filter
;
int
linesize
=
s
->
linesize
;
in
t
uvlinesize
=
s
->
uvlinesize
;
ptrdiff_t
linesize
=
s
->
linesize
;
ptrdiff_
t
uvlinesize
=
s
->
uvlinesize
;
static
const
uint8_t
hev_thresh_lut
[
2
][
64
]
=
{
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
1
,
1
,
1
,
1
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
...
...
@@ -2128,7 +2129,7 @@ void filter_mb_simple(VP8Context *s, uint8_t *dst, VP8FilterStrength *f,
int
filter_level
=
f
->
filter_level
;
int
inner_limit
=
f
->
inner_limit
;
int
inner_filter
=
f
->
inner_filter
;
int
linesize
=
s
->
linesize
;
ptrdiff_t
linesize
=
s
->
linesize
;
if
(
!
filter_level
)
return
;
...
...
libavcodec/vp8.h
View file @
87c6c786
...
...
@@ -143,8 +143,8 @@ typedef struct VP8Context {
uint16_t
mb_width
;
/* number of horizontal MB */
uint16_t
mb_height
;
/* number of vertical MB */
in
t
linesize
;
in
t
uvlinesize
;
ptrdiff_
t
linesize
;
ptrdiff_
t
uvlinesize
;
uint8_t
keyframe
;
uint8_t
deblock_filter
;
...
...
tests/checkasm/vp8dsp.c
View file @
87c6c786
...
...
@@ -171,7 +171,7 @@ static void check_idct_dc4(void)
for
(
chroma
=
0
;
chroma
<=
1
;
chroma
++
)
{
void
(
*
idct4dc
)(
uint8_t
*
,
int16_t
[
4
][
16
],
ptrdiff_t
)
=
chroma
?
d
.
vp8_idct_dc_add4uv
:
d
.
vp8_idct_dc_add4y
;
if
(
check_func
(
idct4dc
,
"vp8_idct_dc_add4%s"
,
chroma
?
"uv"
:
"y"
))
{
in
t
stride
=
chroma
?
8
:
16
;
ptrdiff_
t
stride
=
chroma
?
8
:
16
;
int
w
=
chroma
?
2
:
4
;
for
(
i
=
0
;
i
<
4
;
i
++
)
{
int
blockx
=
4
*
(
i
%
w
);
...
...
@@ -365,7 +365,7 @@ static void randomize_loopfilter_buffers(int lineoff, int str,
}
// Fill the buffer with random pixels
static
void
fill_loopfilter_buffers
(
uint8_t
*
buf
,
in
t
stride
,
int
w
,
int
h
)
static
void
fill_loopfilter_buffers
(
uint8_t
*
buf
,
ptrdiff_
t
stride
,
int
w
,
int
h
)
{
int
x
,
y
;
for
(
y
=
0
;
y
<
h
;
y
++
)
...
...
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