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
00794ed0
Commit
00794ed0
authored
Dec 18, 2008
by
Loren Merritt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.6x faster pred*_vertical_add_c
Originally committed as revision 16202 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
621561cd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
28 deletions
+34
-28
h264pred.c
libavcodec/h264pred.c
+34
-28
No files found.
libavcodec/h264pred.c
View file @
00794ed0
...
...
@@ -989,23 +989,26 @@ static void pred8x8l_horizontal_up_c(uint8_t *src, int has_topleft, int has_topr
static
void
pred4x4_vertical_add_c
(
uint8_t
*
pix
,
const
DCTELEM
*
block
,
int
stride
){
int
i
;
pix
-=
stride
;
for
(
i
=
0
;
i
<
4
;
i
++
){
pix
[
0
]
=
pix
[
0
-
stride
]
+
block
[
0
];
pix
[
1
]
=
pix
[
1
-
stride
]
+
block
[
1
];
pix
[
2
]
=
pix
[
2
-
stride
]
+
block
[
2
];
pix
[
3
]
=
pix
[
3
-
stride
]
+
block
[
3
];
pix
+=
stride
;
block
+=
4
;
uint8_t
v
=
pix
[
0
];
pix
[
1
*
stride
]
=
v
+=
block
[
0
];
pix
[
2
*
stride
]
=
v
+=
block
[
4
];
pix
[
3
*
stride
]
=
v
+=
block
[
8
];
pix
[
4
*
stride
]
=
v
+=
block
[
12
];
pix
++
;
block
++
;
}
}
static
void
pred4x4_horizontal_add_c
(
uint8_t
*
pix
,
const
DCTELEM
*
block
,
int
stride
){
int
i
;
for
(
i
=
0
;
i
<
4
;
i
++
){
pix
[
0
]
=
pix
[
-
1
]
+
block
[
0
];
pix
[
1
]
=
pix
[
0
]
+
block
[
1
];
pix
[
2
]
=
pix
[
1
]
+
block
[
2
];
pix
[
3
]
=
pix
[
2
]
+
block
[
3
];
uint8_t
v
=
pix
[
-
1
];
pix
[
0
]
=
v
+=
block
[
0
];
pix
[
1
]
=
v
+=
block
[
1
];
pix
[
2
]
=
v
+=
block
[
2
];
pix
[
3
]
=
v
+=
block
[
3
];
pix
+=
stride
;
block
+=
4
;
}
...
...
@@ -1013,31 +1016,34 @@ static void pred4x4_horizontal_add_c(uint8_t *pix, const DCTELEM *block, int str
static
void
pred8x8l_vertical_add_c
(
uint8_t
*
pix
,
const
DCTELEM
*
block
,
int
stride
){
int
i
;
pix
-=
stride
;
for
(
i
=
0
;
i
<
8
;
i
++
){
pix
[
0
]
=
pix
[
0
-
stride
]
+
block
[
0
];
pix
[
1
]
=
pix
[
1
-
stride
]
+
block
[
1
];
pix
[
2
]
=
pix
[
2
-
stride
]
+
block
[
2
];
pix
[
3
]
=
pix
[
3
-
stride
]
+
block
[
3
];
pix
[
4
]
=
pix
[
4
-
stride
]
+
block
[
4
];
pix
[
5
]
=
pix
[
5
-
stride
]
+
block
[
5
];
pix
[
6
]
=
pix
[
6
-
stride
]
+
block
[
6
];
pix
[
7
]
=
pix
[
7
-
stride
]
+
block
[
7
];
pix
+=
stride
;
block
+=
8
;
uint8_t
v
=
pix
[
0
];
pix
[
1
*
stride
]
=
v
+=
block
[
0
];
pix
[
2
*
stride
]
=
v
+=
block
[
8
];
pix
[
3
*
stride
]
=
v
+=
block
[
16
];
pix
[
4
*
stride
]
=
v
+=
block
[
24
];
pix
[
5
*
stride
]
=
v
+=
block
[
32
];
pix
[
6
*
stride
]
=
v
+=
block
[
40
];
pix
[
7
*
stride
]
=
v
+=
block
[
48
];
pix
[
8
*
stride
]
=
v
+=
block
[
56
];
pix
++
;
block
++
;
}
}
static
void
pred8x8l_horizontal_add_c
(
uint8_t
*
pix
,
const
DCTELEM
*
block
,
int
stride
){
int
i
;
for
(
i
=
0
;
i
<
8
;
i
++
){
pix
[
0
]
=
pix
[
-
1
]
+
block
[
0
];
pix
[
1
]
=
pix
[
0
]
+
block
[
1
];
pix
[
2
]
=
pix
[
1
]
+
block
[
2
];
pix
[
3
]
=
pix
[
2
]
+
block
[
3
];
pix
[
4
]
=
pix
[
3
]
+
block
[
4
];
pix
[
5
]
=
pix
[
4
]
+
block
[
5
];
pix
[
6
]
=
pix
[
5
]
+
block
[
6
];
pix
[
7
]
=
pix
[
6
]
+
block
[
7
];
uint8_t
v
=
pix
[
-
1
];
pix
[
0
]
=
v
+=
block
[
0
];
pix
[
1
]
=
v
+=
block
[
1
];
pix
[
2
]
=
v
+=
block
[
2
];
pix
[
3
]
=
v
+=
block
[
3
];
pix
[
4
]
=
v
+=
block
[
4
];
pix
[
5
]
=
v
+=
block
[
5
];
pix
[
6
]
=
v
+=
block
[
6
];
pix
[
7
]
=
v
+=
block
[
7
];
pix
+=
stride
;
block
+=
8
;
}
...
...
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