AOMedia Codec SDK

aom.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2016, Alliance for Open Media. All rights reserved
3 *
4 * This source code is subject to the terms of the BSD 2 Clause License and
5 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
6 * was not distributed with this source code in the LICENSE file, you can
7 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
8 * Media Patent License 1.0 was not distributed with this source code in the
9 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
10 */
11
31 #ifndef AOM_AOM_H_
32 #define AOM_AOM_H_
33
34 #include "aom/aom_codec.h"
35 #include "aom/aom_image.h"
36
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40
45 enum aom_com_control_id {
48 AOM_SET_POSTPROC = 3,
49 AOM_SET_DBG_COLOR_REF_FRAME =
50 4,
51 AOM_SET_DBG_COLOR_MB_MODES = 5,
52 AOM_SET_DBG_COLOR_B_MODES = 6,
53 AOM_SET_DBG_DISPLAY_MV = 7,
55 /* TODO(jkoleszar): The encoder incorrectly reuses some of these values (5+)
56 * for its control ids. These should be migrated to something like the
57 * AOM_DECODER_CTRL_ID_START range next time we're ready to break the ABI.
58 */
59 AV1_GET_REFERENCE = 128,
60 AV1_SET_REFERENCE = 129,
61 AV1_COPY_REFERENCE =
62 130,
63 AOM_COMMON_CTRL_ID_MAX,
64
65 AV1_GET_NEW_FRAME_IMAGE = 192,
66 AV1_COPY_NEW_FRAME_IMAGE =
67 193,
69 AOM_DECODER_CTRL_ID_START = 256
70 };
71
76 enum aom_postproc_level {
77 AOM_NOFILTERING = 0,
78 AOM_DEBLOCK = 1 << 0,
79 AOM_DEMACROBLOCK = 1 << 1,
80 AOM_ADDNOISE = 1 << 2,
81 AOM_DEBUG_TXT_FRAME_INFO = 1 << 3,
82 AOM_DEBUG_TXT_MBLK_MODES =
83 1 << 4,
84 AOM_DEBUG_TXT_DC_DIFF = 1 << 5,
85 AOM_DEBUG_TXT_RATE_INFO = 1 << 6,
86 AOM_MFQE = 1 << 10
87 };
88
96 typedef struct aom_postproc_cfg {
99 int post_proc_flag;
100 int deblocking_level;
101 int noise_level;
102 } aom_postproc_cfg_t;
103
108 typedef struct av1_ref_frame {
109 int idx;
110 int use_external_ref;
111 aom_image_t img;
112 } av1_ref_frame_t;
113
119 AOM_CTRL_USE_TYPE(AOM_SET_POSTPROC, aom_postproc_cfg_t *)
120 #define AOM_CTRL_AOM_SET_POSTPROC
121 AOM_CTRL_USE_TYPE(AOM_SET_DBG_COLOR_REF_FRAME, int)
122 #define AOM_CTRL_AOM_SET_DBG_COLOR_REF_FRAME
123 AOM_CTRL_USE_TYPE(AOM_SET_DBG_COLOR_MB_MODES, int)
124 #define AOM_CTRL_AOM_SET_DBG_COLOR_MB_MODES
125 AOM_CTRL_USE_TYPE(AOM_SET_DBG_COLOR_B_MODES, int)
126 #define AOM_CTRL_AOM_SET_DBG_COLOR_B_MODES
127 AOM_CTRL_USE_TYPE(AOM_SET_DBG_DISPLAY_MV, int)
128 #define AOM_CTRL_AOM_SET_DBG_DISPLAY_MV
129 AOM_CTRL_USE_TYPE(AV1_GET_REFERENCE, av1_ref_frame_t *)
130 #define AOM_CTRL_AV1_GET_REFERENCE
131 AOM_CTRL_USE_TYPE(AV1_SET_REFERENCE, av1_ref_frame_t *)
132 #define AOM_CTRL_AV1_SET_REFERENCE
133 AOM_CTRL_USE_TYPE(AV1_COPY_REFERENCE, av1_ref_frame_t *)
134 #define AOM_CTRL_AV1_COPY_REFERENCE
135 AOM_CTRL_USE_TYPE(AV1_GET_NEW_FRAME_IMAGE, aom_image_t *)
136 #define AOM_CTRL_AV1_GET_NEW_FRAME_IMAGE
137 AOM_CTRL_USE_TYPE(AV1_COPY_NEW_FRAME_IMAGE, aom_image_t *)
138 #define AOM_CTRL_AV1_COPY_NEW_FRAME_IMAGE
139
143 #ifdef __cplusplus
144 } // extern "C"
145 #endif
146
147 #endif // AOM_AOM_H_
AV1_GET_REFERENCE
Definition: aom.h:59
aom_postproc_cfg::post_proc_flag
int post_proc_flag
the types of post processing to be done, should be combination of "aom_postproc_level" ...
Definition: aom.h:99
av1_ref_frame::idx
int idx
Definition: aom.h:109
aom_postproc_cfg_t
struct aom_postproc_cfg aom_postproc_cfg_t
post process flags
aom_image.h
Describes the aom image descriptor and associated operations.
aom_com_control_id
aom_com_control_id
Control functions.
Definition: aom.h:45
aom_image
Image Descriptor.
Definition: aom_image.h:141
av1_ref_frame_t
struct av1_ref_frame av1_ref_frame_t
AV1 specific reference frame data struct.
AV1_SET_REFERENCE
Definition: aom.h:60
AOM_SET_POSTPROC
pass in an external frame into decoder to be used as reference frame
Definition: aom.h:48
AOM_CTRL_USE_TYPE
#define AOM_CTRL_USE_TYPE(id, typ)
aom_codec_control type definition macro
Definition: aom_codec.h:438
aom_codec.h
Describes the codec algorithm interface to applications.
aom_postproc_cfg
post process flags
Definition: aom.h:96
AOM_SET_DBG_COLOR_REF_FRAME
Definition: aom.h:49
AOM_DEBUG_TXT_FRAME_INFO
Definition: aom.h:81
AOM_SET_DBG_COLOR_B_MODES
Definition: aom.h:52
AV1_COPY_REFERENCE
Definition: aom.h:61
AV1_GET_NEW_FRAME_IMAGE
Definition: aom.h:65
av1_ref_frame
AV1 specific reference frame data struct.
Definition: aom.h:108
AV1_COPY_NEW_FRAME_IMAGE
Definition: aom.h:66
AOM_SET_DBG_DISPLAY_MV
Definition: aom.h:53
AOM_DEBUG_TXT_MBLK_MODES
Definition: aom.h:82
av1_ref_frame::use_external_ref
int use_external_ref
Definition: aom.h:110
AOM_DEBUG_TXT_DC_DIFF
Definition: aom.h:84
av1_ref_frame::img
aom_image_t img
Definition: aom.h:111
AOM_SET_DBG_COLOR_MB_MODES
Definition: aom.h:51
aom_postproc_cfg::deblocking_level
int deblocking_level
Definition: aom.h:100
AOM_DEBUG_TXT_RATE_INFO
Definition: aom.h:85
aom_postproc_cfg::noise_level
int noise_level
Definition: aom.h:101
aom_postproc_level
aom_postproc_level
post process flags
Definition: aom.h:76