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
f9c7b14c
Commit
f9c7b14c
authored
Jan 20, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcdoec/huffyuvenc: optimize sub_left_prediction()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
f70d7eb2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
huffyuvenc.c
libavcodec/huffyuvenc.c
+15
-8
No files found.
libavcodec/huffyuvenc.c
View file @
f9c7b14c
...
...
@@ -69,15 +69,22 @@ static inline int sub_left_prediction(HYuvContext *s, uint8_t *dst,
}
else
{
const
uint16_t
*
src16
=
(
const
uint16_t
*
)
src
;
uint16_t
*
dst16
=
(
uint16_t
*
)
dst
;
for
(
i
=
0
;
i
<
w
;
i
++
)
{
const
int
temp
=
src16
[
i
];
dst16
[
i
]
=
temp
-
left
;
left
=
temp
;
if
(
w
<
32
)
{
for
(
i
=
0
;
i
<
w
;
i
++
)
{
const
int
temp
=
src16
[
i
];
dst16
[
i
]
=
temp
-
left
;
left
=
temp
;
}
return
left
;
}
else
{
for
(
i
=
0
;
i
<
16
;
i
++
)
{
const
int
temp
=
src16
[
i
];
dst16
[
i
]
=
temp
-
left
;
left
=
temp
;
}
s
->
llviddsp
.
diff_int16
(
dst16
+
16
,
src16
+
16
,
src16
+
15
,
s
->
n
-
1
,
w
-
16
);
return
src16
[
w
-
1
];
}
return
left
;
//FIXME optimize
}
}
...
...
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