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
d6cef144
Commit
d6cef144
authored
Feb 02, 2020
by
Jai Luthra
Committed by
Paul B Mahol
Feb 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mlpenc: fix some -fsanitize=integer errors
Signed-off-by:
Jai Luthra
<
me@jailuthra.in
>
parent
ad263847
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
mlpenc.c
libavcodec/mlpenc.c
+5
-5
No files found.
libavcodec/mlpenc.c
View file @
d6cef144
...
...
@@ -87,11 +87,11 @@ typedef struct {
}
DecodingParams
;
typedef
struct
BestOffset
{
int
16
_t
offset
;
int
32
_t
offset
;
int
bitcount
;
int
lsb_bits
;
int
16
_t
min
;
int
16
_t
max
;
int
32
_t
min
;
int
32
_t
max
;
}
BestOffset
;
#define HUFF_OFFSET_MIN (-16384)
...
...
@@ -1249,7 +1249,7 @@ static void input_data_internal(MLPEncodeContext *ctx, const uint8_t *samples,
uint32_t
abs_sample
;
int32_t
sample
;
sample
=
is24
?
*
samples_32
++
>>
8
:
*
samples_16
++
*
256
U
;
sample
=
is24
?
*
samples_32
++
>>
8
:
*
samples_16
++
*
256
;
/* TODO Find out if number_sbits can be used for negative values. */
abs_sample
=
FFABS
(
sample
);
...
...
@@ -1792,7 +1792,7 @@ static void determine_bits(MLPEncodeContext *ctx)
#define SAMPLE_MAX(bitdepth) ((1 << (bitdepth - 1)) - 1)
#define SAMPLE_MIN(bitdepth) (~SAMPLE_MAX(bitdepth))
#define MSB_MASK(bits) (-(1u << (bits)))
#define MSB_MASK(bits) (-(
int)(
1u << (bits)))
/** Applies the filter to the current samples, and saves the residual back
* into the samples buffer. If the filter is too bad and overflows the
...
...
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