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
883570e6
Commit
883570e6
authored
Jan 20, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move add_hfyu_left_prediction_int16 to losslessviddsp
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
f9c7b14c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
20 deletions
+23
-20
huffyuvdec.c
libavcodec/huffyuvdec.c
+1
-20
lossless_videodsp.c
libavcodec/lossless_videodsp.c
+21
-0
lossless_videodsp.h
libavcodec/lossless_videodsp.h
+1
-0
No files found.
libavcodec/huffyuvdec.c
View file @
883570e6
...
@@ -680,26 +680,7 @@ static int left_prediction(HYuvContext *s, uint8_t *dst, const uint8_t *src, int
...
@@ -680,26 +680,7 @@ static int left_prediction(HYuvContext *s, uint8_t *dst, const uint8_t *src, int
if
(
s
->
bps
<=
8
)
{
if
(
s
->
bps
<=
8
)
{
return
s
->
dsp
.
add_hfyu_left_prediction
(
dst
,
src
,
w
,
acc
);
return
s
->
dsp
.
add_hfyu_left_prediction
(
dst
,
src
,
w
,
acc
);
}
else
{
}
else
{
//FIXME optimize
return
s
->
llviddsp
.
add_hfyu_left_prediction_int16
((
uint16_t
*
)
dst
,
(
const
uint16_t
*
)
src
,
s
->
n
-
1
,
w
,
acc
);
unsigned
mask
=
s
->
n
-
1
;
int
i
;
const
uint16_t
*
src16
=
(
const
uint16_t
*
)
src
;
uint16_t
*
dst16
=
(
uint16_t
*
)
dst
;
for
(
i
=
0
;
i
<
w
-
1
;
i
++
){
acc
+=
src16
[
i
];
dst16
[
i
]
=
acc
&
mask
;
i
++
;
acc
+=
src16
[
i
];
dst16
[
i
]
=
acc
&
mask
;
}
for
(;
i
<
w
;
i
++
){
acc
+=
src16
[
i
];
dst16
[
i
]
=
acc
&
mask
;
}
return
acc
;
}
}
}
}
...
...
libavcodec/lossless_videodsp.c
View file @
883570e6
...
@@ -59,10 +59,31 @@ static void diff_int16_c(uint16_t *dst, const uint16_t *src1, const uint16_t *sr
...
@@ -59,10 +59,31 @@ static void diff_int16_c(uint16_t *dst, const uint16_t *src1, const uint16_t *sr
dst
[
i
]
=
(
src1
[
i
]
-
src2
[
i
])
&
mask
;
dst
[
i
]
=
(
src1
[
i
]
-
src2
[
i
])
&
mask
;
}
}
static
int
add_hfyu_left_prediction_int16_c
(
uint16_t
*
dst
,
const
uint16_t
*
src
,
unsigned
mask
,
int
w
,
int
acc
){
int
i
;
for
(
i
=
0
;
i
<
w
-
1
;
i
++
){
acc
+=
src
[
i
];
dst
[
i
]
=
acc
&
mask
;
i
++
;
acc
+=
src
[
i
];
dst
[
i
]
=
acc
&
mask
;
}
for
(;
i
<
w
;
i
++
){
acc
+=
src
[
i
];
dst
[
i
]
=
acc
&
mask
;
}
return
acc
;
}
void
ff_llviddsp_init
(
LLVidDSPContext
*
c
)
void
ff_llviddsp_init
(
LLVidDSPContext
*
c
)
{
{
c
->
add_int16
=
add_int16_c
;
c
->
add_int16
=
add_int16_c
;
c
->
diff_int16
=
diff_int16_c
;
c
->
diff_int16
=
diff_int16_c
;
c
->
add_hfyu_left_prediction_int16
=
add_hfyu_left_prediction_int16_c
;
if
(
ARCH_X86
)
if
(
ARCH_X86
)
ff_llviddsp_init_x86
(
c
);
ff_llviddsp_init_x86
(
c
);
...
...
libavcodec/lossless_videodsp.h
View file @
883570e6
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
typedef
struct
LLVidDSPContext
{
typedef
struct
LLVidDSPContext
{
void
(
*
add_int16
)(
uint16_t
*
dst
/*align 16*/
,
const
uint16_t
*
src
/*align 16*/
,
unsigned
mask
,
int
w
);
void
(
*
add_int16
)(
uint16_t
*
dst
/*align 16*/
,
const
uint16_t
*
src
/*align 16*/
,
unsigned
mask
,
int
w
);
void
(
*
diff_int16
)(
uint16_t
*
dst
/*align 16*/
,
const
uint16_t
*
src1
/*align 16*/
,
const
uint16_t
*
src2
/*align 1*/
,
unsigned
mask
,
int
w
);
void
(
*
diff_int16
)(
uint16_t
*
dst
/*align 16*/
,
const
uint16_t
*
src1
/*align 16*/
,
const
uint16_t
*
src2
/*align 1*/
,
unsigned
mask
,
int
w
);
int
(
*
add_hfyu_left_prediction_int16
)(
uint16_t
*
dst
,
const
uint16_t
*
src
,
unsigned
mask
,
int
w
,
int
left
);
}
LLVidDSPContext
;
}
LLVidDSPContext
;
void
ff_llviddsp_init
(
LLVidDSPContext
*
llviddsp
);
void
ff_llviddsp_init
(
LLVidDSPContext
*
llviddsp
);
...
...
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