Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
aom-rav1e
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Raphael Zumer
aom-rav1e
Commits
e14a42a4
Commit
e14a42a4
authored
8 years ago
by
Yaowu Xu
Committed by
Gerrit Code Review
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Move CHECK_MEM_ERROR implementation to aom/internal." into nextgenv2
parents
a1e48dcc
f5550733
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
aom/internal/aom_codec_internal.h
+19
-0
19 additions, 0 deletions
aom/internal/aom_codec_internal.h
av1/common/common.h
+2
-19
2 additions, 19 deletions
av1/common/common.h
with
21 additions
and
19 deletions
aom/internal/aom_codec_internal.h
+
19
−
0
View file @
e14a42a4
...
...
@@ -43,6 +43,7 @@
*/
#ifndef AOM_INTERNAL_AOM_CODEC_INTERNAL_H_
#define AOM_INTERNAL_AOM_CODEC_INTERNAL_H_
#include
"./aom_config.h"
#include
"../aom_decoder.h"
#include
"../aom_encoder.h"
#include
<stdarg.h>
...
...
@@ -439,6 +440,24 @@ void aom_internal_error(struct aom_internal_error_info *info,
aom_codec_err_t
error
,
const
char
*
fmt
,
...)
CLANG_ANALYZER_NORETURN
;
#if CONFIG_DEBUG
#define AOM_CHECK_MEM_ERROR(error_info, lval, expr) \
do { \
lval = (expr); \
if (!lval) \
aom_internal_error(error_info, AOM_CODEC_MEM_ERROR, \
"Failed to allocate " #lval " at %s:%d", __FILE__, \
__LINE__); \
} while (0)
#else
#define AOM_CHECK_MEM_ERROR(error_info, lval, expr) \
do { \
lval = (expr); \
if (!lval) \
aom_internal_error(error_info, AOM_CODEC_MEM_ERROR, \
"Failed to allocate " #lval); \
} while (0)
#endif
#ifdef __cplusplus
}
// extern "C"
#endif
...
...
This diff is collapsed.
Click to expand it.
av1/common/common.h
+
2
−
19
View file @
e14a42a4
...
...
@@ -16,7 +16,6 @@
#include
<assert.h>
#include
"./aom_config.h"
#include
"aom_dsp/aom_dsp_common.h"
#include
"aom_mem/aom_mem.h"
#include
"aom/aom_integer.h"
...
...
@@ -49,24 +48,8 @@ static INLINE int get_unsigned_bits(unsigned int num_values) {
return
num_values
>
0
?
get_msb
(
num_values
)
+
1
:
0
;
}
#if CONFIG_DEBUG
#define CHECK_MEM_ERROR(cm, lval, expr) \
do { \
lval = (expr); \
if (!lval) \
aom_internal_error(&cm->error, AOM_CODEC_MEM_ERROR, \
"Failed to allocate " #lval " at %s:%d", __FILE__, \
__LINE__); \
} while (0)
#else
#define CHECK_MEM_ERROR(cm, lval, expr) \
do { \
lval = (expr); \
if (!lval) \
aom_internal_error(&cm->error, AOM_CODEC_MEM_ERROR, \
"Failed to allocate " #lval); \
} while (0)
#endif
#define CHECK_MEM_ERROR(cm, lval, expr) \
AOM_CHECK_MEM_ERROR(&cm->error, lval, expr)
// TODO(yaowu: validate the usage of these codes or develop new ones.)
#define AV1_SYNC_CODE_0 0x49
#define AV1_SYNC_CODE_1 0x83
...
...
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