48 #if !defined(_daala_codec_H)
49 # define _daala_codec_H (1)
53 # if defined(__cplusplus)
58 # if defined(__GNUC__) && defined(__GNUC_MINOR__)
59 # define OD_GNUC_PREREQ(maj, min) \
60 ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
62 # define OD_GNUC_PREREQ(maj, min) (0)
65 #if OD_GNUC_PREREQ(4, 0)
66 # pragma GCC visibility push(default)
69 #if OD_GNUC_PREREQ(3, 4)
70 # define OD_WARN_UNUSED_RESULT __attribute__((__warn_unused_result__))
72 # define OD_WARN_UNUSED_RESULT
75 #if OD_GNUC_PREREQ(3, 4)
76 # define OD_ARG_NONNULL(x) __attribute__((__nonnull__(x)))
78 # define OD_ARG_NONNULL(x)
82 # if defined(_MSC_VER)
83 # pragma warning(disable:4100 4115 4125 4127 4152 4505 4554 4711)
89 #define OD_SUCCESS (0)
91 # define OD_EFAULT (-1)
93 # define OD_EINVAL (-10)
95 # define OD_EBADHEADER (-20)
97 # define OD_ENOTFORMAT (-21)
99 # define OD_EVERSION (-22)
101 # define OD_EIMPL (-23)
103 # define OD_EBADPACKET (-24)
111 # define OD_CS_UNSPECIFIED (0)
113 # define OD_CS_ITU_REC_470M (1)
115 # define OD_CS_ITU_REC_470BG (2)
117 # define OD_CS_ITU_REC_790 (3)
119 # define OD_CS_YCgCo (4)
121 # define OD_CS_NSPACES (5)
125 # define OD_NPLANES_MAX (4)
133 const char *daala_version_string(
void);
181 unsigned char version_major;
182 unsigned char version_minor;
183 unsigned char version_sub;
186 ogg_int32_t pic_height;
187 ogg_uint32_t pixel_aspect_numerator;
188 ogg_uint32_t pixel_aspect_denominator;
189 ogg_uint32_t timebase_numerator;
190 ogg_uint32_t timebase_denominator;
191 ogg_uint32_t frame_duration;
192 int keyframe_granule_shift;
240 ogg_int64_t daala_granule_basetime(
void *encdec, ogg_int64_t granpos);
241 double daala_granule_time(
void *encdec, ogg_int64_t granpos);
243 # if OD_GNUC_PREREQ(4, 0)
244 # pragma GCC visibility pop
246 # if defined(__cplusplus)
ogg_int32_t width
Width and height in pixels.
Definition: codec.h:168
Representation of an image or video frame.
Definition: codec.h:162
int ystride
Distance in memory between two pixels vertically next to each other.
Definition: codec.h:158
#define OD_NPLANES_MAX
The maximum number of color planes allowed in a single frame.
Definition: codec.h:125
od_img_plane planes[OD_NPLANES_MAX]
Typical 3 planes for Y, Cb, and Cr.
Definition: codec.h:164
Representation of a single component within an image or frame.
Definition: codec.h:146
int keyframe_rate
key frame rate defined how often a key frame is emitted by encoder in number of frames.
Definition: codec.h:197
int xstride
Distance in memory between two pixels horizontally next to each other in (is always 1 in encoder)...
Definition: codec.h:156
unsigned char xdec
The decimation factor in x direction.
Definition: codec.h:152
int daala_log_init(void)
Initialize the logging module.
ogg_int32_t pic_width
pic_width,_height form a region of interest to encode
Definition: codec.h:185
Configuration parameters for a codec instance.
Definition: codec.h:180
int nplanes
Number of planes (1 for greyscale, 3 for YCbCr, 4 for YCbCr+Alpha )
Definition: codec.h:166
Subsampling factors for a plane as a power of 2.
Definition: codec.h:174