Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
30cadfe0
Commit
30cadfe0
authored
Mar 22, 2017
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/lossless_videodsp: use ptrdiff_t for length parameters
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
9560766a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
19 deletions
+22
-19
lossless_videodsp.c
libavcodec/lossless_videodsp.c
+4
-4
lossless_videodsp.h
libavcodec/lossless_videodsp.h
+7
-4
lossless_videodsp_altivec.c
libavcodec/ppc/lossless_videodsp_altivec.c
+1
-1
lossless_videodsp_init.c
libavcodec/x86/lossless_videodsp_init.c
+9
-9
llviddsp.c
tests/checkasm/llviddsp.c
+1
-1
No files found.
libavcodec/lossless_videodsp.c
View file @
30cadfe0
...
...
@@ -25,7 +25,7 @@
#define pb_7f (~0UL / 255 * 0x7f)
#define pb_80 (~0UL / 255 * 0x80)
static
void
add_bytes_c
(
uint8_t
*
dst
,
uint8_t
*
src
,
intptr
_t
w
)
static
void
add_bytes_c
(
uint8_t
*
dst
,
uint8_t
*
src
,
ptrdiff
_t
w
)
{
long
i
;
...
...
@@ -39,7 +39,7 @@ static void add_bytes_c(uint8_t *dst, uint8_t *src, intptr_t w)
}
static
void
add_median_pred_c
(
uint8_t
*
dst
,
const
uint8_t
*
src1
,
const
uint8_t
*
diff
,
intptr
_t
w
,
const
uint8_t
*
diff
,
ptrdiff
_t
w
,
int
*
left
,
int
*
left_top
)
{
int
i
;
...
...
@@ -58,7 +58,7 @@ static void add_median_pred_c(uint8_t *dst, const uint8_t *src1,
*
left_top
=
lt
;
}
static
int
add_left_pred_c
(
uint8_t
*
dst
,
const
uint8_t
*
src
,
intptr
_t
w
,
static
int
add_left_pred_c
(
uint8_t
*
dst
,
const
uint8_t
*
src
,
ptrdiff
_t
w
,
int
acc
)
{
int
i
;
...
...
@@ -79,7 +79,7 @@ static int add_left_pred_c(uint8_t *dst, const uint8_t *src, intptr_t w,
return
acc
;
}
static
int
add_left_pred_int16_c
(
uint16_t
*
dst
,
const
uint16_t
*
src
,
unsigned
mask
,
in
t
w
,
unsigned
acc
){
static
int
add_left_pred_int16_c
(
uint16_t
*
dst
,
const
uint16_t
*
src
,
unsigned
mask
,
ptrdiff_
t
w
,
unsigned
acc
){
int
i
;
for
(
i
=
0
;
i
<
w
-
1
;
i
++
){
...
...
libavcodec/lossless_videodsp.h
View file @
30cadfe0
...
...
@@ -22,20 +22,23 @@
#ifndef AVCODEC_LOSSLESS_VIDEODSP_H
#define AVCODEC_LOSSLESS_VIDEODSP_H
#include <stdint.h>
#include <stddef.h>
#include "avcodec.h"
#include "libavutil/cpu.h"
typedef
struct
LLVidDSPContext
{
void
(
*
add_bytes
)(
uint8_t
*
dst
/* align 16 */
,
uint8_t
*
src
/* align 16 */
,
intptr
_t
w
);
ptrdiff
_t
w
);
void
(
*
add_median_pred
)(
uint8_t
*
dst
,
const
uint8_t
*
top
,
const
uint8_t
*
diff
,
intptr
_t
w
,
const
uint8_t
*
diff
,
ptrdiff
_t
w
,
int
*
left
,
int
*
left_top
);
int
(
*
add_left_pred
)(
uint8_t
*
dst
,
const
uint8_t
*
src
,
intptr
_t
w
,
int
left
);
ptrdiff
_t
w
,
int
left
);
int
(
*
add_left_pred_int16
)(
uint16_t
*
dst
,
const
uint16_t
*
src
,
unsigned
mask
,
in
t
w
,
unsigned
left
);
unsigned
mask
,
ptrdiff_
t
w
,
unsigned
left
);
}
LLVidDSPContext
;
void
ff_llviddsp_init
(
LLVidDSPContext
*
llviddsp
);
...
...
libavcodec/ppc/lossless_videodsp_altivec.c
View file @
30cadfe0
...
...
@@ -33,7 +33,7 @@
#include "libavcodec/lossless_videodsp.h"
#if HAVE_ALTIVEC
static
void
add_bytes_altivec
(
uint8_t
*
dst
,
uint8_t
*
src
,
intptr
_t
w
)
static
void
add_bytes_altivec
(
uint8_t
*
dst
,
uint8_t
*
src
,
ptrdiff
_t
w
)
{
register
int
i
;
register
vector
unsigned
char
vdst
,
vsrc
;
...
...
libavcodec/x86/lossless_videodsp_init.c
View file @
30cadfe0
...
...
@@ -23,27 +23,27 @@
#include "../lossless_videodsp.h"
#include "libavutil/x86/cpu.h"
void
ff_add_bytes_mmx
(
uint8_t
*
dst
,
uint8_t
*
src
,
intptr
_t
w
);
void
ff_add_bytes_sse2
(
uint8_t
*
dst
,
uint8_t
*
src
,
intptr
_t
w
);
void
ff_add_bytes_mmx
(
uint8_t
*
dst
,
uint8_t
*
src
,
ptrdiff
_t
w
);
void
ff_add_bytes_sse2
(
uint8_t
*
dst
,
uint8_t
*
src
,
ptrdiff
_t
w
);
void
ff_add_median_pred_mmxext
(
uint8_t
*
dst
,
const
uint8_t
*
top
,
const
uint8_t
*
diff
,
intptr
_t
w
,
const
uint8_t
*
diff
,
ptrdiff
_t
w
,
int
*
left
,
int
*
left_top
);
void
ff_add_median_pred_sse2
(
uint8_t
*
dst
,
const
uint8_t
*
top
,
const
uint8_t
*
diff
,
intptr
_t
w
,
const
uint8_t
*
diff
,
ptrdiff
_t
w
,
int
*
left
,
int
*
left_top
);
int
ff_add_left_pred_ssse3
(
uint8_t
*
dst
,
const
uint8_t
*
src
,
intptr
_t
w
,
int
left
);
ptrdiff
_t
w
,
int
left
);
int
ff_add_left_pred_unaligned_ssse3
(
uint8_t
*
dst
,
const
uint8_t
*
src
,
intptr
_t
w
,
int
left
);
ptrdiff
_t
w
,
int
left
);
int
ff_add_left_pred_int16_ssse3
(
uint16_t
*
dst
,
const
uint16_t
*
src
,
unsigned
mask
,
in
t
w
,
unsigned
acc
);
int
ff_add_left_pred_int16_sse4
(
uint16_t
*
dst
,
const
uint16_t
*
src
,
unsigned
mask
,
in
t
w
,
unsigned
acc
);
int
ff_add_left_pred_int16_ssse3
(
uint16_t
*
dst
,
const
uint16_t
*
src
,
unsigned
mask
,
ptrdiff_
t
w
,
unsigned
acc
);
int
ff_add_left_pred_int16_sse4
(
uint16_t
*
dst
,
const
uint16_t
*
src
,
unsigned
mask
,
ptrdiff_
t
w
,
unsigned
acc
);
#if HAVE_INLINE_ASM && HAVE_7REGS && ARCH_X86_32
static
void
add_median_pred_cmov
(
uint8_t
*
dst
,
const
uint8_t
*
top
,
const
uint8_t
*
diff
,
intptr
_t
w
,
const
uint8_t
*
diff
,
ptrdiff
_t
w
,
int
*
left
,
int
*
left_top
)
{
x86_reg
w2
=
-
w
;
...
...
tests/checkasm/llviddsp.c
View file @
30cadfe0
...
...
@@ -41,7 +41,7 @@ static void check_add_bytes(LLVidDSPContext c, int width)
uint8_t
*
src1
=
av_mallocz
(
width
);
uint8_t
*
dst0
=
av_mallocz
(
width
);
uint8_t
*
dst1
=
av_mallocz
(
width
);
declare_func_emms
(
AV_CPU_FLAG_MMX
,
void
,
uint8_t
*
dst
,
uint8_t
*
src
,
in
t
w
);
declare_func_emms
(
AV_CPU_FLAG_MMX
,
void
,
uint8_t
*
dst
,
uint8_t
*
src
,
ptrdiff_
t
w
);
if
(
!
src0
||
!
src1
||
!
dst0
||
!
dst1
)
fail
();
...
...
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