Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
c0f79934
Commit
c0f79934
authored
Mar 15, 2014
by
Ilkka Ollakka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
block_helper.h: add few unlikely
parent
5626168c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
include/vlc_block_helper.h
include/vlc_block_helper.h
+5
-5
No files found.
include/vlc_block_helper.h
View file @
c0f79934
...
...
@@ -105,7 +105,7 @@ static inline block_t *block_BytestreamPop( block_bytestream_t *p_bytestream )
block_BytestreamFlush
(
p_bytestream
);
p_block
=
p_bytestream
->
p_block
;
if
(
p_block
==
NULL
)
if
(
unlikely
(
p_block
==
NULL
)
)
{
return
NULL
;
}
...
...
@@ -131,7 +131,7 @@ static inline block_t *block_BytestreamPop( block_bytestream_t *p_bytestream )
static
inline
int
block_SkipByte
(
block_bytestream_t
*
p_bytestream
)
{
/* Most common case first */
if
(
p_bytestream
->
p_block
->
i_buffer
-
p_bytestream
->
i_offset
)
if
(
likely
(
p_bytestream
->
p_block
->
i_buffer
-
p_bytestream
->
i_offset
)
)
{
p_bytestream
->
i_offset
++
;
return
VLC_SUCCESS
;
...
...
@@ -161,7 +161,7 @@ static inline int block_PeekByte( block_bytestream_t *p_bytestream,
uint8_t
*
p_data
)
{
/* Most common case first */
if
(
p_bytestream
->
p_block
->
i_buffer
-
p_bytestream
->
i_offset
)
if
(
likely
(
p_bytestream
->
p_block
->
i_buffer
-
p_bytestream
->
i_offset
)
)
{
*
p_data
=
p_bytestream
->
p_block
->
p_buffer
[
p_bytestream
->
i_offset
];
return
VLC_SUCCESS
;
...
...
@@ -190,7 +190,7 @@ static inline int block_GetByte( block_bytestream_t *p_bytestream,
uint8_t
*
p_data
)
{
/* Most common case first */
if
(
p_bytestream
->
p_block
->
i_buffer
-
p_bytestream
->
i_offset
)
if
(
likely
(
p_bytestream
->
p_block
->
i_buffer
-
p_bytestream
->
i_offset
)
)
{
*
p_data
=
p_bytestream
->
p_block
->
p_buffer
[
p_bytestream
->
i_offset
];
p_bytestream
->
i_offset
++
;
...
...
@@ -462,7 +462,7 @@ static inline int block_FindStartcodeFromOffset(
if
(
i_size
<
0
)
break
;
}
if
(
i_size
>=
0
)
if
(
unlikely
(
i_size
>=
0
)
)
{
/* Not enough data, bail out */
return
VLC_EGENERIC
;
...
...
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