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
11f472d0
Commit
11f472d0
authored
Sep 20, 2022
by
Dominik Loidolt
Browse files
Options
Downloads
Patches
Plain Diff
fix a bug in the cmp_ent_get_data_buf() function
parent
acf80c8c
No related branches found
No related tags found
1 merge request
!11
decompression/compression for non-imagette data
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/cmp_entity.c
+5
-3
5 additions, 3 deletions
lib/cmp_entity.c
with
5 additions
and
3 deletions
lib/cmp_entity.c
+
5
−
3
View file @
11f472d0
...
@@ -1650,13 +1650,13 @@ void *cmp_ent_get_data_buf(struct cmp_entity *ent)
...
@@ -1650,13 +1650,13 @@ void *cmp_ent_get_data_buf(struct cmp_entity *ent)
switch
(
data_type
)
{
switch
(
data_type
)
{
case
DATA_TYPE_IMAGETTE
:
case
DATA_TYPE_IMAGETTE
:
case
DATA_TYPE_SAT_IMAGETTE
:
case
DATA_TYPE_F_CAM_IMAGETTE
:
case
DATA_TYPE_F_CAM_IMAGETTE
:
return
ent
->
ima
.
ima_cmp_dat
;
return
ent
->
ima
.
ima_cmp_dat
;
case
DATA_TYPE_IMAGETTE_ADAPTIVE
:
case
DATA_TYPE_IMAGETTE_ADAPTIVE
:
case
DATA_TYPE_SAT_IMAGETTE_ADAPTIVE
:
case
DATA_TYPE_F_CAM_IMAGETTE_ADAPTIVE
:
case
DATA_TYPE_F_CAM_IMAGETTE_ADAPTIVE
:
return
ent
->
ima
.
ap_ima_cmp_data
;
return
ent
->
ima
.
ap_ima_cmp_data
;
case
DATA_TYPE_SAT_IMAGETTE
:
case
DATA_TYPE_SAT_IMAGETTE_ADAPTIVE
:
case
DATA_TYPE_OFFSET
:
case
DATA_TYPE_OFFSET
:
case
DATA_TYPE_BACKGROUND
:
case
DATA_TYPE_BACKGROUND
:
case
DATA_TYPE_SMEARING
:
case
DATA_TYPE_SMEARING
:
...
@@ -2038,7 +2038,7 @@ int cmp_ent_write_rdcu_cmp_pars(struct cmp_entity *ent, const struct cmp_info *i
...
@@ -2038,7 +2038,7 @@ int cmp_ent_write_rdcu_cmp_pars(struct cmp_entity *ent, const struct cmp_info *i
* returns the needed size
* returns the needed size
* @param data_type compression entity data product type
* @param data_type compression entity data product type
* @param raw_mode_flag set this flag if the raw compression mode (CMP_MODE_RAW) is used
* @param raw_mode_flag set this flag if the raw compression mode (CMP_MODE_RAW) is used
* @param cmp_size_byte size of the compressed data in bytes
* @param cmp_size_byte size of the compressed data in bytes
(should be a multiple of 4)
*
*
* @note if the entity size is smaller than the largest header, the function
* @note if the entity size is smaller than the largest header, the function
* rounds up the entity size to the largest header
* rounds up the entity size to the largest header
...
@@ -2063,6 +2063,8 @@ uint32_t cmp_ent_create(struct cmp_entity *ent, enum cmp_data_type data_type,
...
@@ -2063,6 +2063,8 @@ uint32_t cmp_ent_create(struct cmp_entity *ent, enum cmp_data_type data_type,
if
(
ent_size
>
CMP_ENTITY_MAX_SIZE
)
if
(
ent_size
>
CMP_ENTITY_MAX_SIZE
)
return
0
;
return
0
;
/* to be safe a compression entity should be at least the size of the
* largest entity header */
if
(
ent_size
<
sizeof
(
struct
cmp_entity
))
if
(
ent_size
<
sizeof
(
struct
cmp_entity
))
ent_size
=
sizeof
(
struct
cmp_entity
);
ent_size
=
sizeof
(
struct
cmp_entity
);
...
...
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