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
131a85a1
Commit
131a85a1
authored
Sep 01, 2016
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
utvideo: Change type of array stride parameters to ptrdiff_t
ptrdiff_t is the correct type for array strides and similar.
parent
52730e0f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
13 deletions
+14
-13
utvideo.h
libavcodec/utvideo.h
+1
-1
utvideodec.c
libavcodec/utvideodec.c
+6
-6
utvideoenc.c
libavcodec/utvideoenc.c
+7
-6
No files found.
libavcodec/utvideo.h
View file @
131a85a1
...
...
@@ -77,7 +77,7 @@ typedef struct UtvideoContext {
int
interlaced
;
int
frame_pred
;
int
slice_stride
;
ptrdiff_t
slice_stride
;
uint8_t
*
slice_bits
,
*
slice_buffer
[
4
];
int
slice_bits_size
;
}
UtvideoContext
;
...
...
libavcodec/utvideodec.c
View file @
131a85a1
...
...
@@ -78,7 +78,7 @@ static int build_huff(const uint8_t *src, VLC *vlc, int *fsym)
}
static
int
decode_plane
(
UtvideoContext
*
c
,
int
plane_no
,
uint8_t
*
dst
,
int
step
,
in
t
stride
,
uint8_t
*
dst
,
int
step
,
ptrdiff_
t
stride
,
int
width
,
int
height
,
const
uint8_t
*
src
,
int
use_pred
)
{
...
...
@@ -182,8 +182,8 @@ fail:
return
AVERROR_INVALIDDATA
;
}
static
void
restore_rgb_planes
(
uint8_t
*
src
,
int
step
,
int
stride
,
int
width
,
int
height
)
static
void
restore_rgb_planes
(
uint8_t
*
src
,
int
step
,
ptrdiff_t
stride
,
int
width
,
int
height
)
{
int
i
,
j
;
uint8_t
r
,
g
,
b
;
...
...
@@ -200,7 +200,7 @@ static void restore_rgb_planes(uint8_t *src, int step, int stride, int width,
}
}
static
void
restore_median
(
uint8_t
*
src
,
int
step
,
in
t
stride
,
static
void
restore_median
(
uint8_t
*
src
,
int
step
,
ptrdiff_
t
stride
,
int
width
,
int
height
,
int
slices
,
int
rmode
)
{
int
i
,
j
,
slice
;
...
...
@@ -256,7 +256,7 @@ static void restore_median(uint8_t *src, int step, int stride,
* so restoring function should take care of possible padding between
* two parts of the same "line".
*/
static
void
restore_median_il
(
uint8_t
*
src
,
int
step
,
in
t
stride
,
static
void
restore_median_il
(
uint8_t
*
src
,
int
step
,
ptrdiff_
t
stride
,
int
width
,
int
height
,
int
slices
,
int
rmode
)
{
int
i
,
j
,
slice
;
...
...
@@ -264,7 +264,7 @@ static void restore_median_il(uint8_t *src, int step, int stride,
uint8_t
*
bsrc
;
int
slice_start
,
slice_height
;
const
int
cmask
=
~
(
rmode
?
3
:
1
);
const
in
t
stride2
=
stride
<<
1
;
const
ptrdiff_
t
stride2
=
stride
<<
1
;
for
(
slice
=
0
;
slice
<
slices
;
slice
++
)
{
slice_start
=
((
slice
*
height
)
/
slices
)
&
cmask
;
...
...
libavcodec/utvideoenc.c
View file @
131a85a1
...
...
@@ -234,8 +234,9 @@ FF_ENABLE_DEPRECATION_WARNINGS
return
0
;
}
static
void
mangle_rgb_planes
(
uint8_t
*
dst
[
4
],
int
dst_stride
,
uint8_t
*
src
,
int
step
,
int
stride
,
int
width
,
int
height
)
static
void
mangle_rgb_planes
(
uint8_t
*
dst
[
4
],
ptrdiff_t
dst_stride
,
uint8_t
*
src
,
int
step
,
ptrdiff_t
stride
,
int
width
,
int
height
)
{
int
i
,
j
;
int
k
=
2
*
dst_stride
;
...
...
@@ -268,7 +269,7 @@ static void mangle_rgb_planes(uint8_t *dst[4], int dst_stride, uint8_t *src,
}
/* Write data to a plane with left prediction */
static
void
left_predict
(
uint8_t
*
src
,
uint8_t
*
dst
,
in
t
stride
,
static
void
left_predict
(
uint8_t
*
src
,
uint8_t
*
dst
,
ptrdiff_
t
stride
,
int
width
,
int
height
)
{
int
i
,
j
;
...
...
@@ -285,8 +286,8 @@ static void left_predict(uint8_t *src, uint8_t *dst, int stride,
}
/* Write data to a plane with median prediction */
static
void
median_predict
(
UtvideoContext
*
c
,
uint8_t
*
src
,
uint8_t
*
dst
,
int
stride
,
int
width
,
int
height
)
static
void
median_predict
(
UtvideoContext
*
c
,
uint8_t
*
src
,
uint8_t
*
dst
,
ptrdiff_t
stride
,
int
width
,
int
height
)
{
int
i
,
j
;
int
A
,
B
;
...
...
@@ -387,7 +388,7 @@ static int write_huff_codes(uint8_t *src, uint8_t *dst, int dst_size,
}
static
int
encode_plane
(
AVCodecContext
*
avctx
,
uint8_t
*
src
,
uint8_t
*
dst
,
in
t
stride
,
uint8_t
*
dst
,
ptrdiff_
t
stride
,
int
width
,
int
height
,
PutByteContext
*
pb
)
{
UtvideoContext
*
c
=
avctx
->
priv_data
;
...
...
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