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
1507aa20
Commit
1507aa20
authored
10 months ago
by
Dominik Loidolt
Browse files
Options
Downloads
Patches
Plain Diff
Refactor: Remove commented-out code from decmp.c
parent
229c248d
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!34
Update cmp_tool to version v0.13
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/decompress/decmp.c
+0
-53
0 additions, 53 deletions
lib/decompress/decmp.c
with
0 additions
and
53 deletions
lib/decompress/decmp.c
+
0
−
53
View file @
1507aa20
...
...
@@ -483,51 +483,6 @@ static int decompress_imagette(const struct cmp_cfg *cfg, struct bit_decoder *de
}
#if 0
/**
* @brief decompress the multi-entry packet header structure and sets the data,
* model and up_model pointers to the data after the header
*
* @param data pointer to a pointer pointing to the data to be compressed
* @param model pointer to a pointer pointing to the model of the data
* @param up_model pointer to a pointer pointing to the updated model buffer
* @param cfg pointer to the compression configuration structure
*
* @returns the bit length of the bitstream on success
*
* @note the (void **) cast relies on all pointer types having the same internal
* representation which is common, but not universal; http://www.c-faq.com/ptrs/genericpp.html
*/
static int decompress_multi_entry_hdr(void **data, void **model, void **up_model,
const struct cmp_cfg *cfg)
{
if (cfg->buffer_length < COLLECTION_HDR_SIZE)
return -1;
if (*data) {
if (cfg->icu_output_buf)
memcpy(*data, cfg->icu_output_buf, COLLECTION_HDR_SIZE);
*data = (uint8_t *)*data + COLLECTION_HDR_SIZE;
}
if (*model) {
if (cfg->icu_output_buf)
memcpy(*model, cfg->icu_output_buf, COLLECTION_HDR_SIZE);
*model = (uint8_t *)*model + COLLECTION_HDR_SIZE;
}
if (*up_model) {
if (cfg->icu_output_buf)
memcpy(*up_model, cfg->icu_output_buf, COLLECTION_HDR_SIZE);
*up_model = (uint8_t *)*up_model + COLLECTION_HDR_SIZE;
}
return COLLECTION_HDR_SIZE * CHAR_BIT;
}
#endif
/**
* @brief decompress short normal light flux (S_FX) data
*
...
...
@@ -1550,17 +1505,9 @@ static int decompressed_data_internal(const struct cmp_cfg *cfg, enum decmp_type
data_size
=
cfg
->
samples
*
(
uint32_t
)
size_of_a_sample
(
cfg
->
data_type
);
if
(
decmp_type
==
ICU_DECOMRESSION
)
data_size
+=
COLLECTION_HDR_SIZE
;
/* data_size = cmp_cal_size_of_data(cfg->samples, cfg->data_type); */
/* if (!cfg->dst || !data_size) */
/* return (int)data_size; */
if
(
cfg
->
cmp_mode
==
CMP_MODE_RAW
)
{
/* if (data_size < cfg->buffer_length/CHAR_BIT) */
/* return -1; */
if
(
cfg
->
dst
)
{
/* uint32_t s = cmp_col_get_size(cfg->icu_output_buf); */
/* assert(s==data_size); */
memcpy
(
cfg
->
dst
,
cfg
->
src
,
data_size
);
switch
(
decmp_type
)
{
case
ICU_DECOMRESSION
:
...
...
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