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
3278ea67
Commit
3278ea67
authored
Feb 26, 2019
by
Martin Vignali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/qtrle : 32bpp dec copy two raw argb value at the same time
benchmark on x86_64 : 38 fps -> 40 fps
parent
5496a734
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
qtrle.c
libavcodec/qtrle.c
+10
-5
No files found.
libavcodec/qtrle.c
View file @
3278ea67
...
...
@@ -346,7 +346,7 @@ static void qtrle_decode_24bpp(QtrleContext *s, int row_ptr, int lines_to_change
static
void
qtrle_decode_32bpp
(
QtrleContext
*
s
,
int
row_ptr
,
int
lines_to_change
)
{
int
rle_code
;
int
rle_code
,
rle_code_half
;
int
pixel_ptr
;
int
row_inc
=
s
->
frame
->
linesize
[
0
];
unsigned
int
argb
;
...
...
@@ -379,9 +379,14 @@ static void qtrle_decode_32bpp(QtrleContext *s, int row_ptr, int lines_to_change
CHECK_PIXEL_PTR
(
rle_code
*
4
);
/* copy pixels directly to output */
while
(
rle_code
--
)
{
argb
=
bytestream2_get_ne32
(
&
s
->
g
);
AV_WN32A
(
rgb
+
pixel_ptr
,
argb
);
rle_code_half
=
rle_code
/
2
;
while
(
rle_code_half
--
)
{
/* copy 2 argb raw value at the same time */
AV_WN64A
(
rgb
+
pixel_ptr
,
bytestream2_get_ne64
(
&
s
->
g
));
pixel_ptr
+=
8
;
}
if
(
rle_code
%
2
!=
0
){
/* not even raw value */
AV_WN32A
(
rgb
+
pixel_ptr
,
bytestream2_get_ne32
(
&
s
->
g
));
pixel_ptr
+=
4
;
}
}
...
...
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