Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cmp_tool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dominik Loidolt
cmp_tool
Commits
6187310c
Commit
6187310c
authored
1 year ago
by
Dominik Loidolt
Browse files
Options
Downloads
Patches
Plain Diff
Fix bug when compressing 0 samples
parent
d50269c3
No related branches found
No related tags found
1 merge request
!26
Adapt cmp_tool to the chunk decompression
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/common/cmp_data_types.c
+1
-1
1 addition, 1 deletion
lib/common/cmp_data_types.c
lib/icu_compress/cmp_icu.c
+1
-1
1 addition, 1 deletion
lib/icu_compress/cmp_icu.c
with
2 additions
and
2 deletions
lib/common/cmp_data_types.c
+
1
−
1
View file @
6187310c
...
@@ -943,7 +943,7 @@ int be_to_cpu_chunk(uint8_t *chunk, size_t chunk_size)
...
@@ -943,7 +943,7 @@ int be_to_cpu_chunk(uint8_t *chunk, size_t chunk_size)
if
(
chunk_size
<
COLLECTION_HDR_SIZE
)
if
(
chunk_size
<
COLLECTION_HDR_SIZE
)
return
-
1
;
return
-
1
;
while
(
col_p
<
chunk
+
chunk_size
-
COLLECTION_HDR_SIZE
)
{
while
(
col_p
<
=
chunk
+
chunk_size
-
COLLECTION_HDR_SIZE
)
{
struct
collection_hdr
*
col_hdr
=
(
struct
collection_hdr
*
)
col_p
;
struct
collection_hdr
*
col_hdr
=
(
struct
collection_hdr
*
)
col_p
;
enum
cmp_data_type
data_type
=
convert_subservice_to_cmp_data_type
(
cmp_col_get_subservice
(
col_hdr
));
enum
cmp_data_type
data_type
=
convert_subservice_to_cmp_data_type
(
cmp_col_get_subservice
(
col_hdr
));
uint32_t
data_size
=
cmp_col_get_data_length
(
col_hdr
);
uint32_t
data_size
=
cmp_col_get_data_length
(
col_hdr
);
...
...
This diff is collapsed.
Click to expand it.
lib/icu_compress/cmp_icu.c
+
1
−
1
View file @
6187310c
...
@@ -2132,7 +2132,7 @@ static int compress_data_internal(const struct cmp_cfg *cfg, int stream_len)
...
@@ -2132,7 +2132,7 @@ static int compress_data_internal(const struct cmp_cfg *cfg, int stream_len)
return
stream_len
;
return
stream_len
;
if
(
cfg
->
samples
==
0
)
/* nothing to compress we are done*/
if
(
cfg
->
samples
==
0
)
/* nothing to compress we are done*/
return
0
;
return
stream_len
;
if
(
stream_len
&
0x7
)
{
if
(
stream_len
&
0x7
)
{
debug_print
(
"Error: The stream_len parameter must be a multiple of 8.
\n
"
);
debug_print
(
"Error: The stream_len parameter must be a multiple of 8.
\n
"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment