Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
libaec
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mathis Rosenhauer
libaec
Merge requests
!3
Rsi block access
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Rsi block access
k202107/libaec:rsi_block_access
into
master
Overview
4
Commits
3
Changes
1
Merged
eugen.betke
requested to merge
k202107/libaec:rsi_block_access
into
master
1 year ago
Overview
4
Commits
3
Changes
1
Expand
Efficient data access by accessing individual RSIs.
0
0
Merge request reports
Viewing commit
b433c66e
Prev
Next
Show latest version
1 file
+
27
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
b433c66e
decode: seek to RSI
· b433c66e
Mathis Rosenhauer
authored
2 years ago
src/decode.c
+
27
−
0
Options
@@ -825,3 +825,30 @@ int aec_buffer_decode(struct aec_stream *strm)
aec_decode_end
(
strm
);
return
status
;
}
int
aec_buffer_seek
(
struct
aec_stream
*
strm
,
size_t
byte_offset
,
unsigned
char
bit_offset
)
{
struct
internal_state
*
state
=
strm
->
state
;
if
(
bit_offset
>
7
)
return
AEC_CONF_ERROR
;
if
(
strm
->
avail_in
<
byte_offset
)
return
AEC_MEM_ERROR
;
strm
->
next_in
+=
byte_offset
;
strm
->
avail_in
-=
byte_offset
;
if
(
bit_offset
>
0
)
{
if
(
strm
->
avail_in
<
1
)
return
AEC_MEM_ERROR
;
state
->
acc
=
(
uint64_t
)
strm
->
next_in
[
0
];
state
->
bitp
=
8
-
bit_offset
;
strm
->
next_in
++
;
strm
->
avail_in
--
;
}
return
AEC_OK
;
}
Loading