#include <assert.h>
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include "aom/aom_image.h"
#include "aom/aom_integer.h"
#include "aom/internal/aom_image_internal.h"
#include "aom_mem/aom_mem.h"
static inline unsigned int align_image_dimension(unsigned int d,
unsigned int subsampling,
unsigned int size_align) { … }
static aom_image_t *img_alloc_helper(
aom_image_t *img, aom_img_fmt_t fmt, unsigned int d_w, unsigned int d_h,
unsigned int buf_align, unsigned int stride_align, unsigned int size_align,
unsigned int border, unsigned char *img_data,
aom_alloc_img_data_cb_fn_t alloc_cb, void *cb_priv) { … }
aom_image_t *aom_img_alloc(aom_image_t *img, aom_img_fmt_t fmt,
unsigned int d_w, unsigned int d_h,
unsigned int align) { … }
aom_image_t *aom_img_alloc_with_cb(aom_image_t *img, aom_img_fmt_t fmt,
unsigned int d_w, unsigned int d_h,
unsigned int align,
aom_alloc_img_data_cb_fn_t alloc_cb,
void *cb_priv) { … }
aom_image_t *aom_img_wrap(aom_image_t *img, aom_img_fmt_t fmt, unsigned int d_w,
unsigned int d_h, unsigned int stride_align,
unsigned char *img_data) { … }
aom_image_t *aom_img_alloc_with_border(aom_image_t *img, aom_img_fmt_t fmt,
unsigned int d_w, unsigned int d_h,
unsigned int align,
unsigned int size_align,
unsigned int border) { … }
int aom_img_set_rect(aom_image_t *img, unsigned int x, unsigned int y,
unsigned int w, unsigned int h, unsigned int border) { … }
void aom_img_flip(aom_image_t *img) { … }
void aom_img_free(aom_image_t *img) { … }
int aom_img_plane_width(const aom_image_t *img, int plane) { … }
int aom_img_plane_height(const aom_image_t *img, int plane) { … }
aom_metadata_t *aom_img_metadata_alloc(
uint32_t type, const uint8_t *data, size_t sz,
aom_metadata_insert_flags_t insert_flag) { … }
void aom_img_metadata_free(aom_metadata_t *metadata) { … }
aom_metadata_array_t *aom_img_metadata_array_alloc(size_t sz) { … }
void aom_img_metadata_array_free(aom_metadata_array_t *arr) { … }
int aom_img_add_metadata(aom_image_t *img, uint32_t type, const uint8_t *data,
size_t sz, aom_metadata_insert_flags_t insert_flag) { … }
void aom_img_remove_metadata(aom_image_t *img) { … }
const aom_metadata_t *aom_img_get_metadata(const aom_image_t *img,
size_t index) { … }
size_t aom_img_num_metadata(const aom_image_t *img) { … }