hadamard: Add 4x4 test.
[aom.git] / aom / aom.h
blob0650a11f6bfe066a126a1fc1ddf222c876740c82
1 /*
2 * Copyright (c) 2016, Alliance for Open Media. All rights reserved
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.
12 /*!\defgroup aom AOM
13 * \ingroup codecs
14 * AOM is aom's newest video compression algorithm that uses motion
15 * compensated prediction, Discrete Cosine Transform (DCT) coding of the
16 * prediction error signal and context dependent entropy coding techniques
17 * based on arithmetic principles. It features:
18 * - YUV 4:2:0 image format
19 * - Macro-block based coding (16x16 luma plus two 8x8 chroma)
20 * - 1/4 (1/8) pixel accuracy motion compensated prediction
21 * - 4x4 DCT transform
22 * - 128 level linear quantizer
23 * - In loop deblocking filter
24 * - Context-based entropy coding
26 * @{
28 /*!\file
29 * \brief Provides controls common to both the AOM encoder and decoder.
31 #ifndef AOM_AOM_AOM_H_
32 #define AOM_AOM_AOM_H_
34 #include "aom/aom_codec.h"
35 #include "aom/aom_image.h"
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
41 /*!\brief Control functions
43 * The set of macros define the control functions of AOM interface
44 * The range for common control IDs is 230-255(max).
46 enum aom_com_control_id {
47 /*!\brief Codec control function to get a pointer to a reference frame
49 * av1_ref_frame_t* parameter
51 AV1_GET_REFERENCE = 230,
53 /*!\brief Codec control function to write a frame into a reference buffer
55 * av1_ref_frame_t* parameter
57 AV1_SET_REFERENCE = 231,
59 /*!\brief Codec control function to get a copy of reference frame from the
60 * decoder
62 * av1_ref_frame_t* parameter
64 AV1_COPY_REFERENCE = 232,
66 /*!\brief Codec control function to get a pointer to the new frame
68 * aom_image_t* parameter
70 AV1_GET_NEW_FRAME_IMAGE = 233,
72 /*!\brief Codec control function to copy the new frame to an external buffer
74 * aom_image_t* parameter
76 AV1_COPY_NEW_FRAME_IMAGE = 234,
78 /*!\brief Start point of control IDs for aom_dec_control_id.
79 * Any new common control IDs should be added above.
81 AOM_DECODER_CTRL_ID_START = 256
82 // No common control IDs should be added after AOM_DECODER_CTRL_ID_START.
85 /*!\brief AV1 specific reference frame data struct
87 * Define the data struct to access av1 reference frames.
89 typedef struct av1_ref_frame {
90 int idx; /**< frame index to get (input) */
91 int use_external_ref; /**< Directly use external ref buffer(decoder only) */
92 aom_image_t img; /**< img structure to populate (output) */
93 } av1_ref_frame_t;
95 /*!\cond */
96 /*!\brief aom decoder control function parameter type
98 * Defines the data type for each of AOM decoder control function requires.
100 * \note For each control ID "X", a macro-define of
101 * AOM_CTRL_X is provided. It is used at compile time to determine
102 * if the control ID is supported by the libaom library available,
103 * when the libaom version cannot be controlled.
105 AOM_CTRL_USE_TYPE(AV1_GET_REFERENCE, av1_ref_frame_t *)
106 #define AOM_CTRL_AV1_GET_REFERENCE
108 AOM_CTRL_USE_TYPE(AV1_SET_REFERENCE, av1_ref_frame_t *)
109 #define AOM_CTRL_AV1_SET_REFERENCE
111 AOM_CTRL_USE_TYPE(AV1_COPY_REFERENCE, av1_ref_frame_t *)
112 #define AOM_CTRL_AV1_COPY_REFERENCE
114 AOM_CTRL_USE_TYPE(AV1_GET_NEW_FRAME_IMAGE, aom_image_t *)
115 #define AOM_CTRL_AV1_GET_NEW_FRAME_IMAGE
117 AOM_CTRL_USE_TYPE(AV1_COPY_NEW_FRAME_IMAGE, aom_image_t *)
118 #define AOM_CTRL_AV1_COPY_NEW_FRAME_IMAGE
120 /*!\endcond */
121 /*! @} - end defgroup aom */
123 #ifdef __cplusplus
124 } // extern "C"
125 #endif
127 #endif // AOM_AOM_AOM_H_