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
13c33c8e
Commit
13c33c8e
authored
Jan 20, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move add_hfyu_median_prediction_int16() to losslessviddsp
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
883570e6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
19 deletions
+22
-19
huffyuvdec.c
libavcodec/huffyuvdec.c
+1
-19
lossless_videodsp.c
libavcodec/lossless_videodsp.c
+19
-0
lossless_videodsp.h
libavcodec/lossless_videodsp.h
+2
-0
No files found.
libavcodec/huffyuvdec.c
View file @
13c33c8e
...
...
@@ -698,25 +698,7 @@ static void add_median_prediction(HYuvContext *s, uint8_t *dst, const uint8_t *s
if
(
s
->
bps
<=
8
)
{
s
->
dsp
.
add_hfyu_median_prediction
(
dst
,
src
,
diff
,
w
,
left
,
left_top
);
}
else
{
//FIXME optimize
unsigned
mask
=
s
->
n
-
1
;
int
i
;
uint16_t
l
,
lt
;
const
uint16_t
*
src16
=
(
const
uint16_t
*
)
src
;
const
uint16_t
*
diff16
=
(
const
uint16_t
*
)
diff
;
uint16_t
*
dst16
=
(
uint16_t
*
)
dst
;
l
=
*
left
;
lt
=
*
left_top
;
for
(
i
=
0
;
i
<
w
;
i
++
){
l
=
(
mid_pred
(
l
,
src16
[
i
],
(
l
+
src16
[
i
]
-
lt
)
&
mask
)
+
diff16
[
i
])
&
mask
;
lt
=
src16
[
i
];
dst16
[
i
]
=
l
;
}
*
left
=
l
;
*
left_top
=
lt
;
s
->
llviddsp
.
add_hfyu_median_prediction_int16
((
uint16_t
*
)
dst
,
(
const
uint16_t
*
)
src
,
(
const
uint16_t
*
)
diff
,
s
->
n
-
1
,
w
,
left
,
left_top
);
}
}
static
int
decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
got_frame
,
...
...
libavcodec/lossless_videodsp.c
View file @
13c33c8e
...
...
@@ -19,6 +19,7 @@
*/
#include "avcodec.h"
#include "lossless_videodsp.h"
#include "libavcodec/mathops.h"
static
void
add_int16_c
(
uint16_t
*
dst
,
const
uint16_t
*
src
,
unsigned
mask
,
int
w
){
long
i
;
...
...
@@ -59,6 +60,23 @@ static void diff_int16_c(uint16_t *dst, const uint16_t *src1, const uint16_t *sr
dst
[
i
]
=
(
src1
[
i
]
-
src2
[
i
])
&
mask
;
}
static
void
add_hfyu_median_prediction_int16_c
(
uint16_t
*
dst
,
const
uint16_t
*
src
,
const
uint16_t
*
diff
,
unsigned
mask
,
int
w
,
int
*
left
,
int
*
left_top
){
int
i
;
uint16_t
l
,
lt
;
l
=
*
left
;
lt
=
*
left_top
;
for
(
i
=
0
;
i
<
w
;
i
++
){
l
=
(
mid_pred
(
l
,
src
[
i
],
(
l
+
src
[
i
]
-
lt
)
&
mask
)
+
diff
[
i
])
&
mask
;
lt
=
src
[
i
];
dst
[
i
]
=
l
;
}
*
left
=
l
;
*
left_top
=
lt
;
}
static
int
add_hfyu_left_prediction_int16_c
(
uint16_t
*
dst
,
const
uint16_t
*
src
,
unsigned
mask
,
int
w
,
int
acc
){
int
i
;
...
...
@@ -84,6 +102,7 @@ void ff_llviddsp_init(LLVidDSPContext *c)
c
->
add_int16
=
add_int16_c
;
c
->
diff_int16
=
diff_int16_c
;
c
->
add_hfyu_left_prediction_int16
=
add_hfyu_left_prediction_int16_c
;
c
->
add_hfyu_median_prediction_int16
=
add_hfyu_median_prediction_int16_c
;
if
(
ARCH_X86
)
ff_llviddsp_init_x86
(
c
);
...
...
libavcodec/lossless_videodsp.h
View file @
13c33c8e
...
...
@@ -28,6 +28,8 @@
typedef
struct
LLVidDSPContext
{
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
(
*
add_hfyu_median_prediction_int16
)(
uint16_t
*
dst
,
const
uint16_t
*
top
,
const
uint16_t
*
diff
,
unsigned
mask
,
int
w
,
int
*
left
,
int
*
left_top
);
int
(
*
add_hfyu_left_prediction_int16
)(
uint16_t
*
dst
,
const
uint16_t
*
src
,
unsigned
mask
,
int
w
,
int
left
);
}
LLVidDSPContext
;
...
...
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