Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
4614bf2c
Commit
4614bf2c
authored
Feb 20, 2017
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Factorize CHECK/SUINT code
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
e3c14eaa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
18 deletions
+10
-18
flacdsp.h
libavcodec/flacdsp.h
+0
-10
mpegaudio.h
libavcodec/mpegaudio.h
+0
-8
internal.h
libavutil/internal.h
+10
-0
No files found.
libavcodec/flacdsp.h
View file @
4614bf2c
...
...
@@ -23,16 +23,6 @@
#include "libavutil/internal.h"
#include "libavutil/samplefmt.h"
// For debuging we use signed operations so overflows can be detected (by ubsan)
// For production we use unsigned so there are no undefined operations
#ifdef CHECKED
#define SUINT int
#define SUINT32 int32_t
#else
#define SUINT unsigned
#define SUINT32 uint32_t
#endif
typedef
struct
FLACDSPContext
{
void
(
*
decorrelate
[
4
])(
uint8_t
**
out
,
int32_t
**
in
,
int
channels
,
int
len
,
int
shift
);
...
...
libavcodec/mpegaudio.h
View file @
4614bf2c
...
...
@@ -59,14 +59,6 @@
#define FIX(a) ((int)((a) * FRAC_ONE))
#ifdef CHECKED
#define SUINT int
#define SUINT32 int32_t
#else
#define SUINT unsigned
#define SUINT32 uint32_t
#endif
#if USE_FLOATS
# define INTFLOAT float
# define SUINTFLOAT float
...
...
libavutil/internal.h
View file @
4614bf2c
...
...
@@ -262,6 +262,16 @@ void avpriv_request_sample(void *avc,
# define ff_dlog(ctx, ...) do { if (0) av_log(ctx, AV_LOG_DEBUG, __VA_ARGS__); } while (0)
#endif
// For debuging we use signed operations so overflows can be detected (by ubsan)
// For production we use unsigned so there are no undefined operations
#ifdef CHECKED
#define SUINT int
#define SUINT32 int32_t
#else
#define SUINT unsigned
#define SUINT32 uint32_t
#endif
/**
* Clip and convert a double value into the long long amin-amax range.
* This function is needed because conversion of floating point to integers when
...
...
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