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
f51c4bfe
Commit
f51c4bfe
authored
Sep 30, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bitstream: add get_bits_longlong() to support more than 32bits
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
89a823ac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
get_bits.h
libavcodec/get_bits.h
+18
-0
No files found.
libavcodec/get_bits.h
View file @
f51c4bfe
...
@@ -315,6 +315,24 @@ static inline unsigned int get_bits_long(GetBitContext *s, int n)
...
@@ -315,6 +315,24 @@ static inline unsigned int get_bits_long(GetBitContext *s, int n)
}
}
}
}
/**
* Read 0-64 bits.
*/
static
inline
uint64_t
get_bits_longlong
(
GetBitContext
*
s
,
int
n
)
{
if
(
n
<=
32
)
return
get_bits_long
(
s
,
n
);
else
{
#ifdef BITSTREAM_READER_LE
uint64_t
ret
=
get_bits_long
(
s
,
32
);
return
ret
|
(((
uint64_t
)
get_bits_long
(
s
,
n
-
32
))
<<
32
);
#else
uint64_t
ret
=
((
uint64_t
)
get_bits_long
(
s
,
32
))
<<
(
n
-
32
);
return
ret
|
get_bits_long
(
s
,
n
-
32
);
#endif
}
}
/**
/**
* Read 0-32 bits as a signed integer.
* Read 0-32 bits as a signed integer.
*/
*/
...
...
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